Skip to main content

A convenience utility for working with JSON config files.

Project description


Latest Version Development Status Build Status Coverage Status Documentation Status

A convenience utility for working with JSON config files.


  • 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

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


At the command line either via easy_install or pip

$ pip install json_config
$ easy_install json_config

Or, if you have virtualenvwrapper installed

$ mkvirtualenv json_config
$ pip install json_config


$ pip uninstall json_config


To use json_config in a project:

import json_config

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

#OUT: '/var/www/html/'
#OUT:  Connect({'root': '/var/www/html/'})


Tools used in rendering this package:


Next Release

  • Stay tuned

2.0.0 (2016-01-01)

  • BREAKING: (Internal API) connect.block removed

  • BREAKING: (Internal API) connect.write_file renamed to

  • 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.

Download files

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

Source Distribution

json_config-2.0.1.tar.gz (32.6 kB view hashes)

Uploaded source

Built Distribution

json_config-2.0.1-py2.py3-none-any.whl (9.7 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page