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.
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.envfile, 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
.envfiles 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.