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
pydantic-extra
package?
#5012
Comments
This looks impressive, as I worked before on several types regarding Pydantic in my work, I would be happy to elaborate on this and maintain Pydantic extra, it's going to be more helpful and contain several utilities that may open-source developers propose in discussions or issues.
I would be happy if I maintain this! we can do it in Pydantic org while it will be an extra addon on the top of the package itself. |
This seems to have started without waiting for more feedback, sorry, but still very open to any feedback. In terms of timeline, I guess if we can get this ready to be released with V2, we can mark |
Amazing 🚀 |
Good idea. Yeah that make sense. |
Hi everyone, I also think it is a good idea and I agreed with @hramezani for the naming, something like |
I agree with @hramezani, I'll rename the repo, upload a new stub package and delete the old one. Bring on namespaces in pypi and all this holding names would die away! |
Sound like a great idea. My project could make use of these handful types heavily. |
Thanks @tomy0000000, hopefully @yezz123 can do some of the initial work setting up the repo - copying Once that's done, we can migrate the above bullet point to issues on the repo and start creating PRs.
|
Great, I'll stayed tuned |
Is there a possibility of this hooking into rust too? Or would it need to be compiled together with pydantic then? |
This (or any code) can use the rust core-schema types, as is already done here. That's the same thing pydantic itself does. |
So it be possible to write the color validation/parsing in rust within pydantic-extra? Perhaps something we could showcase for others trying to expand on the plugins |
No, not writing rust, that would require the entire build process we have for pydantic-core, I mean we can use validators written in rust. I very much doubt there's going to be the need to write validators in rust here or anywhere else. |
Since we've created https://github.com/pydantic/pydantic-extra-types, I'll be closing this issue. FYI @samuelcolvin |
For types which shouldn't be included with pydantic but which people understandably want to reuse.
See #5011 - I don't think we should not add a one time password type to pydantic. The surface -area/problem-space of pydantic is already too large. I also strongly want to avoid more dependencies, even if they're optional.
However I would advocate for creating a package, perhaps
pydantic-extra
which includes:PaymentCardNumber
- currently in pydanticColor
- currently in pydanticwebauthn
package already uses pydantic, so maybe that's not necessary/a good ideastrip_whitespace
andmin_length
, but also integrate with https://github.com/dwolfhub/zxcvbn-python ???pydantic-extra
can be significantly lower than forpydantic
PaymentCardNumber
andColor
will need to remain in pydantic (potentially with a dep warning) for now.Before anyone asks, no, I do not want to move email types to
pydantic-extra
- they're used too much, also I want to move the implementation into rust pydantic/pydantic-core#385.I'd be happy to:
docs.pydantic.dev
(this is the plan forpydantic-core
andpydantic-settings
already)The other advantage would be that we could make new releases of
pydantic-extra
more easily as they couldn't break any other bits of pydantic.@pydantic/pydantic-maintainers WDYT?
If we decide to go ahead with this, @yezz123 would you be willing to be a maintainer of this???
The text was updated successfully, but these errors were encountered: