Skip to content

Native support for Pydantic models for function_framework.typed #289

Open
@haizaar

Description

@haizaar

Following #208 (comment),
it will be great to have Pydantic models supported natively. E.g.

from pydantic import BaseModel

class HelloRequest(BaseModel):
    name: str

@functions_framework.typed
def hello(hr: HelloRequest):
    return f"Hello, {hr.name}"

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions