Skip to content

Replacement for python's os.getenv that knows about docker secrets

License

Notifications You must be signed in to change notification settings

greenape/get_secret_or_env_var

Repository files navigation

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.

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.

About

Replacement for python's os.getenv that knows about docker secrets

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages