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.

Source Distribution

conficus-0.5.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

conficus-0.5.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file conficus-0.5.1.tar.gz.

File metadata

  • Download URL: conficus-0.5.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.5 Linux/5.4.0-48-generic

File hashes

Hashes for conficus-0.5.1.tar.gz
Algorithm Hash digest
SHA256 4d5d9c6a56ee5477e3e44513f8298345b11551d2de4347c52c34983416a5748b
MD5 2455ba9b2415885491349307f6664c55
BLAKE2b-256 9c7987141fd78846a1dc178d19aa23c9f3ae88310066342023e4ac63beddd296

See more details on using hashes here.

File details

Details for the file conficus-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: conficus-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.5 Linux/5.4.0-48-generic

File hashes

Hashes for conficus-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6047e184ff7a867433eb83c5bed42c9bddd679a2e10d2f18e5d8ec596ffb3ab
MD5 23d01078a6fefb606c23b31d7b28270d
BLAKE2b-256 3630f2198fa816b4ff0b122d523717b2b6fb307a5c43eac5b46c8ea9551cf9f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page