{ "info": { "author": "Alec Elton", "author_email": "alec.elton@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# bottle-utils\n\nReusable components for bottle\n\n## Responses\n\n### Plugin response.JsonResponsePlugin\n\nThe JSON response plugin is a plugin that provides three main features:\n\n * Returns dict or list responses as a JSON object: {\"result\": }\n * If the response is a dict containing either \"result\" or \"error\", the result is returned as-is\n * Catches HTTPResponse exceptions (including the subclass HTTPError) and formats them as a JSON object: {\"error\": {\"code\": , \"message\": }}\n * Provides an error handler that can be used to replace the standard error handler with one that returns JSON objects\n * The handler must be manually applied for each error code to each app, except as shown below\n\n## SQLAlchemy\n\nThe SQLAlchemy package must be installed, and is NOT a requirement of this package as a whole! Make sure it is installed or ImportError will be raised.\n\n### Plugin sqlalchemy.SQLAlchemyNotFoundPlugin\n\nThe SQLAlchemy not found plugin converts SQLAlchemy not found exceptions to 404s. Apply within the JsonResponsePlugin to turn not found objects into a nicely formatted JSON error message.\n\n### Plugin sqlalchemy.SQLAlchemySession\n\nGiven an sqlalchemy engine in the constructor, this plugin creates bottle.request.sa_session that can be used for querying. This results in a new session for each thread/request. The kwarg \"autocommit\" may also be passed, turning automatic commits on or off (default: True)\n\n## Apps\n\n### Function apps.setup\n\nSet up a collection of apps. The function accepts the following arguments:\n\n * main_app (required): \"main\" app on which other apps are mounted\n * sub_apps (optional): List containing either plain application instances (which are not mounted anywhere) or lists containing [app, mountpoint], where the app is mounted to main_app at mountpoint. The main_app is automatically added to this list - do not add it yourself.\n * plugins (optional): list of plugins to install to all apps\n * error_handlers (optional): List containing either error handler callbacks, or lists containing [range, handler] where handler is applied to all error codes in range (default range is 300-599)\n * error_handler_generators (optional): List containing either methods that generate error handler callbacks, or lists containing [range, handler_generator] where handler_generator(code) is applied to all error codes in range (default range is 300-599)\n\nerror_handler_generators can be used to apply the JSON response error handler:\n setup(mainapp, [otherapp], error_handler_generators = [JsonResponsePlugin.getErrorHandler])", "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/BasementCat/bottle-utils", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "bottleutils", "package_url": "https://pypi.org/project/bottleutils/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bottleutils/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/BasementCat/bottle-utils" }, "release_url": "https://pypi.org/project/bottleutils/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "Reusable components for bottle", "version": "0.1.5" }, "last_serial": 1877070, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "81c08ac99f0891c74698e8bfd0eb1ec5", "sha256": "630ab69f7e036a6303a539eb41b63119d3ba7f8d5fffa695b142660e804e8feb" }, "downloads": -1, "filename": "bottleutils-0.1.tar.gz", "has_sig": false, "md5_digest": "81c08ac99f0891c74698e8bfd0eb1ec5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3569, "upload_time": "2014-09-05T22:25:23", "url": "https://files.pythonhosted.org/packages/98/24/ed157a050573b29958d5974ad4d4bd53ad48e029126d9b58d5d29d9fa256/bottleutils-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0de171e5f849834bb14224cbda4ea29e", "sha256": "0ee2dd29cb4e611a283de1f413785ddc5b674d5aa5c58e1b13d18af49976496b" }, "downloads": -1, "filename": "bottleutils-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0de171e5f849834bb14224cbda4ea29e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3571, "upload_time": "2015-12-20T01:45:26", "url": "https://files.pythonhosted.org/packages/55/dc/b8df3ae673870784ca5c053c614a7fd2b6c8931e35c7fc92a9d174cc2632/bottleutils-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "ada2976ecea4b011285311ea088e7085", "sha256": "b1aba14033f5cd05e742b90c778c6cb8d115c83d363f55e6a64cb7cf4a9dbf6c" }, "downloads": -1, "filename": "bottleutils-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ada2976ecea4b011285311ea088e7085", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4119, "upload_time": "2015-12-20T04:13:12", "url": "https://files.pythonhosted.org/packages/bf/e2/e9a2e3a13d603bc489dfa91aaea90b872ea003da720a330ce7f86bff3c91/bottleutils-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "4ee473bb2fe493a7d1aa2369f396ad97", "sha256": "8ec30e3f68f5e1812c6e96c35ba62cb698d9750896cc365032b0a2315cc250f4" }, "downloads": -1, "filename": "bottleutils-0.1.3.tar.gz", "has_sig": false, "md5_digest": "4ee473bb2fe493a7d1aa2369f396ad97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4203, "upload_time": "2015-12-20T22:02:06", "url": "https://files.pythonhosted.org/packages/9d/10/a511a234312b5a09ff31e09c1e88f285aa3c67516e1223ad7cc87d7810ff/bottleutils-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "a7062e1d81be7272d8e102cb6641d437", "sha256": "ab2bc1d48a1ecbfbf33d5993a8c9cf372914e9f3421ba94cc86f6d1142c5b00d" }, "downloads": -1, "filename": "bottleutils-0.1.4.tar.gz", "has_sig": false, "md5_digest": "a7062e1d81be7272d8e102cb6641d437", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4352, "upload_time": "2015-12-24T03:49:51", "url": "https://files.pythonhosted.org/packages/6b/d9/8593dd9ef68bc16d21dc820d0aa95dfee8753b2fdaa697f4ced5adf7dea6/bottleutils-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "e23f9cc3aa3c8d86f1efb29b810dea09", "sha256": "7c0f7183674f9662c14932c382680ce1f365c47365035ce47216288ffbad7660" }, "downloads": -1, "filename": "bottleutils-0.1.5.tar.gz", "has_sig": false, "md5_digest": "e23f9cc3aa3c8d86f1efb29b810dea09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4432, "upload_time": "2015-12-25T01:52:12", "url": "https://files.pythonhosted.org/packages/a5/58/2475fec4042d1868b71b063aaaf435a08b56f4ae18188fe06f79b5ceadff/bottleutils-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e23f9cc3aa3c8d86f1efb29b810dea09", "sha256": "7c0f7183674f9662c14932c382680ce1f365c47365035ce47216288ffbad7660" }, "downloads": -1, "filename": "bottleutils-0.1.5.tar.gz", "has_sig": false, "md5_digest": "e23f9cc3aa3c8d86f1efb29b810dea09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4432, "upload_time": "2015-12-25T01:52:12", "url": "https://files.pythonhosted.org/packages/a5/58/2475fec4042d1868b71b063aaaf435a08b56f4ae18188fe06f79b5ceadff/bottleutils-0.1.5.tar.gz" } ] }