Skip to content

Native support for Pydantic models for function_framework.typed #289

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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