PyCharm

reading time 5 mins

This guide will show you how to seamlessly integrate the Doppler CLI with PyCharm Professional and Community Editions.

Prerequisites

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 local virtual environment:

pip install doppler-env

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.


Did this page help you?