Skip to main content

Seamlessly and securely inject Doppler secrets into Google Colab notebook environments.

Project description

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.

Release

Installation

Install the package directly inside your Colab notebook:

!pip install -q doppler-colab

Setup

  1. Generate a Service Token inside your Doppler dashboard. (Service tokens enforce scoping and ensure you safely access the correct environment).
  2. Open your Google Colab notebook.
  3. Click the 🔑 Secrets icon on the left sidebar.
  4. Add a new secret with the name DOPPLER_TOKEN and paste in your Service Token (dp.st...).
  5. 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-colab will never print the returned payload or tokens. You only receive a safe confirmation of the number of imported parameters.
  • Service Token Enforcement: doppler-colab enforces 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.

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

doppler_colab-0.4.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

doppler_colab-0.4.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file doppler_colab-0.4.1.tar.gz.

File metadata

  • Download URL: doppler_colab-0.4.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for doppler_colab-0.4.1.tar.gz
Algorithm Hash digest
SHA256 a0e9ffe4c8c8ecfebf2e650ce293106761f7af5afc9c393e175874f9554f7b72
MD5 f7099a329b8e44b80782e30154d89056
BLAKE2b-256 2e62280b8eba5d894abd8dccbf2197c0e71b7c428fe6c932cd702ec66c88412c

See more details on using hashes here.

Provenance

The following attestation bundles were made for doppler_colab-0.4.1.tar.gz:

Publisher: release.yml on jhaisley/doppler-colab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file doppler_colab-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: doppler_colab-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for doppler_colab-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 afd334121e434c02b496129c559793ca16c359df5b2d23c6f9970cbd9cdcfdf8
MD5 4bf9025198dffa01a9d8032ed466a119
BLAKE2b-256 0fd20f99fbf3c8055a52796efa82f410f58684c22d1491968051e7cdefa4a749

See more details on using hashes here.

Provenance

The following attestation bundles were made for doppler_colab-0.4.1-py3-none-any.whl:

Publisher: release.yml on jhaisley/doppler-colab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page