{ "info": { "author": "Garindra Prahandono", "author_email": "garindraprahandono@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "pycacher [![Build Status](https://secure.travis-ci.org/garindra/pycacher.png)](https://secure.travis-ci.org/garindra/pycacher.png)\n=======\n\nPython module for easy function caching decoration, batching, and many more.\n\nComplete documentation on:\n[http://pycacher.readthedocs.org](http://pycacher.readthedocs.org) (still empty)\n\n###PyPi Page\n[http://pypi.python.org/pypi/pycacher](http://pypi.python.org/pypi/pycacher)\n\n###Installation\nThis package is officially hosted on PyPI, so what you need to do is simply:\n\n pip install pycacher\n\n###Examples:\n\n\n##### #1 Caching function decorator:\n\n from pycacher import Cacher\n\n cacher = Cacher('localhost', 11211)\n\n @cacher.cache() \n def expensive_function(a, b):\n return a + b\n\n expensive_function(1, 2) # will actually execute\n expensive_function(1, 2) # will get the value from the cache\n\n##### #2 Batching:\n\n \n batcher = cacher.create_batcher()\n\n batcher.add('test-1')\n batcher.add('test-2')\n batcher.add('test-3')\n\n batcher.batch()\n \n batcher.get_values()\n >> {'test-1':'test-value-1', 'test-2':'test-value-2', 'test-3' : None} \n\n##### #3 Batching Context Manager:\n\n\n batcher = cacher.create_batcher()\n\n with batcher:\n #expensive_function is a pycacher-decorated function.\n expensive_function.register(1, 2) \n expensive_function.register(1, 3)\n \n #batches the cache key of both those 2 function register calls.\n batcher.batch()\n\n with batcher:\n expensive_function(1, 2) #will get its value directly from the batched value\n expensive_function(1, 3)\n\nYou can see more advanced examples on the [documentation](http://pycacher.readthedocs.org).\n\n###Prerequisites\n\n`pycacher` is currently well tested on Python 2.5, 2.6 and 2.7.\n\n###Run unit tests\nIf you have the `nose` Python unit tester library installed and want to run the unit test suite for this library, then simply run this command:\n nosetests\n\n###Travis CI\nYou can track the project's CI status on Travis at : [http://travis-ci.org/#!/garindra/pycacher](http://travis-ci.org/#!/garindra/pycacher)\n\n###License\nMIT 2.0\n\n###Authors:\n- Garindra Prahandono (garindraprahandono@gmail.com)", "description_content_type": null, "docs_url": null, "download_url": "http://cloud.github.com/downloads/garindra/pycacher/pycacher-0.0.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pycacher.readthedocs.org", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "pycacher", "package_url": "https://pypi.org/project/pycacher/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pycacher/", "project_urls": { "Download": "http://cloud.github.com/downloads/garindra/pycacher/pycacher-0.0.2.tar.gz", "Homepage": "http://pycacher.readthedocs.org" }, "release_url": "https://pypi.org/project/pycacher/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "pycacher is a python module which enables easy caching layer via function decorators, batcher, etc.", "version": "0.0.2" }, "last_serial": 803203, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d237cf031f763f176afa3625a6698eee", "sha256": "e8f54faa105588937820b61f0f203951ccd0c5c5e935b824dbf843f611d6be72" }, "downloads": -1, "filename": "pycacher-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d237cf031f763f176afa3625a6698eee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4896, "upload_time": "2012-08-06T11:32:45", "url": "https://files.pythonhosted.org/packages/b6/be/beeb261093fe841da0885a8759b0d3f2179cf8ecaeb35079234ee456b27d/pycacher-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "834321ea7441c0ef7f9610ea2fb7ccef", "sha256": "24eee0aaec7dce1abdb286a84d1c1a5f808428475c2a6eba0a28a44c56f3a264" }, "downloads": -1, "filename": "pycacher-0.0.2.tar.gz", "has_sig": false, "md5_digest": "834321ea7441c0ef7f9610ea2fb7ccef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5224, "upload_time": "2012-08-07T13:47:53", "url": "https://files.pythonhosted.org/packages/5b/4f/31fa390114d08dc562fdfa388b1f7449f6daec935de99a67494930750324/pycacher-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "834321ea7441c0ef7f9610ea2fb7ccef", "sha256": "24eee0aaec7dce1abdb286a84d1c1a5f808428475c2a6eba0a28a44c56f3a264" }, "downloads": -1, "filename": "pycacher-0.0.2.tar.gz", "has_sig": false, "md5_digest": "834321ea7441c0ef7f9610ea2fb7ccef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5224, "upload_time": "2012-08-07T13:47:53", "url": "https://files.pythonhosted.org/packages/5b/4f/31fa390114d08dc562fdfa388b1f7449f6daec935de99a67494930750324/pycacher-0.0.2.tar.gz" } ] }