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

idea: using pydantic-settings as base / .env parser #534

Open
markdoerr opened this issue Sep 15, 2024 · 3 comments
Open

idea: using pydantic-settings as base / .env parser #534

markdoerr opened this issue Sep 15, 2024 · 3 comments
Labels
discussion Open dialogue on ideas, enhancements, or questions. May not lead to code.

Comments

@markdoerr
Copy link

Dear django-environ developers,

since pydantic-settings made recently quite big advances and has a substantial overlap with django-environ's functionality - and there is a big community behind it, testing it -
I am wondering, if it makes sense to base django-environ on pydantic-settings and just add the django related additions in django-environ. This would follow the DRY principles ;)

What do you think ?

@pataquets
Copy link

pataquets commented Oct 25, 2024

Without having reviewed it myself and due to lack of enough knowledge, I can't weigh in. My take is that it sounds quite reasonable and worth exploring.
However, as an exploratory work, I've researched on PyPI.org dependencies' sizes (as of late Oct '24) to help decision makers.

From pydantic-settings' downloadable files:

Source Distribution
pydantic_settings-2.6.0.tar.gz (75.2 kB view hashes)
Uploaded 17 oct 2024 Source

Built Distribution
pydantic_settings-2.6.0-py3-none-any.whl (28.6 kB view hashes)
Uploaded 17 oct 2024 Python 3

Since the above depends on main Pydantic, here is also the info from pydantic's downloadable files:

Source Distribution
pydantic-2.9.2.tar.gz (769.9 kB view hashes)
Uploaded 17 sept 2024 Source

Built Distribution
pydantic-2.9.2-py3-none-any.whl (434.9 kB view hashes)
Uploaded 17 sept 2024 Python 3

There is also a dependency on python-dotenv, but I guess it might help trim out some code here and not sure how it would affect overall size.
Just my 2c.

@markdoerr
Copy link
Author

Thanks, @pataquets, for the positive feedback :)
let's see, what the other developers think ...
From my perspective, these two dependencies are acceptable, since many use them as well and they are very useful.

@joke2k
Copy link
Owner

joke2k commented Oct 26, 2024

Hello everyone,
this is a good idea from my point of view, precisely to reduce the overlap between the two projects, especially considering the popularity and maturity that pysetting has reached.

I admit that the absence of dependencies in this project was one of the requirements with which I designed it, but I am open to suggestions regarding this new development

@sergeyklay sergeyklay added the discussion Open dialogue on ideas, enhancements, or questions. May not lead to code. label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Open dialogue on ideas, enhancements, or questions. May not lead to code.
Projects
None yet
Development

No branches or pull requests

4 participants