-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default and local env file #272
Comments
We've seen similar feature requests in the past, regarding multiple scenarios. Please have a look at #73 for a previous discussion. Does it look like it could solve your issue? |
@bbc2 thanks for the comment but it's not what I request (but similar!)
|
I think that with some code like the following, your program should work as you want: for file in dotenv_file_list:
load_dotenv(file) We're not likely to implement this logic in Python-dotenv itself because there are too many different use cases requested by users. |
I'm closing this issue because there doesn't seem anything we'll in python-dotenv with regards to this issue. |
I was thinking it could be possible to make this module read the .env file but if you have .env.local or maybe .env.local or other files they will be loaded on top.
The advantages of this approach are:
You can commit in your project .env file
In scenarios where you can not change the .env file or the env. vars. you have the flexibility to add a new file and will be loaded on top.
Your production code will be like your local.
The only disadvantage I can think of is
The text was updated successfully, but these errors were encountered: