Install
python-dotenv
Read key-value pairs from a .env file and set them as environment variables
1.2.4Latest, 1 Oct 2026
786MDownloads, last month
0Advisories on the latest
2Advisories, all versions
BSD-3-ClauseLicence
8.9KStars
6.3/10OpenSSF Scorecard
Source · Ask AI Mode · · Markdown
Known advisories
| Severity | Advisory | Fix | Published |
|---|---|---|---|
| Moderate | python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback CVE-2026-28684 | Fixed in 1.2.2 | 21 Apr 2026 |
| PYSEC-2026-2270 CVE-2026-28684 | Fixed in 1.2.2 | 20 Apr 2026 |
In the news
- python-dotenv will bite you. Watch out dev.to, 5 Mar 2025
- Unable to import dotenv after installing python-dotenv package in PyCharm stackoverflow.com, 10 Dec 2024
- What is the use of python-dotenv? stackoverflow.com, 6 Dec 2024
- How to Avoid "No module named 'dotenv'" Error After Installing python-dotenv in Anaconda Environment? stackoverflow.com, 23 Jul 2024
- Unable to find a resolution for python-dotenv when using pdm to install python-dotenv stackoverflow.com, 25 May 2024
Sources: PyPI, deps.dev (CC BY 4.0), OSV. Last checked 3 Dec 2026.