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

COnfig File MANipluation library

Project Description

“manipulations and lies”

🚯 About

Manipulate simple configuration files in a, relatively, intelligent fashion.

Given a simple configuration file, cofman.lib provides a means to edit the file using a dictionary-like interface:

import cofman.lib

config = cofman.lib.File("/etc/sysctl.conf")
>>> config['kern.sysv.shmmin']
# given permission =)
>>> config['kern.sysv.shmmin'] = "100"

Every dictionary operation reads from the file, so using this as a cache is not appropriate. Usually, only the cofman.lib.File.update and cofman.lib.File.getset methods should be used to interact with the configuration. The other operations are provided for convenience.

By default, the configuration file is assumed to use the following delimiters:

config = {
        'quote': "'",
        'quote_escape': "''",
        'comment': "#",
        'assignment': '=',
        'record': '\n',


The value side of the settings are unconditionally quoted when modified.


cofman was not written with performance in mind. It is designed for common case editing that does not occur often enough to warrant heavy optimizations.

Release History

Release History

This version
History Node


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
cofman-0.1.0.tar.gz (9.5 kB) Copy SHA256 Checksum SHA256 Source Aug 28, 2012

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