Skip to main content

Docker secrets aware alternative to os.getenv and os.environ

Project description

# get_secret_or_env_var

[![CircleCI](]( [![codecov](]( [![License: MIT](]( [![Code style: black](](

A docker-secrets aware wrapper for Python’s os.getenv and os.environ.


  • getenv
  • getenvb
  • environ
  • environb

Which behave exactly like their stdlib equivalents, but will look for a file in /run/secrets and return the contents in preference to any environment variables.

Setting values on environ or environb will set the values in their os. equivalent.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for get-secret-or-env-var, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size get_secret_or_env_var-0.0.2-py3-none-any.whl (4.4 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page