python-decouple
python-decouple copied to clipboard
[Feature Request] Port find_dotenv() feature from python-dotenv
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!
This is interesting. I definitely want to add this.
Ref: https://github.com/theskumar/python-dotenv/blob/master/src/dotenv/main.py#L231
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
?
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.
Go ahead @d3prof3t. I'm still too busy changing diapers and chasing my daughter. 😅