{ "info": { "author": "Chris Ziogas", "author_email": "ziogas_chr@hotmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Plugins", "Framework :: Bottle", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "bottle-memcache-decorator\r\n=========================\r\n\r\nThis bottle-memcache-decorator plugin adds a memcache decorator in your Bottle\r\napplication. It automatically stores the route result to memcache for routes\r\nwhere the bottle-memcache plugin is enabled.\r\n\r\n\r\nRequired\r\n===============\r\n\r\nThe bottle-extras and bottle_memcache plugins are required to be installed before this plugin.\r\n\r\n\r\nInstallation\r\n===============\r\n\r\nInstall with one of the following commands::\r\n\r\n $ pip install bottle-memcache-decorator\r\n $ easy_install bottle-memcache-decorator\r\n\r\nor download the latest version from github::\r\n\r\n $ git clone git://github.com/ziogaschr/bottle-memcache-decorator.git\r\n $ cd bottle-memcache-decorator\r\n $ python setup.py install\r\n\r\n\r\nUsage\r\n===============\r\n\r\n import bottle\r\n from bottle.ext import memcache\r\n from bottle_memcache_decorator import MemcacheDecoratorPlugin\r\n\r\n app = bottle.Bottle()\r\n\r\n keyword = 'mc'\r\n\r\n # install memcache plugin\r\n memcache_plugin = memcache.MemcachePlugin(keyword=keyword)\r\n app.install(memcache_plugin)\r\n\r\n # install the memcache decorator\r\n memcache_decorator_plugin = MemcacheDecoratorPlugin(\r\n memcache_keyword=keyword,\r\n memcache_expire_time='mc_expire_time',\r\n memcache_compress_level_keyword='mc_compress_level')\r\n app.install(memcache_decorator_plugin)\r\n\r\n # for example in this route we will set the expire time = 3600 sec\r\n # and compression level = 3\r\n @app.get('/:name', mc_expire_time=3600, mc_dec_compress_level=3)\r\n def show(name, mc):\r\n # your code here\r\n\r\n return result\r\n\r\n if __name__ == '__main__':\r\n run(app, host='0.0.0.0', port=8080, debug=True)\r\n\r\n\r\nConfiguration\r\n=============\r\n\r\n MemcacheDecoratorPlugin(\r\n memcache_keyword='mc',\r\n memcache_expire_time='mc_expire_time',\r\n memcache_compress_level_keyword='mc_compress_level')\r\n\r\n**memcache_keyword**: is the keyword set/used for the memcache plugin\r\n\r\n**memcache_expire_time**: defines the router argument responsible for setting the memcache expire time\r\n\r\n**memcache_compress_level_keyword**: defines the router argument responsible for setting the memcache compression level", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/ziogaschr/bottle-memcache-decorator/tarball/v0.0.1#egg=ziogaschr/bottle-memcache-decorator-0.0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ziogaschr/bottle-memcache-decorator", "keywords": "Bottle Plugin Memcache Decorator", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "bottle-memcache-decorator", "package_url": "https://pypi.org/project/bottle-memcache-decorator/", "platform": "any", "project_url": "https://pypi.org/project/bottle-memcache-decorator/", "project_urls": { "Download": "https://github.com/ziogaschr/bottle-memcache-decorator/tarball/v0.0.1#egg=ziogaschr/bottle-memcache-decorator-0.0.1", "Homepage": "http://github.com/ziogaschr/bottle-memcache-decorator" }, "release_url": "https://pypi.org/project/bottle-memcache-decorator/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Adds a memcache decorator in your Bottle application. It automatically stores the route result to memcache for routes where the bottle-memcache plugin is enabled.", "version": "0.0.1" }, "last_serial": 926809, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "bec96aa1ce7e7313705a4ebb5919b928", "sha256": "6865e99330d282605e90d0eff3eb5a26af30f9f6e0dbcfac7e3ad56dd32d9bc8" }, "downloads": -1, "filename": "bottle-memcache-decorator-0.0.1.tar.gz", "has_sig": false, "md5_digest": "bec96aa1ce7e7313705a4ebb5919b928", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4169, "upload_time": "2013-11-22T20:19:13", "url": "https://files.pythonhosted.org/packages/2c/58/443bef2153f2f9c1315f9d646773fa403cc5c17847c6a3e92456c73ad3d4/bottle-memcache-decorator-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bec96aa1ce7e7313705a4ebb5919b928", "sha256": "6865e99330d282605e90d0eff3eb5a26af30f9f6e0dbcfac7e3ad56dd32d9bc8" }, "downloads": -1, "filename": "bottle-memcache-decorator-0.0.1.tar.gz", "has_sig": false, "md5_digest": "bec96aa1ce7e7313705a4ebb5919b928", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4169, "upload_time": "2013-11-22T20:19:13", "url": "https://files.pythonhosted.org/packages/2c/58/443bef2153f2f9c1315f9d646773fa403cc5c17847c6a3e92456c73ad3d4/bottle-memcache-decorator-0.0.1.tar.gz" } ] }