theskumar / theskumar/python-dotenv
feature request: load multiple `.env` file before running a command
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 581
- PR merge metrics
- No merged PRs in 30d
Description
I have different configuration for my application that I intend to be composable. For example imagine I have env files with config values for database server hosts, and other env files with user credentials. I want to choose a combination of the two. I try to do something like
dotenv -f host_config.env -f user_credentials.env run bash do_things_with_db.sh
However it seems that only the last file is taken into account. I think this would be a useful feature to be able to load multiple files. What do you people think about it?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the dotenv command-line entry point and inspect how repeated -f options are parsed and loaded. Reproduce the example with host_config.env and user_credentials.env, then verify that values from both files are available with the established precedence behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100