GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python
Native support for Pydantic models for function_framework.typed
未关闭
enhancement
P3
- 主要语言
- Python
- 星标
- 968
- 派生
- 128
- PR 合并指标
- 30 天内没有已合并 PR
描述
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!
贡献指南
评估
这个 Issue 还没有评估数据。