Metadata-Version: 2.0
Name: confing
Version: 0.1.4
Summary: Described configuration for large, complex projects
Home-page: https://github.com/fahhem/confing
Author: Fahrzin Hemmati
Author-email: fahhem@chainreactionmfg.com
License: Apache 2.0
Keywords: confing development
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Requires-Dist: colander (==1.0)
Requires-Dist: setuptools

confing
=======

|Build Status| |Coverage Status| |Documentation Status| |PyPI Version|
|PyPI License|

Described configuration for large, complex projects. `Read the
docs! <http://confing.readthedocs.org/en/latest/>`__

Features
--------

-  Define config keys using a nicer API to colander.
-  Get config values as a callable before loading or directly
   afterwards.
-  Define multiple 'confers' to allow large codebases to be worked on
   independently.

Quick Usage
-----------

Firstly, define the key(s) you want to be in the config file. They can
be any type colander supports, even custom types. Builtin types can be
accessed more easily through the included ``data`` module.

.. code:: python

    import confing
    from confing import data

    confer = confing.getConfer('my_confer_name')
    confer.define(data.String(name='secret_key'))

Next, load the data for the configuration.

.. code:: python

    loaded = confer.load({'secret_key': '...'})
    loaded is confer.loaded

Lastly, get the key you want out of the config.

.. code:: python

    confer.loaded.secret_key
    # or
    confer.loaded['secret_key']

If you need to pass a configuration value to something either at
module-import time or before the config is loaded, you can pass it a
callable that will be the correct value once the config is loaded later.
This will only work if the receiving party doesn't attempt to resolve
the value before the config is loaded.

\`\`python confer.as\_callable('secret\_key') \`\`\`

Install for development
-----------------------

.. code:: bash

    $ pip install --editable .

Contributing
------------

Anyone can help make this project better - read
`CONTRIBUTION <CONTRIBUTION.md>`__ to get started!

License
-------

Apache 2.0. See the `LICENSE <LICENSE>`__ file for more details.

.. |Build Status| image:: https://img.shields.io/travis/chainreactionmfg/confing/master.svg
   :target: https://travis-ci.org/chainreactionmfg/confing
.. |Coverage Status| image:: https://img.shields.io/coveralls/chainreactionmfg/confing/master.svg
   :target: https://coveralls.io/r/chainreactionmfg/confing
.. |Documentation Status| image:: https://readthedocs.org/projects/confing/badge/?version=latest&style=flat
   :target: https://readthedocs.org/projects/confing/?badge=latest
.. |PyPI Version| image:: https://img.shields.io/pypi/v/confing.svg
   :target: https://pypi.python.org/pypi/confing
.. |PyPI License| image:: https://img.shields.io/pypi/l/confing.svg
   :target: https://pypi.python.org/pypi/confing


