theskumar / theskumar/python-dotenv
Consider allowing directory to search for in `find_dotenv`
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 581
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the find_dotenv entry point and review how it currently infers the directory from the cwd or calling Python file. Done means an optional dir argument can provide the directory used to search for .env without changing the cwd.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100