https://github.com/kpn/py-etcd-config
A config manager based on ETCD for Python apps
https://github.com/kpn/py-etcd-config
config-management configuration-management etcd python
Last synced: 8 months ago
JSON representation
A config manager based on ETCD for Python apps
- Host: GitHub
- URL: https://github.com/kpn/py-etcd-config
- Owner: kpn
- License: other
- Created: 2017-09-15T09:39:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-04T14:16:43.000Z (about 2 years ago)
- Last Synced: 2025-02-13T11:52:28.291Z (8 months ago)
- Topics: config-management, configuration-management, etcd, python
- Language: Python
- Size: 2.29 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
etcd_config
===========.. image:: https://secure.travis-ci.org/kpn-digital/py-etcd-config.svg?branch=master
:target: http://travis-ci.org/kpn-digital/py-etcd-config?branch=master.. image:: https://img.shields.io/codecov/c/github/kpn-digital/py-etcd-config/master.svg
:target: http://codecov.io/github/kpn-digital/py-etcd-config?branch=master.. image:: https://img.shields.io/pypi/v/etcd_config.svg
:target: https://pypi.python.org/pypi/etcd_config.. image:: https://readthedocs.org/projects/etcd_config/badge/?version=latest
:target: http://etcd-config.readthedocs.org/en/latest/?badge=latestNOT MAINTAINED
--------------This repository is not actively maintained anymore.
Features
--------This library allows Python applications load configuration from ETCD:
* Environment dependent values
* Values in different config sets, identified by nameBackends
--------- ETCD 2.2.1
Installation
------------.. code-block:: bash
$ pip install etcd-config
Usage
-----.. code-block:: python
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'
)
)