Skip to main content

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

Project description

# get_secret_or_env_var

[![CircleCI](https://img.shields.io/circleci/build/gh/greenape/get_secret_or_env_var.svg?logo=CircleCI&style=flat-square)](https://circleci.com/gh/greenape/get_secret_or_env_var) [![codecov](https://img.shields.io/codecov/c/github/greenape/get_secret_or_env_var.svg?logo=Codecov&style=flat-square)](https://codecov.io/gh/greenape/get_secret_or_env_var) [![License: MIT](https://img.shields.io/github/license/greenape/get_secret_or_env_var.svg?style=flat-square)](https://opensource.org/licenses/MIT) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/python/black)

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

Supplies:

  • 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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

get_secret_or_env_var-0.0.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file get_secret_or_env_var-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: get_secret_or_env_var-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for get_secret_or_env_var-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 669e85819ac680e980df7161b4a3b98ddd7253c703e8dbf2b16f36dea3214c60
MD5 be8c21cd9c6f1d7f3c10183d343c5dd9
BLAKE2b-256 ba6d6bf693792dd8c9d7482fed286d4a1d57e775f802f0c7b172e2c9b0906962

See more details on using hashes here.

Supported by

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