Skip to main content

Python config-manager used at Alkivi

Project description

Build Status Requirements Status

Python config-manager used at Alkivi

Package

Example

Write a conf like

[default]
; general configuration: default endpoint
endpoint=dev

[dev]
; configuration specific to 'dev' endpoint
env=dev

[prod]
; configuration specific to 'prod' endpoint
env=prod
from alkivi.config import ConfigManager
config = ConfigManager('test')

# This will look for several files, in order
# 1. Current working directory: ``./test.conf``
# 2. Current user's home directory ``~/.test.conf``
# 3. System wide configuration ``/etc/test.conf``

# Then find the endpoint
endpoint = config.get('default', endpoint)

# Or use a specific one
endpoint = 'prod'

# And then
env = config.get(endpoint, 'env')

Parameters

Tests

Testing is set up using pytest and coverage is handled with the pytest-cov plugin.

Run your tests with py.test in the root directory.

Coverage is ran by default and is set in the pytest.ini file. To see an html output of coverage open htmlcov/index.html after running the tests.

TODO

Travis CI

There is a .travis.yml file that is set up to run your tests for python 2.7 and python 3.2, should you choose to use it.

TODO

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

alkivi_config_manager-1.2.9-py2.py3-none-any.whl (3.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file alkivi_config_manager-1.2.9-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for alkivi_config_manager-1.2.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4c1d31412c8de90f4ea69552bccd772bfff8a8bee017a074777515c6910152b7
MD5 de72cba204b7b7ec2a67af0a06914f4d
BLAKE2b-256 5ce0cb703b45002c5b34f973ba6b62e9077e69840bfbebf2384d49cfc6f44413

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