Skip to content

support expanduser() for dotenv_path #525

@wgong

Description

@wgong

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions