Skip to main content

A dynamic settings management solution using ETCD

Project description

https://secure.travis-ci.org/kpn-digital/etcd_config.svg?branch=master https://img.shields.io/codecov/c/github/kpn-digital/etcd_config/master.svg https://img.shields.io/pypi/v/etcd_config.svg https://readthedocs.org/projects/etcd_config/badge/?version=latest

Features

This library allows Python applications load configuration from ETCD:

  • Environment dependent values

  • Values in different config sets, identified by name

Backends

  • ETCD 2.2.1

Installation

$ pip install etcd-config

Usage

import etcd_config.loader
config = etcd_config.loader.get_overwrites(
    env='test',
    dev_params='main.params',
    etcd_details=dict(
        protocol=getattr(params, 'ETCD_PROTOCOL', 'http'),
        host=getattr(params, 'ETCD_HOST', 'localhost'),
        port=getattr(params, 'ETCD_PORT', 2379),
        username=getattr(params, 'ETCD_USERNAME', None),
        password=getattr(params, 'ETCD_PASSWORD', None),
        prefix='/config/your_project'
    )
)

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

etcd-config-1.0.4.tar.gz (12.7 kB view details)

Uploaded Source

File details

Details for the file etcd-config-1.0.4.tar.gz.

File metadata

  • Download URL: etcd-config-1.0.4.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for etcd-config-1.0.4.tar.gz
Algorithm Hash digest
SHA256 0f26d94dcd23827328feab4566d04ab709c857f11c0a32afb71798bbad0d8d19
MD5 e2192f92fbce4dec9144f5f8b37fb3b1
BLAKE2b-256 0a44a79d2c6280c68009874083e8f69c41febd3dd29e4ecf3c4eb5986fae3530

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