Automatically inject Doppler secrets as environment variables for use during local development
Project description
doppler-env (experimental)
Automatically inject Doppler secrets as environment variables for use during local development if the DOPPLER_ENV
environment variable is set.
Forked from and inspired by patch-env.
NOTE: This package is experimental shoudl be used during local development only. It is not suitable, recommended, or supported for production usage.
Use case
Debugging in IDE's such as Python and Visual Studio Code do not allow the Doppler CLI to be used as the process runner for Python.
This package proposes a solution in the form of a site hook that is run for every Python startup and will inject secrets using a local installation of the Doppler CLI if the DOPPLER_ENV
environment variable is set.
Getting started
NOTE: This presumes you've already installed the Doppler CLI and have created a project in Doppler.
- Ensure you've configured the Doppler CLI to select the project and config:
doppler setup
- Install in
doppler-env
in your local development environment:
pip install git+https://github.com/dopplerhq/python-doppler-env.git#egg=doppler_env
- On the command line or in your editor, set the environment variable
DOPPLER_ENV
to trigger injecting secrets as environment variables:
export DOPPLER_ENV=1
- Run your application as per normal:
python src/app.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for doppler_env-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f78cbd16718df2b8487b5d31848e11d6154979a67226160bf1d28affcb6ae875 |
|
MD5 | f88a1615ce6d279ae894387901c250cd |
|
BLAKE2b-256 | 3de64f11885ad63d1f9afc2e5c8bfaa3db46ce8afdc2f46aca90c4b0d199dca6 |