Registry / devops / poetry-plugin-dotenv

poetry-plugin-dotenv

JSON →
library3.3.2pypypiunverified

Automatically loads environment variables from .env files before running Poetry commands. Currently at version 3.3.0, with active development and monthly releases.

pip install poetry-plugin-dotenv
INSTALL
IMPORT
SIG · POETRY-PLUGIN-DOTE
P
poetry-plugin-dotenv
devopspythonv3.3.2
Install
8.3s avg
Import
Disk
90MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.3.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 86.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 8.3s · import 0.000s · 86MB
90MB installed
● package 90MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PoetryPluginDotenv
from poetry_plugin_dotenv import PoetryPluginDotenv
from poetry_plugin_dotenv.plugin import PoetryPluginDotenv

Install the plugin, enable it, create a .env file, and run a poetry command to see the variable loaded.

pip install poetry-plugin-dotenv poetry config plugins.poetry-plugin-dotenv.enabled true # Create .env file with your variables # Then run any poetry command - they will be loaded automatically echo "MY_VAR=hello" > .env poetry run python -c "import os; print(os.environ.get('MY_VAR', 'not set'))"
poetry --version
Debug
Known issues
gotchaThe plugin does not load .env files for 'poetry shell' by default; you must set the environment variable POETRY_DOTENV_SHELL=1 to enable that.
fix
export POETRY_DOTENV_SHELL=1 before using 'poetry shell'
affects: >=2.0.0
gotchaBy default, the plugin loads only one .env file. If you have multiple dotenv files (e.g., .env.development), you must set the POETRY_DOTENV_PATH environment variable.
fix
export POETRY_DOTENV_PATH=.env.development or use the --dotenv-path option if available
affects: >=2.0.0
gotchaPoetry 2.0 changed plugin loading. The plugin must be installed in the same Python environment as Poetry. If you use pipx, install it with: pipx inject poetry poetry-plugin-dotenv
fix
pipx inject poetry poetry-plugin-dotenv
affects: >=2.0.0
Upgrade
Version history
3.3.2latest on PyPI · released May 31, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
poetry-plugin-dotenv — pip install poetry-plugin-dotenv · libregistry