Skip to main content

Configuration for humans

Project description

Latest Version Downloads Wheel Status

Parsing INI configs must be easy, as are the INI files.

Configs provides a simple API for getting data from INI config files.

Loading data from a config is as easy as configs.load('my.conf').

Configs work with Python 2.7+ (including 3).

The repo is at bitbucket.org/moigagoo/configs.

Read the full documentation at configs.rtfd.org.

https://op9bww.bn1302.livefilestore.com/y2phzX-gFw3yMuwMkL1HBwG23d-RWirCBlliDJ1dwR2VNPAG3Dp6LFJwpvnE3sPmr7-8V8HfC11mOsH-h7TAa1rzDHo0uuCks3PbTL7fM3PfGU/figs.jpg?psid=1

Features

  • Root-level params support

  • Numeric and boolean values are converted automatically

  • Sections with only key-value items are parsed as dicts

  • Sections with only flag items (keys with no value) are parsed as lists

  • Mixed content sections are parsed as tuples of a dict and a list, which can be accessed individually

  • Sections are iterable (even the mixed ones; list first, dict second)

  • Comments support

Installation

Install configs with pip:

$ pip install configs

Usage

Load a config file:

>>> import configs
>>> c = configs.load('sample.conf')
>>> c['general']
{'foo': 'baz'}

Tests

Run the tests with:

$ python test_configs.py

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

configs-3.0.3.zip (8.0 kB view details)

Uploaded Source

Built Distributions

configs-3.0.3.win-amd64.exe (230.0 kB view details)

Uploaded Source

configs-3.0.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file configs-3.0.3.zip.

File metadata

  • Download URL: configs-3.0.3.zip
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for configs-3.0.3.zip
Algorithm Hash digest
SHA256 a5ab09e04e441dac6aa856a71fbf5ffc62954352630f79d311b8f8a31d9ce19c
MD5 870df08fa56dc4004b4ea8d5a8bee6ed
BLAKE2b-256 ca9b7f5ce5edb247816f67e5c109e1c005ea17ea4f4b9239300555811f3b0cf1

See more details on using hashes here.

File details

Details for the file configs-3.0.3.win-amd64.exe.

File metadata

  • Download URL: configs-3.0.3.win-amd64.exe
  • Upload date:
  • Size: 230.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for configs-3.0.3.win-amd64.exe
Algorithm Hash digest
SHA256 7d8aba07a709ee16801a8b0937c39a17b918c9b9cc7a3c944bde24f6907398f4
MD5 dc1c8fc271338c614bfea5fb67e783f7
BLAKE2b-256 9749ec9caabad4bf86e91b7e3e5002615239b6093115f4faeb8bdd88b1544740

See more details on using hashes here.

File details

Details for the file configs-3.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for configs-3.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3aa54e99b012ece70d30b7926d9e8fa159544ca27445ec2776254e25ccc190a7
MD5 e0f0c26c84d65197f8a1212862117983
BLAKE2b-256 b0ac20230cd79c583ccf1e81f328befdffc1f8a23aee814c3261220954099c2a

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