json_config 2.0.1
A convenience utility for working with JSON config files.
License: MIT
Keywords: json_config Manu Phatak

.. START Source defined in docs/github_docs.py


.. This document was procedurally generated by docs/github_docs.py on Friday, January 01, 2016


.. END Source defined in docs/github_docs.py
.. START Source defined in docs/github_docs.py


.. role:: mod(literal)
.. role:: func(literal)
.. role:: data(literal)
.. role:: const(literal)
.. role:: class(literal)
.. role:: meth(literal)
.. role:: attr(literal)
.. role:: exc(literal)
.. role:: obj(literal)
.. role:: envvar(literal)


.. END Source defined in docs/github_docs.py
.. START Source defined in docs/source/_partial/readme_title.rst

===========
json_config
===========

.. image:: https://badge.fury.io/py/json_config.svg
    :target: https://pypi.python.org/pypi/json_config/
    :alt: Latest Version

.. image:: https://img.shields.io/pypi/status/json_config.svg
    :target: https://pypi.python.org/pypi/json_config/
    :alt: Development Status

.. image:: https://travis-ci.org/bionikspoon/json_config.svg?branch=develop
    :target: https://travis-ci.org/bionikspoon/json_config?branch=develop
    :alt: Build Status

.. image:: https://coveralls.io/repos/bionikspoon/json_config/badge.svg?branch=develop
    :target: https://coveralls.io/github/bionikspoon/json_config?branch=develop&service=github
    :alt: Coverage Status

.. image:: https://readthedocs.org/projects/json_config/badge/?version=develop
    :target: https://json_config.readthedocs.org/en/develop/?badge=develop
    :alt: Documentation Status


A convenience utility for working with JSON config files.


.. END Source defined in docs/source/_partial/readme_title.rst
.. START Source defined in docs/source/_partial/readme_features.rst

Features
--------

- Documentation: https://json_config.readthedocs.org
- Open Source: https://github.com/bionikspoon/json_config
- MIT license

..

- Automatically syncs file on changes.
- Automatically handles complicated nested data structures.
- Designed to be easily extended.  Use different serializer libraries to easily switch to yaml, ini, etc.
- Lightweight (<5KB) and Fast.
- Takes advantage of Python's native dictionary syntax.
- Tested against python 2.6, 2.7, 3.3, 3.4, 3.5, and PYPY!
- Unit Tested with high coverage.
- Idiomatic, self-descriptive code & api

.. code-block:: python

    >>> import json_config
    >>> config = json_config.connect('categories.json')
    >>> config
    Connect({})
    >>> config['comics']['dc']['batman']['antagonists'] = ['Scarecrow', 'The Joker', 'Bane']
    >>> config['comics']['marvel']['ironman']['antagonists'] = 'Ultron'
    >>> print(config.serialize())
    {
      "comics": {
        "dc": {
          "batman": {
            "antagonists": [
              "Scarecrow",
              "The Joker",
              "Bane"
            ]
          }
        },
        "marvel": {
          "ironman": {
            "antagonists": "Ultron"
          }
        }
      }
    }



.. END Source defined in docs/source/_partial/readme_features.rst
.. START Source defined in docs/source/installation.rst


============
Installation
============

At the command line either via easy_install or pip

.. code-block:: shell

    $ pip install json_config



.. code-block:: shell

    $ easy_install json_config

Or, if you have virtualenvwrapper installed

.. code-block:: shell

    $ mkvirtualenv json_config
    $ pip install json_config

**Uninstall**

.. code-block:: shell

    $ pip uninstall json_config



.. END Source defined in docs/source/installation.rst
.. START Source defined in docs/source/usage.rst

=====
Usage
=====

To use json_config in a project:

.. code-block:: python

    import json_config

    config = json_config.connect('config.json')
    config['root'] = '/var/www/html/'

    print(config['root'])
    #OUT: '/var/www/html/'
    config
    #OUT:  Connect({'root': '/var/www/html/'})


.. END Source defined in docs/source/usage.rst
.. START Source defined in docs/source/_partial/readme_credits.rst

Credits
-------

Tools used in rendering this package:

*  Cookiecutter_
*  `bionikspoon/cookiecutter-pypackage`_ forked from `audreyr/cookiecutter-pypackage`_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`bionikspoon/cookiecutter-pypackage`: https://github.com/bionikspoon/cookiecutter-pypackage
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


.. END Source defined in docs/source/_partial/readme_credits.rst


.. START Source defined in docs/github_docs.py


.. This document was procedurally generated by docs/github_docs.py on Friday, January 01, 2016


.. END Source defined in docs/github_docs.py
.. START Source defined in docs/github_docs.py


.. role:: mod(literal)
.. role:: func(literal)
.. role:: data(literal)
.. role:: const(literal)
.. role:: class(literal)
.. role:: meth(literal)
.. role:: attr(literal)
.. role:: exc(literal)
.. role:: obj(literal)
.. role:: envvar(literal)


.. END Source defined in docs/github_docs.py
.. START Source defined in docs/source/history.rst

=======
History
=======

Next Release
------------
- Stay tuned

2.0.0 (2016-01-01)
------------------
- BREAKING: (Internal API) ``connect.block`` removed
- BREAKING: (Internal API) ``connect.write_file`` renamed to ``connect.save``
- Feature: Rewrote the entire library to encapsulate logic
- Feature: Extendable serializer contract, to allow any config format.
- Feature: Upgrade to stable.
- Feature: Removed threading in favor of a smarter locking mechanism
- Feature: Add support for py26 and py35
- Feature: Pin dependencies
- Feature: Reorganized package and tests
- Fix: Updated doc builds
- Fix: Readme badge links
- 2.0.1: Fix: Failed deploy (travis requirements)


1.2.0 (2015-05-18)
------------------

- Feature: Improved compatibility to py27, py32, py33, py34, and pypy
- Feature: Supports multiple config files.
- Feature: Writes less, smarter logic on deciding if a write is necessary.
- Feature: Delegates writes to a background process.
- Testing: Renamed tests to be more descriptive of expectations.
- Testing: Added a bunch of tests describing different scenarios.
- Massive Refactoring

1.1.0 (2015-04-15)
------------------

- Massive improvement to documentation and presentation.

1.0.0 (2015-04-13)
------------------

- First working version.

0.1.0 (2015-04-11)
------------------

- First release on PyPI.


.. END Source defined in docs/source/history.rst