Skip to content
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

[Feature Request] Port find_dotenv() feature from python-dotenv #69

Open
devxpy opened this issue Sep 25, 2018 · 4 comments
Open

[Feature Request] Port find_dotenv() feature from python-dotenv #69

devxpy opened this issue Sep 25, 2018 · 4 comments

Comments

@devxpy
Copy link

devxpy commented Sep 25, 2018

python-dotenv has a feature called find_dotenv(), which -

will try to find a .env file by (a) guessing where to start using file or the working directory -- allowing this to work in non-file contexts such as IPython notebooks and the REPL, and then (b) walking up the directory tree looking for the specified file

This is specially useful for zipapps made using shiv. I don't want to package my sensitve info inside the zipapp, but python-decouple can't find my .env when I run the zipapp, because it only looks at the __file__, not current directory. (correct me if i'm wrong)

Thanks!

@devxpy devxpy changed the title [Feature Request] Port find_dotenv feature from python-dotenv [Feature Request] Port find_dotenv() feature from python-dotenv Sep 25, 2018
@henriquebastos
Copy link
Collaborator

This is interesting. I definitely want to add this.

Ref: https://github.com/theskumar/python-dotenv/blob/master/src/dotenv/main.py#L231

@devxpy
Copy link
Author

devxpy commented Nov 14, 2019

Hey, that's good to hear!

On the UX side, would you prefer including this as an improvement over the regular .env finder in this project, or as a separate function, like in python-dotenv?

@d3prof3t
Copy link

Hey @henriquebastos

Is this feature request still in the pipeline? Would love if this is added.
If not, then maybe I can have a go at this if nobody has picked up.

@henriquebastos
Copy link
Collaborator

Go ahead @d3prof3t. I'm still too busy changing diapers and chasing my daughter. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants