Skip to main content

A configuration library.

Project description

profig is a configuration library for Python.


Why another configuration library? The simple answer is that none of the available options gave me everything I wanted, with an API that I enjoyed using. This library is as close to my ideal as I have been able to come. It tries to provide some (but not too much) powerful functionality, without sacrificing simplicity.


  • Automatic value conversion.
  • Simple section nesting.
  • Dict-like access.
  • Easily extensible input/output formats.
  • Preserves ordering and comments of config files.


profig installs easily using easy_install or pip:

$ pip install profig


Basic usage is cake. Assuming 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()

Then we can access the values directly without any extra effort, either directly:

>>> cfg['']

Or by section:

>>> 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.2.8
Filename, size File type Python version Upload date Hashes
Filename, size profig-0.2.8.tar.gz (12.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page