{ "info": { "author": "Nycholas de Oliveira e Oliveira", "author_email": "nycholas@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Flask JSON-RPC\r\n==============\r\n\r\nA basic JSON-RPC implementation for your Flask-powered sites based on `django-json-rpc `_.\r\n\r\nSome reasons you might want to use:\r\n\r\n* Simple, powerful, flexible and pythonic API.\r\n* Support python 2.7, `3.3 or later `_\r\n* The Web browseable API.\r\n* Support for authentication.\r\n* Proxy to test your JSON Service.\r\n* Run-time type checking.\r\n* Extensive documentation, and great community support.\r\n\r\nFor support python 2.6.5+ or earlier use the branch `py2k `_.\r\n\r\nThere is a live example API for testing purposes, `available here `_.\r\n\r\n**Below:** *Screenshot from the browsable API*\r\n\r\n.. image:: https://f.cloud.github.com/assets/298350/1575590/203c595a-5150-11e3-99a0-4a6fd9bcbe52.png\r\n\r\nAdding Flask JSON-RPC to your application\r\n*****************************************\r\n\r\n1. Installation\r\n\r\n::\r\n\r\n $ pip install Flask-JSONRPC\r\n\r\nor\r\n\r\n::\r\n\r\n $ git clone git://github.com/cenobites/flask-jsonrpc.git\r\n $ cd flask-jsonrpc\r\n $ python setup.py install\r\n\r\n\r\n2. Getting Started\r\n\r\nCreate your application and initialize the Flask-JSONRPC.\r\n\r\n::\r\n\r\n from flask import Flask\r\n from flask_jsonrpc import JSONRPC\r\n\r\n app = Flask(__name__)\r\n jsonrpc = JSONRPC(app, '/api')\r\n\r\nWrite JSON-RPC methods.\r\n\r\n::\r\n\r\n @jsonrpc.method('App.index')\r\n def index():\r\n return u'Welcome to Flask JSON-RPC'\r\n\r\nAll code of Example `run.py `_.\r\n\r\n\r\n3. Running\r\n\r\n::\r\n\r\n $ python run.py\r\n * Running on http://0.0.0.0:5000/\r\n\r\n\r\n4. Testing\r\n\r\n::\r\n\r\n $ curl -i -X POST \\\r\n -H \"Content-Type: application/json; indent=4\" \\\r\n -d '{\r\n \"jsonrpc\": \"2.0\",\r\n \"method\": \"App.index\",\r\n \"params\": {},\r\n \"id\": \"1\"\r\n }' http://localhost:5000/api\r\n HTTP/1.0 200 OK\r\n Content-Type: application/json\r\n Content-Length: 77\r\n Server: Werkzeug/0.8.3 Python/2.7.3\r\n Date: Fri, 14 Dec 2012 19:26:56 GMT\r\n\r\n {\r\n \"jsonrpc\": \"2.0\",\r\n \"id\": \"1\",\r\n \"result\": \"Welcome to Flask JSON-RPC\"\r\n }\r\n\r\n\r\nTesting your service\r\n********************\r\n\r\nYou can test your service using the provided web browsable API, available at http://localhost:5000/api/browse (if using the url patterns from above) or with the included ServiceProxy:\r\n\r\n::\r\n\r\n >>> from flask_jsonrpc.proxy import ServiceProxy\r\n >>> server = ServiceProxy('http://localhost:5000/api')\r\n >>>\r\n >>> server.App.index()\r\n {'jsonrpc': '2.0', 'id': '91bce374-462f-11e2-af55-f0bf97588c3b', 'result': 'Welcome to Flask JSON-RPC'}\r\n\r\nWe add the ``jsonrpc_version`` variable to the request object. It be either '1.0', '1.1' or '2.0'. Arg.\r\n\r\nFor more tests see `Examples `_.\r\n\r\n\r\nReferencies\r\n***********\r\n\r\n* http://docs.python.org/\r\n* http://flask.pocoo.org/docs/\r\n* http://lucumr.pocoo.org/2011/1/22/forwards-compatible-python/\r\n* http://flask.pocoo.org/docs/python3/#python3-support\r\n* http://www.jsonrpc.org/\r\n\r\n\r\nDependecies\r\n***********\r\n\r\n* Python (2.6.5+), (2.7, 3.3) or later (http://www.python.org)\r\n* Flask 0.10 or later (http://flask.pocoo.org)\r\n\r\n\r\nProject Information\r\n*******************\r\n\r\n:Author: Cenobit Technologies, Inc.\r\n:Version: v0.3 of 2015/08/10\r\n:License: `New BSD License `_", "description_content_type": null, "docs_url": "https://pythonhosted.org/Flask-JSONRPC/", "download_url": "https://github.com/cenobites/flask-jsonrpc/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cenobites/flask-jsonrpc", "keywords": "", "license": "New BSD License", "maintainer": "", "maintainer_email": "", "name": "Flask-JSONRPC", "package_url": "https://pypi.org/project/Flask-JSONRPC/", "platform": "any", "project_url": "https://pypi.org/project/Flask-JSONRPC/", "project_urls": { "Download": "https://github.com/cenobites/flask-jsonrpc/archive/master.zip", "Homepage": "https://github.com/cenobites/flask-jsonrpc" }, "release_url": "https://pypi.org/project/Flask-JSONRPC/0.3.1/", "requires_dist": null, "requires_python": null, "summary": "Adds JSONRPC support to Flask.", "version": "0.3.1" }, "last_serial": 2111486, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "14316af2a8b29aa7bea24e8911e03224", "sha256": "03d531268531a99a26a714579ef32a1cda30fa14789fdb15eb3096c534a91125" }, "downloads": -1, "filename": "Flask-JSONRPC-0.1.tar.gz", "has_sig": false, "md5_digest": "14316af2a8b29aa7bea24e8911e03224", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10207, "upload_time": "2012-12-16T23:06:03", "url": "https://files.pythonhosted.org/packages/44/d3/d306a6cf9e12fb7eea5b444556346b42e2f545d78ef902882242823664d6/Flask-JSONRPC-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "f748dd75fc057e675e352421ee53e037", "sha256": "60fa63b76f191f84baa392c9f2c97e50155ce739e68f0e044d745aa85049f5e0" }, "downloads": -1, "filename": "Flask-JSONRPC-0.2.tar.gz", "has_sig": false, "md5_digest": "f748dd75fc057e675e352421ee53e037", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 677782, "upload_time": "2014-03-28T14:31:39", "url": "https://files.pythonhosted.org/packages/ac/01/3e3714cdff1877de5430f5f0c61e64c059f28de753c1f6e30b4e195828bd/Flask-JSONRPC-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "a5beca4c3a882315f9b81acb57e83c68", "sha256": "5baf70bf9cf955e95c02316982026a122b89a5f4c78c5b26f9f476abdb3e13bc" }, "downloads": -1, "filename": "Flask-JSONRPC-0.3.tar.gz", "has_sig": false, "md5_digest": "a5beca4c3a882315f9b81acb57e83c68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 679449, "upload_time": "2015-08-10T19:14:51", "url": "https://files.pythonhosted.org/packages/fb/92/e31d27e75fddf9fd1f3c6ace653b3fd9801d1468f6b9fa4c8a8595fad479/Flask-JSONRPC-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "5c0592f53b2f18e34d5be435acee8842", "sha256": "4d0cc9c20874093306af91f5a48009fb8659a041428dcdb11703598ffbbc97d0" }, "downloads": -1, "filename": "Flask-JSONRPC-0.3.1.tar.gz", "has_sig": false, "md5_digest": "5c0592f53b2f18e34d5be435acee8842", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 680495, "upload_time": "2016-05-11T21:22:34", "url": "https://files.pythonhosted.org/packages/cb/1f/e6d66e8498609ba04bac76155b2ea884df95531e93501bf4ef009d40a83c/Flask-JSONRPC-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5c0592f53b2f18e34d5be435acee8842", "sha256": "4d0cc9c20874093306af91f5a48009fb8659a041428dcdb11703598ffbbc97d0" }, "downloads": -1, "filename": "Flask-JSONRPC-0.3.1.tar.gz", "has_sig": false, "md5_digest": "5c0592f53b2f18e34d5be435acee8842", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 680495, "upload_time": "2016-05-11T21:22:34", "url": "https://files.pythonhosted.org/packages/cb/1f/e6d66e8498609ba04bac76155b2ea884df95531e93501bf4ef009d40a83c/Flask-JSONRPC-0.3.1.tar.gz" } ] }