Skip to content

Conversation

adsharma
Copy link
Owner

Usage:

from fquery.pydantic import pydantic

@pydantic
class User:
    name: str
    age: int
    is_active: bool = True

You get a dataclass, which is cheap (4x in one test). When you need to validate, you can call the validator() method, which will create a pydantic model on-demand.

@adsharma adsharma merged commit bf5304d into main Jan 30, 2025
2 checks passed
@adsharma adsharma deleted the pydantic_decorator branch January 30, 2025 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant