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

loadconfig is a tool to simplify configuration management

We live in an incredible moment in software history. As never before, the quality and quantity of excellent open source software have unleashed massive advances in pretty much all fields of human knowledge. It is overwhelming to have such vast posibilities, and often having a hard time trying to understand how the pieces fit together. More importantly, we are concern on how can we use the software for things that matter to us.

Plenty of times we find what is really needed is a small custom configuration we can easily understand and a handful ways to run the software. And although we barely think about it as we are too busy trying to understand all the bells and whistles, the interface and documentation is at the center of any software.

loadconfig syntax is designed to be clean and DRY, to foster descriptive programming, and to leverage version control systems. loadconfig can be used as a light wrapper around programs to make them behave and to document them the way we designed.

>>> from loadconfig import Config
>>> c = Config('greeter: Hi there')
>>> c
{greeter: Hi there}

>>> c.greeter
'Hi there'
$ loadconfig -E="greeter: Welcome to the loadconfig documentation"
export GREETER="Welcome to the loadconfig documentation"

Technical description

loadconfig dynamically creates a python configuration ordered dictionary from sources like the command line, configuration files and yaml strings that can be used in python code and shell scripts. Dependencies are pyyaml and clg.

Installation

Installation is straightforward using a wheel from pypi:

pip install loadconfig

Alternatively, install from github:

pip install git+https://github.com/mzdaniel/loadconfig

Local test/build

Assumptions for this section: A unix system, python2.7 or 3.4, and pip >= 6.1. Although git is recommended, it is not required.

loadconfig is hosted on github:

# Download the project using git
git clone https://github.com/mzdaniel/loadconfig
cd loadconfig

# or from a tarball
wget -O- https://github.com/mzdaniel/loadconfig/archive/0.1.tar.gz | tar xz
cd loadconfig

For a simple way to run the tests with minimum dependencies, tests/runtests.sh is provided. Note: python programs and libraries depend on the environment where it is run. At a minimun, it is adviced to run the tests and build process in a virtualenv. tox is the recommended way to run loadconfig tests and build its package:

# Install loadconfig dependencies and pytest
pip install -r requirements.txt pytest

# Run the tests
./tests/runtests.sh

For building a universal pip installable wheel, pbr is used:

# Install setup.py dependencies if needed.
pip install pbr wheel

# Build loadconfig package
python setup.py bdist_wheel

We use tox to test loadconfig in virtualenvs for both python2.7 and python3.4. Tox is a generic virtualenv management and test command line tool. It handles the creation of virtualenvs with proper python dependencies for testing, pep8 checking, coverage and building:

# Install the only tox dependency if needed (tox takes care of any other
# needed dependency using pip)
pip install tox

# Run tests, create coverage report and build universal loadconfig package
# loadconfig package is left in dist/
tox

If you are curious, loadconfig buildbot continuos integration server shows the tox tests and build runs for each commit and pull requests done in the loadconfig repo.

Security

Disclosure: loadconfig is meant for both flexibility and productivity. It does not attempt to be safe with untrusted input. There are ways (linux containers, PyPy’s sandboxing) that can be implemented for such environments and left for the user to consider.

Thanks!

Release History

Release History

0.1.1

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

0.1

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

0.1b1

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

0.0.9

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

0.0.8

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

0.0.7

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
loadconfig-0.1.1-py2.py3-none-any.whl (16.1 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Aug 28, 2015
loadconfig-0.1.1.tar.gz (12.9 kB) Copy SHA256 Checksum SHA256 Source Aug 28, 2015

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