A Python 3.6 configuration library that's music to your ears.
Project description
configaro
What is it?
configaro is a Python 3.6 configuration library that’s music to your ears.
Why should I care?
configaro has been created with the following design goals in mind:
provide a single file library with minimal dependencies
provide one with a simple, expressive API that is easy to use and gets out of your way
provide one that allows for hierarchical config data with dot-addressable access
provide one that allows for defaults and locals config modules
If this sounds appealing to you, take a look:
import configaro as cfg
# Initialize the library with the name of the package containing your defaults.py config module cfg.init(‘mypkg.config’)
# Get the entire config object config = cfg.get() print(config) # prints “{‘greeting’: ‘Hello’, ‘subject’: ‘World’}”
# Config object provide attribute access style in addition to dict access style. print(‘f{config.greeting}, {config.subject}!’) # prints “Hello, World!”
# Config objects may be updated quite flexibly as well. cfg.put(greeting=’Goodbye’, subject=’Folks’} cfg.put({‘greeting’: ‘Goodbye’, ‘subject’: ‘Folks’}) cfg.put(‘greeting=Goodbye subject=Folks’)
What about earlier Python?
configaro uses Python 3.6 features and I have zero interest in supporting earlier versions. If you are still using them then move along – there’s nothing to see here.
Installation
configaro may be installed from the Python package index:
$ pip3 install configaro
It may also be installed from source:
$ git clone https://github.com/mojochao/configaro.git $ pip3 install .
If you install from source with .[dev] you should be able to run tests:
$ tox
Documentation
configaro documentation is hosted on [Read The Docs](https://configaro.readthedocs.io/en/latest/) and should be consulted for information on integrating it into your project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file configaro-1.0.0.tar.gz
.
File metadata
- Download URL: configaro-1.0.0.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c6177ba593534f631ca481dcd2b752b19284c7fcf2457421d0f8ad92c83b712 |
|
MD5 | 5145f014632e56feee472d3adfbaf69f |
|
BLAKE2b-256 | a6541249202a304d4b9c35b8d3ce71f23105acd464410621f7340f176a59a164 |
File details
Details for the file configaro-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: configaro-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7587133ba34c9919805b41aefdda6be0d5ec7fe6eb8b55b7f51fc6e960713a7 |
|
MD5 | 2b195e33f52a42ceb91c04e29b0c4a4f |
|
BLAKE2b-256 | 6d5b53b0c986f3e71d091b3384f3ad2beb7d6c88a7426914246f026a3e849e7d |