python-dotenv icon indicating copy to clipboard operation
python-dotenv copied to clipboard

Consider allowing directory to search for in `find_dotenv`

Open Samyak2 opened this issue 2 years ago • 3 comments

The issue

Currently, find_dotenv takes the cwd or the directory of the python file that called it. This does not allow specifying a custom directory to search for the .env file without temporarily switching the cwd before calling find_dotenv.

Proposed solution

Add a dir: Optional[StrPath] argument and use that instead of inferring if it's not None.

Samyak2 avatar Dec 26 '23 11:12 Samyak2

I would like to work on this, please assign to me !assign

mukulbindal avatar Jan 08 '24 19:01 mukulbindal