Skip to main content

Retrieve settings and secrets from different storages.

Project description

configstore is a small pluggable library that lets you retrieve settings or secrets from a variety of storage systems to configure your app.

The main pain point this tries to solve is:

Assume you have your config in environment variables but you want to store your secrets in something else. How do you mix having a secret backend for your secrets but still keep everything else in environment variables? With this module you can use both. Let’s say you use DATABASE_PASSWORD as your database password env variable. This will first try to find this in your first backend (let’s say docker secrets) and if it fails will fall back on the env variable.

See example.py for some example code.

Available backends

configstore.EnvVarBackend finds settings in environment variables. This is the classic 12-factor approach, which main drawback is that it’s easy for outside tools or sub-processes to inspect the environment and access sensitive data. This backend is still useful for settings that are not secrets.

configstore.DotenvBackend lets you put settings in a key-value format file, using the dotenv module, which is useful for local development. This backend requires an optional dependency, so use a requirement like configstore[dotenv] to get everything installed.

configstore.DockerSecretBackend can read Docker secrets. This is a secure storage with first-class support in the Docker runtime and related tooling.

configstore.AwsSsmBackend connects to the Parameter Store service that is part of AWS Systems Manager. This backend requires optional dependencies (boto3), so use a requirement like configstore[awsssm] to get everything installed.

Finally, configstore.DictBackend is useful to define a bunch of settings for testing or for defaults.

Contributors

Original author: Antoine Reversat @crevetor

Current maintainer: Éric Araujo @merwok

Project sponsored by Caravan Coop @caravancoop

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

configstore-0.7.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

configstore-0.7-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file configstore-0.7.tar.gz.

File metadata

  • Download URL: configstore-0.7.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.6

File hashes

Hashes for configstore-0.7.tar.gz
Algorithm Hash digest
SHA256 005b20cf1810c0a6b6ed97891542c074c3cfdebb794f84572437c87540538156
MD5 e970c0b0772b6e604d276ffde3a36686
BLAKE2b-256 88c7069d54c4616bdffd4ea7133f5d532f81481a281a71f8a7a484474a3a725d

See more details on using hashes here.

File details

Details for the file configstore-0.7-py2.py3-none-any.whl.

File metadata

  • Download URL: configstore-0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.6

File hashes

Hashes for configstore-0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ed253253fdc3413fd5217a53c01e17c61b22aa83b1f0611402f36b7a292e562d
MD5 21add65989e78de9874ac7a76a3209df
BLAKE2b-256 51f6f759941e45fec6a8aeb71f7132244254a3dfbebcd8893d8d84de906f16b8

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