GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python

Native support for Pydantic models for function_framework.typed

Offen
#289 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
enhancement P3
Vorherrschende Sprache
Python
Sterne
968
Forks
128
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.