-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Toml and maybe even yaml support #210
Comments
Hello, Learning pydantic and pydantic settings.
Do you have any recommandation for the tomlib you want me to use ? Note: pyyaml seems broken on 3.12 with Cython :'( |
Hello, We should be able to create Toml & Yaml source by inheriting InitSettingsSource. Toml and Yaml parsing libraries generates a dict which the InitSettingsSource also uses to configure the source. I added the toml source for reference. Is there any downside to inheriting from InitSettingsSource? |
@kjithin I update the PR, I guess it's better to use the base class you mentionned :). Is there a specific technique to handle module import during test, so the coverage will be happy :D ? |
Added in #211 |
Google suggestions makes me think toml parsing support would be very popular, we might as well also do yaml, it shouldn't be much more work.
We should use the builtin toml parser when possible, and have optional dependency groups.
The text was updated successfully, but these errors were encountered: