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!

Dead simple configuration file parser.

Project Description


simpleconfig is a Python module that reads INI files into a dictionary. It is both Python 2 and Python 3 compatible.


I’ve written this code several times for a couple projects; I got sick of copying the file over to new project directories.


Both a parse and parse_string function are provided. The former parses config files, and the latter parses a config file serialised into a string.

return value and example

Both parse() and parse_string return a dictionary (see below) where each section is a key at the top level, and is a dictionary of key=value pairs itself. For example, given the config file:

>>> config = """
# random version information
version = 1.0.5

; last modified 1 April 2001 by John Doe
; example taken from wikipedia
name=John Doe
organization=Acme Widgets Inc.

# use IP address in case network name resolution is not working

Parsing this with simpleconfig yields:

>>> import simpleconfig as sc
>>> cfg = sc.parse_string(config)
>>> cfg['owner']['name']
'John Doe'
'John Doe'

Note that the dictionary type returned by the parse functions is actually a kutils.dicts.AttrDictDict, which is derived from the dict type and can be used wherever a dict can.


simpleconfig is released under an ISC license.


simpleconfig was written by Kyle Isom <>.


The module is only tested for compatibility against Python 2.7 and Python 3.3+. There are no guarantees (or attempts) at compatibility with previous version of Python.

The docs are on RTD.

The source for simpleconfig is online:

Release History

Release History

This version
History Node


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
simpleconfig-2.0-py2-none-any.whl (4.9 kB) Copy SHA256 Checksum SHA256 py2 Wheel Jun 22, 2017
simpleconfig-2.0-py3-none-any.whl (4.9 kB) Copy SHA256 Checksum SHA256 py3 Wheel Jun 22, 2017
simpleconfig-2.0.tar.gz (2.6 kB) Copy SHA256 Checksum SHA256 Source Jun 22, 2017

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