load-dotenv
Automatically and implicitly load environment variables from .env file
What it is and what it does
load-dotenv wraps python-dotenv to automatically load environment variables from a .env file during application startup, triggered by setting the LOAD_DOTENV environment variable to true, yes, or 1. This avoids the need to add explicit load_dotenv() calls in your code, which is useful if you want to keep production code clean while still supporting .env-based configuration during development.
The package is designed as a convenience layer: instead of manually invoking python-dotenv in your application code, you set an environment variable before running your app and the .env file is loaded implicitly. You can also specify a custom path to the .env file via the LOAD_DOTENV_PATH variable. However, the project has been abandoned since its only release in September 2022, so it may not be compatible with recent versions of python-dotenv or Python itself.
Use it for:
- Development environments where you want .env files loaded automatically without modifying application code.
- Keeping production code free of development-only configuration logic by relying on environment variables to trigger loading.
- Quick setup for small projects where adding explicit load_dotenv() calls feels like unnecessary boilerplate.
- Testing scenarios where you want to toggle .env loading on and off via an environment variable without code changes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Automatically loads environment variables from a .env file into your application when a specific environment variable is set, without requiring explicit code changes.
No. The package is abandoned (last release September 2022, no maintenance since), and its core value—avoiding one line of code—is minimal compared to the risk of incompatibility with current python-dotenv versions or Python releases. Use python-dotenv directly with an explicit load_dotenv() call instead; it is actively maintained and the one-line cost is negligible.
Install
load-dotenv on PyPI
pip
pip install load-dotenvuv
uv add load-dotenvpoetry
poetry add load-dotenvInstalling load-dotenv
Before you install
Installation is straightforward with no complex dependencies—only python-dotenv as a runtime requirement. However, the package has been abandoned since its only release on 2022-09-02, with no commits or maintenance activity since then.
License in practice
Licensed under Apache Software License (permissive), which imposes minimal restrictions on use or modification.
Quickstart
pip install load-dotenv
# Create .env file in your working directory
# Set LOAD_DOTENV=true (or yes, or 1) and run your application
# The package will automatically load variables from .env
Requires the LOAD_DOTENV environment variable to be explicitly set to 'true', 'yes', or '1' for the package to activate; it will not load .env files by default.
Verify before relying
- Whether the package actually works with current versions of python-dotenv or modern Python releases, given no maintenance since 2022.
- How the automatic loading mechanism integrates with application startup—whether it hooks into import time or requires a specific entry point.
- Whether LOAD_DOTENV_PATH environment variable for custom .env file paths is fully documented and reliable.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — python-dotenv |
| Maintenance | abandoned — 1,442 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 266,146/month — #8,307 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: load_dotenv-0.1.0-py3-none-any.whl
Keywords: environment variables, env, .env, dotenv
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
dotenvLoads environment variables from a .env file…
unclear · top 5,000 on PyPI
poetry-dotenv-pluginA Poetry plugin that automatically loads…
permissive · top 15,000 on PyPI
python-dotenvReads key-value pairs from a .env file and sets…
permissive · top 100 on PyPI
django-dotenvLoads environment variables from a .env file…
permissive · top 15,000 on PyPI
pytest-dotenvA pytest plugin that automatically loads…
permissive · top 5,000 on PyPI
envparseParses environment variables with optional type…
permissive · top 15,000 on PyPI
typed-settingsLoads and merges settings from multiple sources…
permissive · top 5,000 on PyPI
rootutilsFinds your project root directory and…
permissive · top 15,000 on PyPI
pyyaml-env-tagAdds a custom YAML tag that lets you reference…
permissive · top 5,000 on PyPI
cabinaCabina provides class-based configuration…
permissive · top 15,000 on PyPI