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

[FEATURE] Support for common pydantic types #723

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lachaib
Copy link

@lachaib lachaib commented Dec 21, 2023

This PR is "functional" as in "it does what was expected"

  • Support pydantic common types while keeping pydantic an optional dependency
  • Works in lists and tuples
  • Documentation with examples and test on examples

However, don't hesitate to request more tests, docs, or improvements on the code if needed to fit with the current standards

Fixes #181

Copy link

📝 Docs preview for commit 7ea8313 at: https://d7891fe3.typertiangolo.pages.dev

Copy link

📝 Docs preview for commit a36f24d at: https://9028cd14.typertiangolo.pages.dev

Copy link

📝 Docs preview for commit 23988ad at: https://4451bb64.typertiangolo.pages.dev

Copy link

📝 Docs preview for commit 08d1fac at: https://3976aef9.typertiangolo.pages.dev

@lachaib
Copy link
Author

lachaib commented Dec 21, 2023

@tiangolo in order to add a basic pydantic support, we'd need to drop python 3.6, and I'd say it's about time 😏
Would you agree with that? Do you want me to open another pull request to do so? I'd be glad to help.

Edit: seems it's already submitted here #556

@svlandeg svlandeg added feature New feature, enhancement or request p3 labels Feb 28, 2024
Copy link

📝 Docs preview for commit f6c2b03 at: https://1d1a6c3f.typertiangolo.pages.dev

@lachaib lachaib force-pushed the lachaib/issue181 branch 3 times, most recently from debccf1 to 2a48587 Compare March 28, 2024 22:36
@svlandeg
Copy link
Collaborator

@tiangolo in order to add a basic pydantic support, we'd need to drop python 3.6, and I'd say it's about time 😏

Hi! Note that Python 3.6 support was recently dropped in 0.11.0.

@lachaib
Copy link
Author

lachaib commented Mar 29, 2024

@tiangolo in order to add a basic pydantic support, we'd need to drop python 3.6, and I'd say it's about time 😏

Hi! Note that Python 3.6 support was recently dropped in 0.11.0.

Yep I noticed that's why I rebased my PR yesterday 😁
Now the docs can't build in CI and I don't control it 😓

@svlandeg
Copy link
Collaborator

svlandeg commented Mar 29, 2024

Now the docs can't build in CI and I don't control it 😓

There's an issue with the documentation building on the CI, unrelated to this PR. We're looking into it!

[UPDATE] docs building CI error is fixed.

Copy link

github-actions bot commented Apr 2, 2024

📝 Docs preview for commit 19319c6 at: https://99282d37.typertiangolo.pages.dev

@pypae pypae mentioned this pull request Apr 24, 2024
7 tasks
@pypae
Copy link

pypae commented Apr 26, 2024

Looks great, I'd love to see this get merged!

Could we somehow also support custom types defined by users like pydantic?

@lachaib
Copy link
Author

lachaib commented May 12, 2024

Looks great, I'd love to see this get merged!

Me too 😁

Could we somehow also support custom types defined by users like pydantic?

TBH I think this PR covers most of cases we need for now and I prefer to keep it minimalistic to get a chance for it to be merged soon.
On a personal project I managed to go a bit further and I'd really be glad to see Typer include all the features I made (some from inspiration of existing PRs) but small steps are always better.

Copy link

📝 Docs preview for commit fde3d16 at: https://6fef5bb9.typertiangolo.pages.dev

Copy link

📝 Docs preview for commit 2166319 at: https://ddf226eb.typertiangolo.pages.dev

Copy link

📝 Docs preview for commit 0ac6ec0 at: https://d8df500d.typertiangolo.pages.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature, enhancement or request p3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Support for common pydantic types
3 participants