Skip to main content

A configuration library.

Project description

profig is a straightforward configuration library for Python.


Why another configuration library? The simple answer is that none of the available options give me everything I want, with an API that I enjoy using. This library provides a lot of powerful functionality, but never at the cost of simplicity.


  • Automatic value conversion.
  • Section nesting.
  • Dict-like access.
  • Single-file module with no dependencies.
  • Extensible input/output formats.
  • Built-in support for INI files and the Windows registry.
  • Preserves ordering and comments of INI files.
  • Full Unicode support.
  • Supports Python 2.7+ and 3.2+.


profig installs using easy_install or pip:

$ pip install profig


Basic usage is cake. Let’s assume our config file looks like this:

host =
port = 9090

First, we specify the defaults and types to expect:

>>> cfg = profig.Config('server.cfg')
>>> cfg.init('', 'localhost')
>>> cfg.init('server.port', 8080)

Then, we sync our current state with the state of the config file:

>>> cfg.sync()

As expected, we can access the updated values without undue effort, either directly:

>>> cfg['']

Or by section. Notice that the type of the port option is preserved:

>>> server_cfg = cfg.section('server')
>>> server_cfg['port']

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 profig, version 0.5.1
Filename, size File type Python version Upload date Hashes
Filename, size profig-0.5.1.tar.gz (17.9 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