Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

support expanduser() for dotenv_path

Đã đóng
#525 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
8.9k
Fork
600
Merge trung bình
8 ngày 8 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của theskumar/python-dotenv

Tất cả issue của theskumar/python-dotenv

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.