GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python
Native support for Pydantic models for function_framework.typed
Abierto
enhancement
P3
- Lenguaje dominante
- Python
- Estrellas
- 968
- Forks
- 128
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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!
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.