{ "info": { "author": "James Milne", "author_email": "james.milne@protonmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# bottlepratchett\n\nA very simple middleware that provides GNU Terry Pratchett.\n\n---\n\nIn one of Terry Pratchett's novels, he proposes three things, that following his death, so more technically inclined fans have grabbed onto.\n\n1. The clacks\n2. The GNU instruction to the clacks (G: Send message on, N: Do not log the message, U: At the end of the line, send the message back again)\n3. \"A man is not dead while his name is still spoken.\"\n\nSo, in that friendly spirit...\n\nA header, applied to all connections, ('X-Clacks-Overhead': 'GNU Terry Pratchett'), so that he may never be forgotten.\n\n---\n\nThis plugin designed for Bottle gives you just that.\n\n```\nimport bottle\nimport bottlepratchett\n\nbottle.install(bottlepratchett.wrap)\n\n@bottle.get('/')\ndef index():\n return 'Hello'\n\nbottle.run()\n```\n\nOnce you've installed the plugin with ```bottle.install``` it should become available on every new call to your route. (Bottle plugins are installed on the first call per route, and then cached.)\n\nSo... If we were to use curl, we could get:\n\n```\n> curl -I localhost:8080\nHTTP/1.0 200 OK\nDate: Wed, 23 Jan 2019 01:55:00 GMT\nServer: WSGIServer/0.2 CPython/3.7.2\nX-Clacks-Overhead: GNU Terry Pratchett\nContent-Length: 5\nContent-Type: text/html; charset=UTF-8\n```\n\nOur header has been successfully installed.\n\n---\n\n## License\n\nCopyright 2019, James Milne\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\n***THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.***\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://git.sr.ht/~shakna/bottlepratchett", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "botttlepratchett", "package_url": "https://pypi.org/project/botttlepratchett/", "platform": "", "project_url": "https://pypi.org/project/botttlepratchett/", "project_urls": { "Homepage": "https://git.sr.ht/~shakna/bottlepratchett" }, "release_url": "https://pypi.org/project/botttlepratchett/1.0.0/", "requires_dist": [ "bottle (>=0.12.1)" ], "requires_python": "", "summary": "A middleware for Bottle that provides GNU Terry Pratchett", "version": "1.0.0" }, "last_serial": 4728713, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "24fd46410be81dd744098cff67cb2264", "sha256": "f9dbd2189a0f24482003192cde6d707a48a3a3a6f7b58ca7cc0326cbfe269faa" }, "downloads": -1, "filename": "botttlepratchett-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "24fd46410be81dd744098cff67cb2264", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3000, "upload_time": "2019-01-23T02:02:41", "url": "https://files.pythonhosted.org/packages/ab/b2/7c40f0f46eed956fb31f665ede1394ac06c6854a3f5918a147e498a6ace6/botttlepratchett-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1834bbc6b234b3b58092eceb2252c807", "sha256": "3fb32f418721e32a8b26d076bd51a97202110c58fb6970c310014b19fe7e5a58" }, "downloads": -1, "filename": "botttlepratchett-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1834bbc6b234b3b58092eceb2252c807", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2866, "upload_time": "2019-01-23T02:02:55", "url": "https://files.pythonhosted.org/packages/0c/81/b54f55f7278c5812b568447752ac805e9e6fadf3e821228fefead2761b29/botttlepratchett-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "24fd46410be81dd744098cff67cb2264", "sha256": "f9dbd2189a0f24482003192cde6d707a48a3a3a6f7b58ca7cc0326cbfe269faa" }, "downloads": -1, "filename": "botttlepratchett-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "24fd46410be81dd744098cff67cb2264", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3000, "upload_time": "2019-01-23T02:02:41", "url": "https://files.pythonhosted.org/packages/ab/b2/7c40f0f46eed956fb31f665ede1394ac06c6854a3f5918a147e498a6ace6/botttlepratchett-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1834bbc6b234b3b58092eceb2252c807", "sha256": "3fb32f418721e32a8b26d076bd51a97202110c58fb6970c310014b19fe7e5a58" }, "downloads": -1, "filename": "botttlepratchett-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1834bbc6b234b3b58092eceb2252c807", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2866, "upload_time": "2019-01-23T02:02:55", "url": "https://files.pythonhosted.org/packages/0c/81/b54f55f7278c5812b568447752ac805e9e6fadf3e821228fefead2761b29/botttlepratchett-1.0.0.tar.gz" } ] }