{ "info": { "author": "Joe Hillenbrand", "author_email": "joehillen@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "*********************************************\nJSONRPCake: a CLI JSON-RPC client for humans.\n*********************************************\n\n\nJSONRPCake is a **command line JSON-RPC client**\nthat wraps the jsonrpc-ns library.\nIt is a fork of `HTTPie`_ written by `Jakub Roztocil`_.\nIts goal is to make CLI interaction\nwith `JSON-RPC`_ 2.0 services as **human-friendly** as possible. It provides a\nsimple ``jsonrpc`` command that allows for sending arbitrary `JSON-RPC`_ requests using a\nsimple and natural syntax, and displays colorized responses. JSONRPCake can be used\nfor **testing, debugging**, and generally **interacting** with `JSON-RPC`_ servers.\n\nJSONRPCake is written in Python, and under the hood it uses the\n`jsonrpc-ns`_ and `Pygments`_ libraries.\n\n\n**Table of Contents**\n\n\n.. contents::\n :local:\n :depth: 1\n :backlinks: none\n\n\n=============\nMain Features\n=============\n\n* Expressive and intuitive syntax\n* Formatted and colorized terminal output\n* Built-in JSON support\n* Arbitrary request data\n\n\n============\nInstallation\n============\n\nThe latest **stable version** of JSONRPCake can always be installed or updated\nto via `pip`_:\n\n.. code-block:: bash\n\n $ pip install --upgrade jsonrpcake\n\n\n=====\nUsage\n=====\n\n\nHello World:\n\n\n.. code-block:: bash\n\n $ jsonrpc example.org:3000 hello\n\n\nSynopsis:\n\n.. code-block:: bash\n\n $ jsonrpc ADDRESS:PORT METHOD [PARAMETER [PARAMETER [...]]]\n\nSee also ``jsonrpc --help``.\n\n\n--------\nExamples\n--------\n\n`JSON`_ params:\n\n.. code-block:: bash\n\n $ jsonrpc example.org:3000 update name=John uid:=1234\n\n\n=========================\nJSON-RPC Address and Port\n=========================\n\nThe address and port are separated by a ':'.\nThe TCP port is **required**. When the address **omitted**,\nthe default address is ``localhost``.\n\n.. code-block:: bash\n\n $ jsonrpc :3000 users\n\nIs equivalent to:\n\n.. code-block:: bash\n\n $ jsonrpc localhost:3000 users\n\n\n===============\nJSON-RPC Method\n===============\n\nThe name of the JSON-RPC method comes right after the address and port:\n\n.. code-block:: bash\n\n $ jsonrpc example.org:3000 users\n\n\nThe ``METHOD`` argument is **required**.\n\n\n=============\nParameters\n=============\n\nJSON parameters are key/value pairs specified after the ```METHOD```.\nThe parameter type is distinguished only by the separator used:\n``:``, ``=``, ``:=``, ``==``, ``@``, ``=@``, and ``:=@``. The ones with an\n``@`` expect a file path as value.\n\n+-----------------------+-----------------------------------------------------+\n| Item Type | Description |\n+=======================+=====================================================+\n| Data Fields | Request data fields to be serialized as a JSON |\n| ``field=value``, | object (default). |\n+-----------------------+-----------------------------------------------------+\n| Raw JSON fields | Useful when sending JSON and one or |\n| ``field:=json``, | more fields need to be a ``Boolean``, ``Number``, |\n| ``field:=@file.json`` | nested ``Object``, or an ``Array``, e.g., |\n| | ``meals:='[\"ham\",\"spam\"]'`` or ``pies:=[1,2,3]`` |\n| | (note the quotes). |\n+-----------------------+-----------------------------------------------------+\n\n\n================\nRedirected Input\n================\n\n**A universal method for passing request parameters is through redirected** ``stdin``\n(standard input). Such data is buffered and then with no further processing\nused as the request body. There are multiple useful ways to use piping:\n\nRedirect from a file:\n\n.. code-block:: bash\n\n $ jsonrpc example.com:7080 add.user < person.json\n\n\nYou can use ``echo`` for simple data:\n\n.. code-block:: bash\n\n $ echo '{\"uid\": 1234, \"name\": \"John\"}' | jsonrpc example.com:3000 update.userinfo\n\n\nYou can use ``cat`` to enter multiline data on the terminal:\n\n.. code-block:: bash\n\n $ cat | jsonrpc example.com:3000 update\n \n ^D\n\n\nTo prevent JSONRPCake from reading ``stdin`` data you can use the\n``--ignore-stdin`` option.\n\n\n=================\nTerminal Output\n=================\n\nJSONRPCake does several things by default in order to make its terminal output\neasy to read.\n\n\n---------------------\nColors and Formatting\n---------------------\n\nSyntax highlighting is applied to the response (where it makes\nsense). You can choose your prefered color scheme via the ``--style`` option\nif you don't like the default one (see ``$ jsonrpc --help`` for the possible\nvalues).\n\nAlso, the following formatting is applied:\n\n* JSON data is indented, sorted by keys, and unicode escapes are converted\n to the characters they represent.\n\nOne of these options can be used to control output processing:\n\n==================== ========================================================\n``--pretty=all`` Apply both colors and formatting.\n Default for terminal output.\n``--pretty=colors`` Apply colors.\n``--pretty=format`` Apply formatting.\n``--pretty=none`` Disables output processing.\n Default for redirected output.\n==================== ========================================================\n\n\n=================\nRedirected Output\n=================\n\nJSONRPCake uses **different defaults** for redirected output than for\n`terminal output`_:\n\n* Formatting and colors aren't applied (unless ``--pretty`` is specified).\n* Only the response message is printed.\n\nForce colorizing and formatting, and show both the request and the response in\n``less`` pager:\n\n.. code-block:: bash\n\n $ jsonrpc --pretty=all --verbose example.org:7080 info | less -R\n\n\nThe ``-R`` flag tells ``less`` to interpret color escape sequences included\nJSONRPCake`s output.\n\n\n=======\nAuthors\n=======\n\nForked by `Joe Hillenbrand`_\n\n`Jakub Roztocil`_ created `HTTPie`_ and `these fine people`_\nhave contributed.\n\n=======\nLicence\n=======\n\nPlease see `LICENSE`_.\n\n\n------------\n\n\n.. _JSON-RPC: http://www.jsonrpc.org/specification\n.. _JSON: http://www.json.org/\n.. _HTTPie: https://github.com/jkbr/httpie\n.. _these fine people: https://github.com/jkbr/httpie/contributors\n.. _jsonrpc-ns: https://github.com/flowroute/jsonrpc-ns\n.. _Pygments: http://pygments.org/\n.. _pip: http://www.pip-installer.org/en/latest/index.html\n.. _Jakub Roztocil: http://subtleapps.com\n.. _Joe Hillenbrand: http://joehillen.org\n.. _LICENSE: https://github.com/joehillen/jsonrpcake/blob/master/LICENSE", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/joehillen/jsonrpcake", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "jsonrpcake", "package_url": "https://pypi.org/project/jsonrpcake/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/jsonrpcake/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/joehillen/jsonrpcake" }, "release_url": "https://pypi.org/project/jsonrpcake/1.1.0/", "requires_dist": null, "requires_python": null, "summary": "JSONRPCake - a CLI JSON-RPC client for humans.", "version": "1.1.0" }, "last_serial": 1091224, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "f300146ff994e8e4520200cddfa4e23e", "sha256": "7129fd37c8cc3c9d603dd328e6498a84ee3c9fd361894be78978548f331be1a5" }, "downloads": -1, "filename": "jsonrpcake-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f300146ff994e8e4520200cddfa4e23e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15025, "upload_time": "2014-02-11T08:45:41", "url": "https://files.pythonhosted.org/packages/76/af/0da1b478660979d1811f15c3ab8e5f3ca9e052f8257da0da368eb2cf6117/jsonrpcake-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "3afc1e3d788f3606ba07e5fb75ab16eb", "sha256": "3f400c8ef1041b14fab1ec74ff4c9ac6562abcd2fb9be3b85b809d6bd8e46d94" }, "downloads": -1, "filename": "jsonrpcake-1.1.0.tar.gz", "has_sig": false, "md5_digest": "3afc1e3d788f3606ba07e5fb75ab16eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14813, "upload_time": "2014-05-13T19:27:51", "url": "https://files.pythonhosted.org/packages/ab/7f/0d335f988756ac65762324807d543f18215035b845484e09fadd6cab5edb/jsonrpcake-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3afc1e3d788f3606ba07e5fb75ab16eb", "sha256": "3f400c8ef1041b14fab1ec74ff4c9ac6562abcd2fb9be3b85b809d6bd8e46d94" }, "downloads": -1, "filename": "jsonrpcake-1.1.0.tar.gz", "has_sig": false, "md5_digest": "3afc1e3d788f3606ba07e5fb75ab16eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14813, "upload_time": "2014-05-13T19:27:51", "url": "https://files.pythonhosted.org/packages/ab/7f/0d335f988756ac65762324807d543f18215035b845484e09fadd6cab5edb/jsonrpcake-1.1.0.tar.gz" } ] }