{ "info": { "author": "Ben Bangert", "author_email": "ben@groovie.org", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Programming Language :: Python" ], "description": "=====================\nRedis Tools (retools)\n=====================\n\n``retools`` is a package of Redis tools. It's aim is to provide a variety of\nRedis backed Python tools that are always 100% unit tested, fast, efficient,\nand utilize the capabilities of Redis.\n\nCurrent tools in ``retools``:\n\n* Caching\n* Global Lock\n\nOn the horizon for future implementation:\n\n* A worker/job processing system similar to Celery but based on how Ruby's\n Resque system works.\n\n.. image:: https://secure.travis-ci.org/bbangert/retools.png?branch=master\n :alt: Build Status\n :target: https://secure.travis-ci.org/bbangert/retools\n\n\nCaching\n=======\n\nA high performance caching system that can act as a drop-in replacement for\nBeaker's caching. Unlike Beaker's caching, this utilizes Redis for distributed\nwrite-locking dogpile prevention. It also collects hit/miss cache statistics\nalong with recording what regions are used by which functions and arguments.\n\nExample::\n \n from retools.cache import CacheRegion, cache_region, invalidate_function\n \n CacheRegion.add_region('short_term', expires=3600)\n \n @cache_region('short_term')\n def slow_function(*search_terms):\n # Do a bunch of work\n return results\n \n my_results = slow_function('bunny')\n \n # Invalidate the cache for 'bunny'\n invalidate_function(slow_function, [], 'bunny')\n\n\nDifferences from Beaker\n-----------------------\n\nUnlike Beaker's caching system, this is built strictly for Redis. As such, it\nadds several features that Beaker doesn't possess:\n\n* A distributed write-lock so that only one writer updates the cache at a time\n across a cluster.\n* Hit/Miss cache statistics to give you insight into what caches are less\n effectively utilized (and may need either higher expiration times, or just\n not very worthwhile to cache).\n* Very small, compact code-base with 100% unit test coverage.\n\n\nLocking\n=======\n\nA Redis based lock implemented as a Python context manager, based on `Chris\nLamb's example\n`_.\n\nExample::\n \n from retools.lock import Lock\n \n with Lock('a_key', expires=60, timeout=10):\n # do something that should only be done one at a time\n\n\nLicense\n=======\n\n``retools`` is offered under the MIT license.\n\n\nAuthors\n=======\n\n``retools`` is made available by `Ben Bangert`.\n\n\n=========\nChangelog\n=========\n\n0.4.1 (02/19/2014)\n==================\n\nBug Fixes\n---------\n\n- Properly support StrictRedis with ZADD (used in the limiter). Patch by\n Bernardo Heynemann.\n\n0.4 (01/27/2014)\n================\n\nFeatures\n--------\n\n- Added limiter functionality. Pull request #22, by Bernardo Heynemann.\n\n0.3 (08/13/2012)\n================\n\nBug Fixes\n---------\n\n- Call redis.expire with proper expires value for RedisLock. Patch by\n Mike McCabe.\n- Use functools.wraps to preserve doc strings for cache_region. Patch by\n Daniel Holth.\n\nAPI Changes\n-----------\n\n- Added get_job/get_jobs methods to QueueManager class to get information\n on a job or get a list of jobs for a queue.\n\n0.2 (02/01/2012)\n================\n\nBug Fixes\n---------\n\n- Critical fix for caching that prevents old values from being displayed\n forever. Thanks to Daniel Holth for tracking down the problem-aware.\n- Actually sets the Redis expiration for a value when setting the cached\n value in Redis. This defaults to 1 week.\n\nFeatures\n--------\n\n- Statistics for the cache is now optional and can be disabled to slightly\n reduce the Redis queries used to store/retrieve cache data.\n- Added first revision of worker/job Queue system, with event support.\n\nInternals\n---------\n\n- Heavily refactored ``Connection`` to not be a class singleton, instead\n a global_connection instance is created and used by default.\n- Increased conditional coverage to 100% (via instrumental_).\n\nBackwards Incompatibilities\n---------------------------\n\n- Changing the default global Redis connection has changed semantics, instead\n of using ``Connection.set_default``, you should set the global_connection's\n redis property directly::\n\n import redis\n from retools import global_connection\n\n global_connection.redis = redis.Redis(host='myhost')\n\n\nIncompatibilities\n-----------------\n\n- Removed clear argument from invalidate_region, as removing keys from the\n set but not removing the hit statistics can lead to data accumulating in\n Redis that has no easy removal other than .keys() which should not be run\n in production environments.\n\n- Removed deco_args from invalidate_callable (invalidate_function) as its\n not actually needed since the namespace is already on the callable to\n invalidate.\n\n\n0.1 (07/08/2011)\n================\n\nFeatures\n--------\n\n- Caching in a similar style to Beaker, with hit/miss statistics, backed by\n a Redis global write-lock with old values served to prevent the dogpile\n effect\n- Redis global lock\n\n.. _instrumental: http://pypi.python.org/pypi/instrumental", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://readthedocs.org/docs/retools/", "keywords": "cache redis queue lock", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "retools", "package_url": "https://pypi.org/project/retools/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/retools/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://readthedocs.org/docs/retools/" }, "release_url": "https://pypi.org/project/retools/0.4.1/", "requires_dist": null, "requires_python": null, "summary": "Redis Tools", "version": "0.4.1" }, "last_serial": 1005648, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ee08aa116e39513bae3ee5d62419ebfb", "sha256": "f24f2dc71aaff6e51e8935754f27c288d9e05147cbde9a7a12612b069b04bb54" }, "downloads": -1, "filename": "retools-0.1.tar.gz", "has_sig": false, "md5_digest": "ee08aa116e39513bae3ee5d62419ebfb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12547, "upload_time": "2011-07-08T17:45:47", "url": "https://files.pythonhosted.org/packages/bb/44/25ad8b3349541f7f66280522a86d6a707d81b1dc6ddd5736ff8828c9e216/retools-0.1.tar.gz" } ], "0.1dev": [], "0.2": [ { "comment_text": "", "digests": { "md5": "c91a71dda07c0198543da6b43a1de34f", "sha256": "2bb97ca2ccd796e55b3b788692344431a82ea518a67a769e228dc1545d5e1fc6" }, "downloads": -1, "filename": "retools-0.2.tar.gz", "has_sig": false, "md5_digest": "c91a71dda07c0198543da6b43a1de34f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27479, "upload_time": "2012-02-01T21:49:16", "url": "https://files.pythonhosted.org/packages/3b/2c/5c6045a99f4bc9a5dab7968a2fde56e83ec55dc536a9e8e8beec21ab0657/retools-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "5b95c13931664244c0f65273b5a5727b", "sha256": "c9f796ac4a5f5781191504a5ed8aafb87abd8f6734ceb083bd04d19d2f195b96" }, "downloads": -1, "filename": "retools-0.3.tar.gz", "has_sig": false, "md5_digest": "5b95c13931664244c0f65273b5a5727b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28792, "upload_time": "2012-08-14T00:55:27", "url": "https://files.pythonhosted.org/packages/01/45/1dfef2eaca1977ef991a01931f8ac7af6a0ecb6b4fee2d5ed4a106e60bc4/retools-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "45fbed87aedf2f693ab4d850dd876b2a", "sha256": "2a60ce8e9ad34e4c1b124cfa6313b632bf348bb60ad18f853494b4f53e5ab1ff" }, "downloads": -1, "filename": "retools-0.4-py27-none-any.whl", "has_sig": false, "md5_digest": "45fbed87aedf2f693ab4d850dd876b2a", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 30142, "upload_time": "2014-01-29T16:31:31", "url": "https://files.pythonhosted.org/packages/3c/b8/56fcc31b68a9f9e5e3dbccbfb0ddb4e2771d24938b48cf93bba82e6a94bd/retools-0.4-py27-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4fb8863a8279c6cb2db3bd5e33904ff7", "sha256": "906bf2a8b6fc7505397c34fa2e39b8ca580743274486d540c6c34238d0b3746e" }, "downloads": -1, "filename": "retools-0.4.tar.gz", "has_sig": false, "md5_digest": "4fb8863a8279c6cb2db3bd5e33904ff7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31860, "upload_time": "2014-01-29T16:31:26", "url": "https://files.pythonhosted.org/packages/24/04/84cd017b0ffd95bc21bef27eb8f0076bba6d72a1fd4533d52ef6cd11e2d3/retools-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "070cbfc5e826ab366b6504713c88334e", "sha256": "0710b71767be7231b011efcec3dab143dec849d2a1749730ff17d04e7eef049f" }, "downloads": -1, "filename": "retools-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "070cbfc5e826ab366b6504713c88334e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 30854, "upload_time": "2014-02-20T01:50:21", "url": "https://files.pythonhosted.org/packages/7e/2f/30e897852fb15fd9541e2fac8eb533262da97bce4b621e879bf8ef9747f7/retools-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ebecd90e2322e8d72f49f3979431a00", "sha256": "db62e47248d023536ab9b1391381e3c2cd169bc109cf5ae35c5a2e4f7fc54e4b" }, "downloads": -1, "filename": "retools-0.4.1.tar.gz", "has_sig": false, "md5_digest": "7ebecd90e2322e8d72f49f3979431a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32597, "upload_time": "2014-02-20T01:50:19", "url": "https://files.pythonhosted.org/packages/46/f4/12e5d96efa502d44ab7893d87329ebd3a297ed7506cfabee50c46f09dfb8/retools-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "070cbfc5e826ab366b6504713c88334e", "sha256": "0710b71767be7231b011efcec3dab143dec849d2a1749730ff17d04e7eef049f" }, "downloads": -1, "filename": "retools-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "070cbfc5e826ab366b6504713c88334e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 30854, "upload_time": "2014-02-20T01:50:21", "url": "https://files.pythonhosted.org/packages/7e/2f/30e897852fb15fd9541e2fac8eb533262da97bce4b621e879bf8ef9747f7/retools-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ebecd90e2322e8d72f49f3979431a00", "sha256": "db62e47248d023536ab9b1391381e3c2cd169bc109cf5ae35c5a2e4f7fc54e4b" }, "downloads": -1, "filename": "retools-0.4.1.tar.gz", "has_sig": false, "md5_digest": "7ebecd90e2322e8d72f49f3979431a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32597, "upload_time": "2014-02-20T01:50:19", "url": "https://files.pythonhosted.org/packages/46/f4/12e5d96efa502d44ab7893d87329ebd3a297ed7506cfabee50c46f09dfb8/retools-0.4.1.tar.gz" } ] }