jsonfig

Simple JSON auto-reloading configuration
Download

jsonfig Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Price:
  • FREE
  • Publisher Name:
  • Rick Branson
  • Publisher web site:
  • http://github.com/rbranson/

jsonfig Tags


jsonfig Description

jsonfig is a simple autoreloading configuration files in JSON. Will use the very fast UltraJSON library for parsing if available.Installationpip install jsonfigUsageCreate a JSON file whose root is a dictionary:{ "always_load_user_data": true, "use_new_feature_123": false, "feature_456_chance": 0.20}Now it can be loaded as a dictionary:>>> config = jsonfig.from_path("example.json")>>> config0.20By default, when the file is changed, it will be automatically reloaded within one second:{ "always_load_user_data": true, "use_new_feature_123": false, "feature_456_chance": 1.0}Now the new value will show up in the config structure:>>> config1.0Product's homepage


jsonfig Related Software