Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TypedDicts rather than nested BaseModels #48

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

andreaso
Copy link
Owner

@andreaso andreaso commented Jan 6, 2025

Feels tidier when all BaseModels maps directly to an actual input and/or output.

The typing_extensions TypedDict is needed for Python < 3.12. Conveniently that package is already being installed as a Pydantic dependency.

Feels tidier when all BaseModels maps directly to an actual input and/or output.

The [typing_extensions][1] TypedDict is needed for Python < 3.12. Conveniently
that package is already being installed as a Pydantic dependency.

[1]: https://pypi.org/project/typing-extensions/
@andreaso andreaso force-pushed the typeddicts-vs-nested-basemodels branch from fb86d45 to a50d0c5 Compare January 6, 2025 18:06
@andreaso andreaso merged commit a50d0c5 into main Jan 6, 2025
20 checks passed
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