GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python

Native support for Pydantic models for function_framework.typed

Open
#289 0 comments 1 reaction 0 assignees View on GitHub
enhancement P3
Dominant language
Python
Stars
968
Forks
128
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.