Skip to main content

A Python 3 configuration library that's music to your ears.

Project description

configaro configuration library

What is it?

configaro is a configuration library for Python 3 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 config defaults and local overrides
  • 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=Goodby subject=Folks')

What about Python 2?

I have zero interest in supporting Python 2 at this point. If you are still using Python 2 then move along -- there's nothing to see here. Fork it if you like and submit a pull request.

Installation

configaro may be installed from the Python package index:

$ pip3 install configaro

configaro 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:

$ pytest

Documentation

configaro documentation is hosted on Read The Docs 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.4.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

configaro-0.9.4-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for configaro-0.9.4.tar.gz
Algorithm Hash digest
SHA256 c3e526aae0cc9c028c5b655e342a1dee865f9c5a401baa0e541e8a0a1f3b3180
MD5 404a6a5fe844b7577a339d3a091133d1
BLAKE2b-256 b037e0bc177f5529b42a5183ea1c06efd12ed32715f0e758711dfa15af122cc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for configaro-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 187d82385c3a508dc02744c2534a1949f1eaf54108f9f4538b106f97bf90910f
MD5 3d03907a30a9cb0d613c9cefd6face40
BLAKE2b-256 6c8c702803614ac7946aef4334bd41ca716a03ac04095c32763080c86c71737a

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