This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

configclass - A Python to class to hold configuration values

A Config is a dict with a where:

  • existing items can be modified but no items can not be added
  • has make() method so you can easily created derived configs
  • make() has the same API as dict.update()
  • make() will merge values according to mergedict.ConfigDict.merge()
  • for convenience, make can take a None to perform a simple copy
>>> from configclass import Config

>>> c1 = Config({'a': 1, 'b': ['foo']})

# can't add new items to config
>>> c1.make({'a':2, 'c': [2]})
Traceback (most recent call last):
KeyError: 'New items can not be added to Config, invalid key:c'

# new config object created
>>> c2 = c1.make({'a':2})
>>> c2
Config({'a': 2, 'b': ['foo']})

# original object is not modified
>>> c1
Config({'a': 1, 'b': ['foo']})

# make() can take keyword arguments, note how lists are merged
>>> c2.make(b=['bar'])
Config({'a': 2, 'b': ['foo', 'bar']})

configclass.ConfigMixin can be used to create a Config class that is not based on mergedict.ConfigDict. Check unittests for usage.

Project Details

license

The MIT License Copyright (c) 2014 Eduardo Naufel Schettino

see LICENSE file

developers / contributors

  • Eduardo Naufel Schettino

install

$ pip install configclass

or download and:

$ python setup.py install

tests

Install dependencies in dev_requirements.txt.

To run the tests:

$ py.test
Release History

Release History

0.1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
configclass-0.1.0.tar.gz (3.2 kB) Copy SHA256 Checksum SHA256 Source Jul 21, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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