You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe. runpod is built on top of FastAPI, yet it currently doesn't support one of FastAPI's main features: automatic serialization/deserialization with Pydantic models.
It would be really useful it such support existed. This would make writing code for RunPod less error-prone, increase type-checking coverage, and simplify migration from existing FastAPI endpoints.
Describe the solution you'd like
I would like to be able to write code similar to:
fromrunpodimportEndpointRequestfrompydanticimportBaseModelclassMyRequest(BaseModel):
foo: strclassMyResponse(BaseModel):
bar: floatdefhandler(request: EndpointRequest[MyRequest] ) ->MyReponse:
# type-checkers should recognize this as an instance of MyRequest (with the help of the generic annotation above)my_data=request.input
...
returnMyReponse(...)
Describe alternatives you've considered
Currently there is no clean way of integrating existing FastAPI endpoints to RunPod.
They have to be rewritten, and data has to be parsed manually.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
runpod
is built on top ofFastAPI
, yet it currently doesn't support one of FastAPI's main features: automatic serialization/deserialization with Pydantic models.It would be really useful it such support existed. This would make writing code for RunPod less error-prone, increase type-checking coverage, and simplify migration from existing FastAPI endpoints.
Describe the solution you'd like
I would like to be able to write code similar to:
Describe alternatives you've considered
Currently there is no clean way of integrating existing FastAPI endpoints to RunPod.
They have to be rewritten, and data has to be parsed manually.
The text was updated successfully, but these errors were encountered: