Improve documentation for read_env()
See original GitHub issueThe readme briefly mentions read_env()
, however it wasn’t until reading the source that the following became apparent:
- that the values read in from the
.env
file are overridden by any that already existed in the environment (I think this is handy, but isn’t immediately obvious) - that
read_env()
also takes an overrides list - that
read_env()
updatesos.environ
directly, rather than just that particularEnv
instance (someone not realising this was intentional is what caused #66 to be filed)
It would be great to mention the above in the readme. If I get a chance to open a PR I will, but it may not be soon, so if anyone wants to do so in the meantime, go ahead 😃
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:5
Top Results From Across the Web
Environment Variables - The U-Boot Documentation
U-Boot supports user configuration using environment variables which can be made persistent by saving to persistent storage, for example flash memory.
Read more >python-dotenv - GitHub
Reads key-value pairs from a .env file and can set them as environment variables. It helps in developing applications following the 12-factor principles....
Read more >Local Dev Environment Variable Tutorial - Enhance docs
Create an API Route to read env vars. API Routes are a Node.js process; process.env lists all environment variables. app/api/debug.
Read more >python-dotenv - PyPI
python-dotenv. Build Status PyPI version. Python-dotenv reads key-value pairs from a .env file and can set them as environment variables.
Read more >How to help improve kernel documentation
This guide is for contributors who would like to improve that situation. ... Resource-managed devfreq_register_notifier() * @dev: The devfreq user device.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also, the documentation mentions a “filthy magic stack backtracking” in order to “find manage.py and then find the dotenv”.
It should be specified more in detail what this means. When you have a two-level hierarchy then the
.env
file is not found, at the moment. It’s yet to be discussed whether this is by design or a bug.I’d suggest to use
os.path.join(base, ".env")
instead of a slash in a string. The former is OS independent.