GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python
Native support for Pydantic models for function_framework.typed
Offen
enhancement
P3
- Vorherrschende Sprache
- Python
- Sterne
- 968
- Forks
- 128
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Following https://github.com/GoogleCloudPlatform/functions-framework-python/pull/208#issuecomment-1832951749,
it will be great to have [Pydantic](https://docs.pydantic.dev/latest/) models supported natively. E.g.
```python
from pydantic import BaseModel
class HelloRequest(BaseModel):
name: str
@functions_framework.typed
def hello(hr: HelloRequest):
return f"Hello, {hr.name}"
```
Thank you!
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.