{ "info": { "author": "Aron Bartling", "author_email": "aron@bustleandflurry.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Plugins", "Framework :: Bottle", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Internet" ], "description": "=====================\nbottle-api-json-formatting\n=====================\n\nA Bottle plugin which encapsulates results and errors in a json object. This \nmakes it much easier to build REST based api services with bottle. \n\n\nInstallation\n===============\n\nInstall with one of the following commands:\n```bash\n$ pip install bottle-api-json-formatting\n$ easy_install bottle-api-json-formatting\n```\nor download the latest version from github:\n```bash\n$ git clone git://github.com/bustleandflurry/bottle-api-json-formatting.git\n$ cd bottle-api-json-formatting\n$ python setup.py install\n```\n\n\nUsage\n===============\n```python\nimport bottle\nimport bottle_api_json_formatting\n\napp = bottle.Bottle()\napp.install(bottle_api_json_formatting.JsonFormatting())\n\n@app.route('/')\ndef index():\n return 'This is a test.'\n\n@APP.route('/error')\ndef index():\n raise Exception('This is an error.')\n\nif __name__ == '__main__':\n run(app, host='0.0.0.0', port=8080, debug=True)\n```\n\n\nOutput\n=============\n\nStandard:\n```\n{\n \"status\": \"success\", \n \"status_code\": 0, \n \"data\": \"test\"\n}\n```\n\nError:\n```\n{\n \"status\": \"error\", \n \"status_code\": 1, \n \"data\": null, \n \"error\": {\n \"status\": \"500 Internal Server Error\", \n \"status_code\": 500, \n \"message\": \"Internal Server Error\"\n }\n}\n```\n\n\nModule Contents\n=============\n\nbottle\\_api\\_json\\_formatting.**JsonFormatting**(*supported\\_types=*['\\*/\\*'], *debug=False*)\n\n*supported\\_types* allows you to expressly set which Content-Types are acceptable for a json formatted response. When set any Content-Types not in the will be passed through untouched. \n\n*debug* set to True will add the fields exception and traceback to error responses.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.bustleandflurry.com", "keywords": "Bottle Plugin JSON", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "bottle-api-json-formatting", "package_url": "https://pypi.org/project/bottle-api-json-formatting/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bottle-api-json-formatting/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.bustleandflurry.com" }, "release_url": "https://pypi.org/project/bottle-api-json-formatting/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "A bottle plugin to json format standard and error responses. Intended for REST APIs.", "version": "0.1.1" }, "last_serial": 933854, "releases": { "0.0.5": [ { "comment_text": "built for Linux-3.9.3-x86-linode52-i686-with-glibc2.0", "digests": { "md5": "14c36f27a37265b24085c3e165bf7464", "sha256": "a237fb3935a60c57d3f4563e1846154722e6a2fba1f61b28fb218090b071e85d" }, "downloads": -1, "filename": "bottle-api-json-formatting-0.0.5.linux-i686.tar.gz", "has_sig": false, "md5_digest": "14c36f27a37265b24085c3e165bf7464", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 4613, "upload_time": "2013-08-20T20:52:02", "url": "https://files.pythonhosted.org/packages/64/f7/94dd479e05b9a4d5565dab4c1c54d56b450053e6f622c787667f5c167821/bottle-api-json-formatting-0.0.5.linux-i686.tar.gz" }, { "comment_text": "", "digests": { "md5": "4851cbf768a35be5af7a64124a593907", "sha256": "d5eb98396b6fed4df0347281971bdd5ca497ab75d6c62d0aa703b54355c65ad5" }, "downloads": -1, "filename": "bottle-api-json-formatting-0.0.5.tar.gz", "has_sig": false, "md5_digest": "4851cbf768a35be5af7a64124a593907", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3125, "upload_time": "2013-08-20T20:53:36", "url": "https://files.pythonhosted.org/packages/09/27/08c24aa23d858f7da8e8f5df3705811fd2fc7dd78a1591fb8ada6b2a996e/bottle-api-json-formatting-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "built for Linux-3.9.3-x86-linode52-i686-with-glibc2.0", "digests": { "md5": "89eac1ea722a9d8e25eae272fb8c9fdc", "sha256": "8369afbca3bff0ed61c56475fea8b4c664de3ae61f1feb8b7a0b03880ac77109" }, "downloads": -1, "filename": "bottle-api-json-formatting-0.0.6.linux-i686.tar.gz", "has_sig": false, "md5_digest": "89eac1ea722a9d8e25eae272fb8c9fdc", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 4617, "upload_time": "2013-08-20T20:56:35", "url": "https://files.pythonhosted.org/packages/7c/1c/492336135f7f72a8c06e516f11ac75eda897c041d0f1f6bd9d5137eab65c/bottle-api-json-formatting-0.0.6.linux-i686.tar.gz" }, { "comment_text": "", "digests": { "md5": "6594d670bbb785fa1604462d064f1221", "sha256": "fa8533ac02a3ef63a66ffbe73c89c02e4bce3cd947b593fbbaa685ade334c96e" }, "downloads": -1, "filename": "bottle-api-json-formatting-0.0.6.tar.gz", "has_sig": false, "md5_digest": "6594d670bbb785fa1604462d064f1221", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3123, "upload_time": "2013-08-20T20:56:32", "url": "https://files.pythonhosted.org/packages/5c/08/ba6d6a1cda6c6965825ee206cc385c5370d567752f1e911669f6d4438c0c/bottle-api-json-formatting-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "0a9a4ce7adc208be4320f7fa5225b712", "sha256": "5b8dadbb2b9bc1d7b861d977ab6d3122fce7283d0ce1a2631b9a72e1980d07a2" }, "downloads": -1, "filename": "bottle-api-json-formatting-0.0.7.tar.gz", "has_sig": false, "md5_digest": "0a9a4ce7adc208be4320f7fa5225b712", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3120, "upload_time": "2013-08-20T21:04:30", "url": "https://files.pythonhosted.org/packages/de/25/112e11689c702327065b91a06aa96ce8a82a90040a8e7cbc05073669c2a4/bottle-api-json-formatting-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "f9789dd327a465428d21c64a8138bb68", "sha256": "f3eb2ea281f5a398795055b6e7de55e2ed59aa880149eb414e581a747b096dd0" }, "downloads": -1, "filename": "bottle-api-json-formatting-0.0.8.tar.gz", "has_sig": false, "md5_digest": "f9789dd327a465428d21c64a8138bb68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3352, "upload_time": "2013-08-20T21:16:19", "url": "https://files.pythonhosted.org/packages/e8/29/ef84f348f25ad5966bbc49deca7f6e13c06c58313cf4ad77624dedf08d65/bottle-api-json-formatting-0.0.8.tar.gz" } ], "0.1.1": [ { "comment_text": "built for Linux-3.9.3-x86-linode52-i686-with-glibc2.0", "digests": { "md5": "bbb6ad26a330cb9080b2a15570a56997", "sha256": "b83eac9208f92215884bef71257f296e22e4eca23a7e71abaef20d67a2512698" }, "downloads": -1, "filename": "bottle-api-json-formatting-0.1.1.linux-i686.tar.gz", "has_sig": false, "md5_digest": "bbb6ad26a330cb9080b2a15570a56997", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 5874, "upload_time": "2013-12-02T14:24:51", "url": "https://files.pythonhosted.org/packages/8c/7f/51b79b3a7b62d89c0d9587c7ff5a0309fcfe261a658aa0e6b3f32af36c2e/bottle-api-json-formatting-0.1.1.linux-i686.tar.gz" }, { "comment_text": "", "digests": { "md5": "124a2d558b605acc653101452c4ea17f", "sha256": "d253e323a7500b20b86e2ad4e5aff6c61c4f910f754cee274e84ca580d8387bf" }, "downloads": -1, "filename": "bottle-api-json-formatting-0.1.1.tar.gz", "has_sig": false, "md5_digest": "124a2d558b605acc653101452c4ea17f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3979, "upload_time": "2013-12-02T14:27:07", "url": "https://files.pythonhosted.org/packages/89/f9/09381e84d4fa59843dcf6ff45cb00f71d5ffeb1f180fc5215ed383b94c7e/bottle-api-json-formatting-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "built for Linux-3.9.3-x86-linode52-i686-with-glibc2.0", "digests": { "md5": "bbb6ad26a330cb9080b2a15570a56997", "sha256": "b83eac9208f92215884bef71257f296e22e4eca23a7e71abaef20d67a2512698" }, "downloads": -1, "filename": "bottle-api-json-formatting-0.1.1.linux-i686.tar.gz", "has_sig": false, "md5_digest": "bbb6ad26a330cb9080b2a15570a56997", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 5874, "upload_time": "2013-12-02T14:24:51", "url": "https://files.pythonhosted.org/packages/8c/7f/51b79b3a7b62d89c0d9587c7ff5a0309fcfe261a658aa0e6b3f32af36c2e/bottle-api-json-formatting-0.1.1.linux-i686.tar.gz" }, { "comment_text": "", "digests": { "md5": "124a2d558b605acc653101452c4ea17f", "sha256": "d253e323a7500b20b86e2ad4e5aff6c61c4f910f754cee274e84ca580d8387bf" }, "downloads": -1, "filename": "bottle-api-json-formatting-0.1.1.tar.gz", "has_sig": false, "md5_digest": "124a2d558b605acc653101452c4ea17f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3979, "upload_time": "2013-12-02T14:27:07", "url": "https://files.pythonhosted.org/packages/89/f9/09381e84d4fa59843dcf6ff45cb00f71d5ffeb1f180fc5215ed383b94c7e/bottle-api-json-formatting-0.1.1.tar.gz" } ] }