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!

Pythonic Hierarchical Configuration parser

Project Description

Sample config:

# a value is set with: key : value
# values are typed. allowed types are:
#  - string (simple or double quotes)
#  - boolean (True or False. is case sensitive)
#  - integer

strval : 'this is a string'
boolval: True
intval : 142

# you can define hierarchies with dictionaries
# ! no comma to se
orgchart : {
    boss : 'Mr Goldmine'

    head_office : {
        VP  : 'Miz dho'
        CTO : 'John Bugs'
    }
}

Loaded from python:

>>> import pyerconf
>>> cfg = pyerconf.Config('./sample.cfg')
>>> print cfg.strval
this is a string
>>> print cfg.orgchart.boss
Mr Goldmine
>>> print cfg.orgchart.head_office
{'VP': 'Miz dho', 'CTO': 'John Bugs'}

>>> print cfg.foobar
AttributeError

Release History

This version
History Node

0.1.0

Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
pyerconf-0.1.0.tar.gz
(16.0 kB) Copy SHA256 Hash SHA256
Source None Oct 27, 2011

Supported By

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 Google Google Cloud Servers DreamHost DreamHost Log Hosting