-
Notifications
You must be signed in to change notification settings - Fork 85
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
Allow opening other files, not just .env #66
Comments
Note that it's already possible to read files not called from environs import Env
with open("test.txt", "w") as fobj:
fobj.write("A=foo\n")
fobj.write("B=123\n")
env = Env()
env.read_env("test.txt", recurse=False)
assert env("A") == "foo"
assert env.int("B") == 123 |
Oh right, that's PEBKAC from my point. I was totally not seeing part of the code. I believe this should be added to the docs as an example. |
This is now documented here: https://github.com/sloria/environs#reading-a-specific-file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently environs read only hard-coded
.env
files, and only path is available.Yet more and more tools allow custom .env files.
I believe environs should add parameter like
file='.env'
to be able to override defaults.The text was updated successfully, but these errors were encountered: