doppler-colab
Seamlessly and securely inject Doppler secrets into Google Colab interactive environments.
When working in ephemeral environments like Google Colab, managing secrets securely is a challenge. doppler-colab natively integrates with Colab's built-in Secrets management to securely fetch your environment variables from the Doppler API and inject them silently into os.environ.
No CLI dependencies, no leaking print statements, and downstream libraries instantly work.
Installation
Install the package directly inside your Colab notebook:
!pip install -q doppler-colab
Setup
- Generate a Service Token inside your Doppler dashboard. (Service tokens enforce scoping and ensure you safely access the correct environment).
- Open your Google Colab notebook.
- Click the 🔑 Secrets icon on the left sidebar.
- Add a new secret with the name
DOPPLER_TOKENand paste in your Service Token (dp.st...). - Ensure the "Notebook access" toggle is explicitly switched ON next to the token, enabling read-access for your environment.
(Fallback: If you are not in Colab, or are on Colab Enterprise the package will automatically check os.environ["DOPPLER_TOKEN"] as a fallback).
Usage
Method 1: Python API
Invoke the package manually to fetch and load your secrets:
import doppler_colab
doppler_colab.load()
# ✅ Successfully injected 14 secrets from Doppler [Project: your-project] into the environment.
Method 2: IPython Cell Magic
For a cleaner interactive workflow, use the %doppler_load magic command at the top of your cells:
import doppler_colab
%doppler_load
Secure by Default
- Silent Payloads:
doppler-colabwill never print the returned payload or tokens. You only receive a safe confirmation of the number of imported parameters. - Service Token Enforcement:
doppler-colabenforces the use of scoped Service Tokens (dp.st.*). Personal tokens, CLI tokens, and other token types are rejected with a clear error message.
Disclaimer & Acknowledgements
Please note: This is a community-driven project and is not an official Doppler product, nor is it officially endorsed by Doppler.
This refactoring and adaptation to Google Colab would not have been possible without the foundational work of the original authors at Doppler on the python-doppler-env package.
For bug reports or feature requests specifically related to this Colab adaptation, please create an issue on this repository.
Release files for doppler-colab 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| doppler_colab-0.4.1.tar.gz | 16.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| doppler_colab-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.0 kB
Release files / doppler_colab-0.4.1.tar.gz
| Download URL | doppler_colab-0.4.1.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0e9ffe4c8c8ecfebf2e650ce293106761f7af5afc9c393e175874f9554f7b72
|
|
BLAKE2b-256 checksum How to use checksums |
2e62280b8eba5d894abd8dccbf2197c0e71b7c428fe6c932cd702ec66c88412c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 3, 2026.
Transparency logRelease files / doppler_colab-0.4.1-py3-none-any.whl
| Download URL | doppler_colab-0.4.1-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afd334121e434c02b496129c559793ca16c359df5b2d23c6f9970cbd9cdcfdf8
|
|
BLAKE2b-256 checksum How to use checksums |
0fd20f99fbf3c8055a52796efa82f410f58684c22d1491968051e7cdefa4a749
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 3, 2026.
Transparency log