I have a small Flask application which uses the python-dotenv lib to load environment variables that I store in a file named .env. Everything works just fine, but I recently realized that I actually never call the load_dotenv() method, so I'm not sure how it can work.
Just out of curiosity I tried to play around it a little bit:
- I removed even the import (
from dotenv import load_dotenv) - Still works - I renamed
.envtosomething_else.env- Doesn't work - I uninstalled
python-dotenvwithpip- Doesn't work
I'm using version 0.10.3 and I have read the docs but didn't find anything about automatic loading of environment variables.
Any idea on how it can be possible? I could take a look at the code of python-dotenv but I'm quite new to python and I wish to spend my time on something more useful, but this thing just bugs me.