Skip to main content

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 supporting dot-addressable access

  • provide one that allows for defaults and locals config modules

  • provide one with complete test coverage

  • provide one with complete documentation

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 older versions. If you are still using Python 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


Download files

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

Source Distribution

configaro-0.9.14.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

configaro-0.9.14-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file configaro-0.9.14.tar.gz.

File metadata

  • Download URL: configaro-0.9.14.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for configaro-0.9.14.tar.gz
Algorithm Hash digest
SHA256 954ccdbf42ee3a8ef080886d6466b8305d63b8b659c8b293a142920a4397f407
MD5 e426dde1e1ce8785b775a929d1492e68
BLAKE2b-256 f9ff39381a1c217ab6ac58b707dc5fc0a3843c2ce4d3f8e62fa9f2446a430871

See more details on using hashes here.

File details

Details for the file configaro-0.9.14-py3-none-any.whl.

File metadata

File hashes

Hashes for configaro-0.9.14-py3-none-any.whl
Algorithm Hash digest
SHA256 03b1d01cb2dc3c35ff0ce142e460c6d89c2db2347892118d426bd68590a5ac1c
MD5 b5284b7919bd9771cc3a13754a8cf8f8
BLAKE2b-256 7b7e7017450cec19e9010a5ed09bd6025b05e97c4d76b832e422c0a057c9f1e0

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