Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Configuration for humans

Project Description

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.

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
Release History

Release History

This version
History Node

3.0.3

History Node

3.0.2

History Node

3.0.1

History Node

2.0.9

History Node

2.0.8

History Node

2.0.7

History Node

2.0.6

History Node

2.0.5

History Node

2.0.4

History Node

2.0.3

History Node

2.0.2

History Node

2.0.1

History Node

1.9.5

History Node

1.8.2

History Node

1.8.1

History Node

1.8

History Node

1.7

History Node

1.6

History Node

1.5

History Node

1.4

History Node

1.3

History Node

1.2

History Node

1.1

History Node

1.0

History Node

0.9

History Node

0.8

History Node

0.7

History Node

0.6

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
configs-3.0.3-py3-none-any.whl (7.1 kB) Copy SHA256 Checksum SHA256 3.4 Wheel May 13, 2015
configs-3.0.3.win-amd64.exe (230.0 kB) Copy SHA256 Checksum SHA256 any Windows Installer May 13, 2015
configs-3.0.3.zip (8.0 kB) Copy SHA256 Checksum SHA256 Source May 13, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting