GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python

Native support for Pydantic models for function_framework.typed

未关闭
#289 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
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 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。