Skip to main content

python INI configuration library

Project description

version-badge coverage-badge

conficus is a python ini configuration utility. It reads ini and toml based configuration files into a python dict. conficus provides automatic coercing of values (e.g. str -> int), nested sections, easy access and section inheritance.

v0.5.0 drops support for all python versions less that 3.6. The next minor version will also drop it’s custom ini support solely for toml format.

Installation

Install the ficus package with pip.

pip install conficus

Quick Start

Basic usage:

>>>
>>> import conficus as ficus
>>>

Configurations can be loaded from a file path string:

>>> config = ficus.load('/Users/mgemmill/config.ini', toml=True)
>>>

Or from path stored in an environment variable:

>>> config = ficus.load('ENV_VAR_CONFIG_PATH')
>>>
>>> # configuration is just a dictionary:
...
>>> print config['app']['debug']
True
>>>
>>> # with ease of access:
...
>>> print config['app.debug']
True

Project details


Download files

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

Files for conficus, version 0.5.1
Filename, size File type Python version Upload date Hashes
Filename, size conficus-0.5.1-py3-none-any.whl (10.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size conficus-0.5.1.tar.gz (9.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page