python-dotenv
python-dotenv copied to clipboard
support expanduser() for dotenv_path
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
@wgong this would have a better chance of being merged as a PR
thanks for considering this enhancement
@wgong I believe this is a safe change, can be supported. cc: @bbc2