PyCharm
reading time 5 mins
This guide will show you how to seamlessly integrate the Doppler CLI with PyCharm Professional and Community Editions.
Prerequisites
- You've created a Doppler Project for your application
- You've installed the Doppler CLI locally
Configuration
Because PyCharm uses a custom JetBrains Python debug library, the Doppler CLI cannot be used to run your application.
To work around this, we created the doppler-env package which (when activated with the DOPPLER_ENV
environment variable) injects secrets as environment variables into the Python debug process before your application code is run.
To use, install the doppler-env
package in your virtual environment by either adding
doppler-env
pip install doppler-env
pipenv install doppler-env --dev
poetry add [email protected] --dev
Ensure your PyCharm project is configured to use the Python interpreter belonging to this application's virtual environment.
Debug Configuration
Add the required DOPPLER_ENV
environment variable to your Debug Configuration:


Now configure the Doppler CLI to select the project and config:
doppler setup
Then run your PyCharm Debug Configuration and your secrets will automatically be injected as environment variables into the Python debug process.
Python Console
Add the required DOPPLER_ENV
environment variable to your Python Console settings in Preferences > Build, Execution, Deployment > Console > Python Console.


Awesome Work
Now you know how to use Doppler to supply secrets when developing locally with PyCharm.
Updated 9 days ago