3 ms·
The only reason I use .env is because it’s dead simple and very obvious as to how it works to anyone. If now someone has to read docs to figure out how to conf
by treflop 2y ago
The only reason I use .env is because it’s dead simple and very obvious as to how it works to anyone.
If now someone has to read docs to figure out how to configure the app, I’d rather have them read docs for some other safer and more powerful configuration scheme.
- pnt12 2y agoI've dealt with problems from python-dotenv and very much prefer it as a command than as a library. As an example, once I changed a .env fikr and unit tests started failing. Digging deeper into it, and lots of code was checking for .env to load its configurations, and would break without it. I'd prefer this not to happen, as our tests were executing based on outside, not version controlled, configurations. After removing dotenv as a library and using it only as a command, we were able to separate configuration and logic, and not have .env files affecting our unit tests - we simply ran the application with dotenv command, and the unit tests without.