3 ms·
OP here. There are different styles you could go about, all of them having in common that you wan't to pull things from .env nicely. I personally don't prefer
by senko 5y ago
OP here. There are different styles you could go about, all of them having in common that you wan't to pull things from .env nicely.
I personally don't prefer django-environ because it's a bit too verbose/magical for my tastes, so use python-dotenv. I would recommend against using `local.py`. It's easy to overcomplicate things here and one of the things I worry about is how easy it is to have a new person set the project up and start working on it.
So, in general, absolutely agree with you. Details (which package to use and how exactly to set up the layout) are always going to be preference-based.
Or at least until the nice folks from Black alleviate us from that pain as well :)
- leetrout 5y agoSure. Claiming "too verbose/magical" for a library that adds structure to generally unstructured, smattered config data seems a bit misplaced. You are entitled to your opinion but I don't think trying to defend your stance with homemade env parsing functions while writing an authoritative sounding blog post helps the community as a whole when there are sound libraries and patterns that solve this exact problem.