Skip to main content

Env variable configuration management

Project description

Python package to manage configuration from environment variables.

This package is designed to be used to help in configuration management with python docker containers.

Defining configuration

econfig provides simple data types to define configuration with:

import econfig
econfig.register(
  name='MY_CONFIGURATION_NUMBER',
  type=econfig.types.int,
  destination='foo.bar')
econfig.register(
    name='MY_CONFIGURATION_NUMBER',
    type=econfig.types.json,
    destination='foo.json')
errors, settings = econfig.parse()
settings == {
  "foo": {
    "bar": 5
  },
  "json": {
    "some": "value"
  }
}

Types

  • int
  • float
  • bool
  • exists
  • json
  • when_exists: callable type that will provide value when env variable exists

Destination types

  • foo.bar: automatic key value dictionary creation
  • foo[]: append value to list
  • foo[0]: address item in list
  • foo[0].bar: address dictionary item in list

1.0.1 (2017-12-27)

  • Fix release [vangheem]

1.0.0 (2017-12-27)

Project details


Release history Release notifications

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
econfig-1.0.1-py3-none-any.whl (5.4 kB) Copy SHA256 hash SHA256 Wheel py3 Dec 27, 2017
econfig-1.0.1.tar.gz (3.8 kB) Copy SHA256 hash SHA256 Source None Dec 27, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page