theskumar / theskumar/python-dotenv
support expanduser() for dotenv_path
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 581
- PR merge metrics
- No merged PRs in 30d
Description
It would be great if one can place API_KEYs in one .env file outside github repositories,
currently dotenv_path argument does not support "~" as home_path.
Please consider improving this line at https://github.com/theskumar/python-dotenv/blob/main/src/dotenv/main.py#L45
as
self.dotenv_path: Optional[StrPath] = Path(dotenv_path).expanduser()
Thanks
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 in src/dotenv/main.py around line 45 and inspect how dotenv_path is assigned. Confirm the desired behavior for a path beginning with ~, then run the existing test suite to verify that home-directory expansion works without breaking other dotenv_path handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100