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 摘要。