{ "info": { "author": "Alec Nikolas Reiter", "author_email": "alecreiter@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.4", "Topic :: Text Processing" ], "description": ".. :readme:\n\nJSONConfigParser\n================\n\nA JSON config editor built on top of\n`jsonpath-rw. `__.\n\nInstallation\n------------\n\nSimple as ``pip install --user jsonconfigparser``\n\nUse\n---\n\nRight now there is an example of building a CLI utility in the examples\ndirectory.\n\nIt can also be used programmatically as well by importing the\n``JSONConfigParser`` class and the commands modules.\n\nCLI App\n~~~~~~~\n\nThis is built with argparse. Using it is as simple as:\n\n::\n\n jsonconf path/to/conf.json view -p $\n\nThat command will view the entire JSON file. Other actions include:\n\n+------------+-----------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| command | description | |\n+============+=========================================================================================================================================+==========================================================================================================================================================================================================================+\n| addfile | Concatenates a second JSON file onto the current. Warning: This will overwrite any shared keys. | ``jsonconf conf.json addfile -o path/to/other.json`` |\n+------------+-----------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| addfield | Adds a key and value to a specified JSONPath | ``jsonconf conf.json addfield -p $.name -v jsonconfigparser`` |\n+------------+-----------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| append | Appends a value to the specified JSONPath. Optionally, converts the field to another type. Optionally, apply to every found endpoint. | ``jsonconf conf.json append -p $.things.[0] -v \"Star bellied sneeches\"`` ``jsonconf conf.json append -p $.products.hats -v \"23.44\" -t float`` ``jsonconf conf.json append -p $.products.[*].descript -v \"A thing\" -m`` |\n+------------+-----------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| delete | Deletes an item from the specific JSONPath. | ``jsonconf conf.json delete $.products.hats`` |\n+------------+-----------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| edit | Reset the value at the endpoint of the JSONPath | ``jsonconf conf.json edit -p $.products.hats.descript -v \"A really cool hat.\"`` |\n+------------+-----------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| shell | Drop into the interactive prompt. | ``jsonconf conf.json shell`` |\n+------------+-----------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n\nArguments:\n\n+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| flags | description |\n+================+==========================================================================================================================================================================================================+\n| -p/--path | The path flag the only acceptable value is a JSONPath string |\n+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| -o/--other | The other file flag, used with addfile to concatenate files together |\n+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| -v/--value | The value flag, used with any action that requires a value |\n+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| -m/--multi | The multi boolean flag. Currently only used with append action. Defaults to false, if True append will add the value to every path found |\n+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| -c/--convert | The conversion flag. Currently only used with append. Defaults to False. If passed, a value must be provided of ``int``, ``float``, ``list``, ``dict``, ``bool``,\\ ``str`` or some combination of them |\n+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n\nInteractive Shell Prompt\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis is built with readlines. To enter it, simply run\n``jsonconf path/to/conf.json shell``\n\nExecuting commands is exactly the same as on the command line, except\nthe shell can't be reinstantiated inside itself.\n\nTo exit, two consecutive keyboard interrupts are needed. If a command is\nrun between them, then the exit flag is reset.\n\nThere is also an extra method available in the shell ``write`` which\nsaves the current state of the file.\n\nTodo:\n-----\n\nThere are several things that I want to do, small and big:\n\n- Apply the multiflag where needed.\n- Clean up the whole package up and turn what I can into\n classes/objects.\n- Ability to write to a different file for CLI and Shell.\n\n.. :changelog:\n\n0.1.2 (2014-10-13)\n+++++++++++++++++\n\n* Fixed nested dictionary shim.\n* More robust error handling in shell (still pretty fragile though)\n\n0.1.0 (2014-10-12)\n++++++++++++++++++\n\n* PyPI Launch (holy crap: `pip3 install jsonconfigparser`)\n* Minimum viable package (still plenty of errors and features to touch though)\n* CLI functionality moved into main app\n* Interactive Prompt functionality merged into master\n* Several Bug Fixes:\n - Shim for nesting dictionaries.\n - Consolidated string for root node in several modules\n\n0.0.7 (2014-10-12)\n++++++++++++++++++\n\n* Basic interactive prompt\n - Tab complete for commands\n - Added write command for prompt use\n - Handle exiting script with ^C followed by ^C again.\n* Better type conversion support\n* Moved CLI into package\n* Improved docstrings on functions\n\n0.0.5 (2014-11-12)\n++++++++++++++++++\n\n* Cleaned up commands module\n* Added `act_on_path` and `set_on_path` functions\n* Added initialization options on ``JSONConfigParser``\n - `storage`: A filepath to write to\n - `source`: Initial file to read from\n* Replaced fragile, custom value parsing with more robust ``shlex.split``\n* Tests added!\n* Sorted out some imports\n* Initial implementation of conversion functionality\n* Updated CLI example\n\n0.0.3 (2014-10-08)\n++++++++++++++++++\n\n* Added JSONpath support\n* Added function registry with `command` and `call` support\n\n0.0.1 (2014-10-07)\n++++++++++++++++++\n\n* Initial concept", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/justanr/JSONConfigParser", "keywords": "CLI json config", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "jsonconfigparser", "package_url": "https://pypi.org/project/jsonconfigparser/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/jsonconfigparser/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/justanr/JSONConfigParser" }, "release_url": "https://pypi.org/project/jsonconfigparser/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Quick and easy editting of JSON files.", "version": "0.1.2" }, "last_serial": 1268910, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ef8fd8c362153fa013fcb1db1a7247a0", "sha256": "3db9127310f20e232c7444e689363cebdf1451782f332f0ef4d10361428ea921" }, "downloads": -1, "filename": "jsonconfigparser-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ef8fd8c362153fa013fcb1db1a7247a0", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 10809, "upload_time": "2014-10-13T02:16:14", "url": "https://files.pythonhosted.org/packages/f3/67/e499c84f282dab1a6fbf0241d7ec9adc9bbe334ee41b48cf6d7e4c8c1504/jsonconfigparser-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "29e35b9c2e4594456e1f70ed3152263a", "sha256": "2a1e1ce551b68e6190763a710a94249c6d2dc8dd1683f151641bf67bd812db22" }, "downloads": -1, "filename": "jsonconfigparser-0.1.0.tar.gz", "has_sig": false, "md5_digest": "29e35b9c2e4594456e1f70ed3152263a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8306, "upload_time": "2014-10-13T02:16:05", "url": "https://files.pythonhosted.org/packages/2a/a7/fd4b21fdd6eeeb65863619bd3c4c43ce4c3c939864fd7b019aa1bb38a27a/jsonconfigparser-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "809dbb31ccb3cd941a785c0eab28262e", "sha256": "8183804676862eb29be08ad3570e6b2f22bd6b60bf59080a886008c457ea19a8" }, "downloads": -1, "filename": "jsonconfigparser-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "809dbb31ccb3cd941a785c0eab28262e", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 13636, "upload_time": "2014-10-13T02:51:19", "url": "https://files.pythonhosted.org/packages/fe/62/9cc3b11ae0c790742c00a709f7e2800ca073d42b85be637e18717c8e10c4/jsonconfigparser-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c79a9f9001418f6b0aa7d5f5cabcfebb", "sha256": "2b0fdbd726bccee76e5ecd771826ef6e89b6a49f5e4491cad0c6ee94f52e3414" }, "downloads": -1, "filename": "jsonconfigparser-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c79a9f9001418f6b0aa7d5f5cabcfebb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10913, "upload_time": "2014-10-13T02:51:09", "url": "https://files.pythonhosted.org/packages/68/1e/1ef6ea16ad44c76d639fd24f1252a798fe9b8192c4b5933127e4bdf57137/jsonconfigparser-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f60e192715abe2cbf346012c5f5f62ca", "sha256": "4eb7378d3042f5bf814532d6864dfa152c0e60f9810797c5b56ae7069a2c5605" }, "downloads": -1, "filename": "jsonconfigparser-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f60e192715abe2cbf346012c5f5f62ca", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 15222, "upload_time": "2014-10-13T17:13:04", "url": "https://files.pythonhosted.org/packages/8c/88/650aeb6b6e7e2ccded07202231b7711aa1812903dd53e56e01799cca5235/jsonconfigparser-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "10dccd9495c948a700966927f47d00d3", "sha256": "979fe0a8fe7080ed41aef24416e38392d29b1573a5bd997f4b13e46868e2930b" }, "downloads": -1, "filename": "jsonconfigparser-0.1.2.tar.gz", "has_sig": false, "md5_digest": "10dccd9495c948a700966927f47d00d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12457, "upload_time": "2014-10-13T17:12:53", "url": "https://files.pythonhosted.org/packages/89/3f/5aa090f1d4edd18333b516403019f116faf93f1f50e1bc150c9ab0174f17/jsonconfigparser-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f60e192715abe2cbf346012c5f5f62ca", "sha256": "4eb7378d3042f5bf814532d6864dfa152c0e60f9810797c5b56ae7069a2c5605" }, "downloads": -1, "filename": "jsonconfigparser-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f60e192715abe2cbf346012c5f5f62ca", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 15222, "upload_time": "2014-10-13T17:13:04", "url": "https://files.pythonhosted.org/packages/8c/88/650aeb6b6e7e2ccded07202231b7711aa1812903dd53e56e01799cca5235/jsonconfigparser-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "10dccd9495c948a700966927f47d00d3", "sha256": "979fe0a8fe7080ed41aef24416e38392d29b1573a5bd997f4b13e46868e2930b" }, "downloads": -1, "filename": "jsonconfigparser-0.1.2.tar.gz", "has_sig": false, "md5_digest": "10dccd9495c948a700966927f47d00d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12457, "upload_time": "2014-10-13T17:12:53", "url": "https://files.pythonhosted.org/packages/89/3f/5aa090f1d4edd18333b516403019f116faf93f1f50e1bc150c9ab0174f17/jsonconfigparser-0.1.2.tar.gz" } ] }