-
Notifications
You must be signed in to change notification settings - Fork 89
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
Don't throw IOError for missing .env file #10
Labels
Comments
Thanks for the kind words. I'm open to this suggestion. If it's the convention to pass silently, then we should probably do the same. PR's welcome! =) |
I don't know whether it is convention or not, so I don't want to impose it on this library without knowing, but for what it's worth I manually use
myself as well. |
sloria
added a commit
that referenced
this issue
Aug 5, 2018
This is more consistent with expected behavior, and is consistent with django-environ and envparse close #10
sloria
added a commit
that referenced
this issue
Aug 5, 2018
This is more consistent with expected behavior, and is consistent with django-environ and envparse close #10
In 3.0.0, a warning is raised instead of an error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all thanks very much for this beautiful library, I'm using it to replace a few others as well as a lot of manual type-casting.
I would like to suggest making
read_env()
only opportunistically search for a.env
file, and do nothing (or perhaps log a warning) if no file is found. This is the way django-environ, envparse, and python-dotenv all work.I think it makes sense to support
.env
files in situations where there is no better way to manage environment variables, such as running an application locally, but not require them when running in production under, say, Docker or a traditional process manager.I can of course work around this with a simple try/catch, but a change like this would make the library even nicer to use.
The text was updated successfully, but these errors were encountered: