Doppler Env
raw JSON → 0.3.1 verified Fri May 01 auth: no python
Inject Doppler secrets as environment variables into your Python application during local development. Supports debuggers in PyCharm and VS Code. Latest version: 0.3.1. Release cadence is low; last release was 2021.
pip install doppler-env Common errors
error ImportError: No module named 'doppler-env' ↓
cause Using hyphen instead of underscore in import statement.
fix
Use
from doppler_env import main. error doppler-env: DOPPLER_ENV environment variable not set. ↓
cause Missing both DOPPLER_TOKEN and DOPPLER_ENV.
fix
Set DOPPLER_TOKEN (API) or DOPPLER_ENV (CLI) environment variable before calling main().
Warnings
gotcha The package name contains a hyphen, but import uses underscore: `doppler_env`. ↓
fix Use `from doppler_env import main` instead of `import doppler-env`.
gotcha Logging is disabled by default since v0.3.1; enable with DOPPLER_ENV_LOGGING=1. ↓
fix Set DOPPLER_ENV_LOGGING=1 if you need debug output.
deprecated Support for Python 3.6 is minimal; consider upgrading. ↓
fix Use Python 3.7+ for best compatibility.
Imports
- main wrong
import doppler-envcorrectfrom doppler_env import main
Quickstart
import os
from doppler_env import main
# Set DOPPLER_TOKEN or DOPPLER_ENV before calling main
os.environ.setdefault('DOPPLER_TOKEN', '') # or set DOPPLER_ENV
main()
# Now secrets are in environment variables
print(os.environ.get('EXAMPLE_SECRET', 'not found'))