{ "info": { "author": "fanwei.zeng", "author_email": "stayblank@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# redis-funnel\n\nA distributed funnel middleware based on redis, management ui included.\n\n## Installation\n\nYou can install `redis-funnel` simply with `pip`:\n\n```\npip install redis-funnel\n```\n\n## Getting Started\n\nSuppose you have a function named `dummy` runs across many processes, and executes very quickly:\n\n```python\nimport time\n\ndef dummy():\n return time.time()\n\nwhile True:\n print dummy()\n```\n\nyou wants to restrict its execution speed with a limited qps, e.g. 100:\n\n```python\nimport time\nfrom redis_funnel.distributed import qps_factory\n\nqps = qps_factory(host=\"localhost\", port=6379, db=0)\n\n@qps(\"1000001\", \"test\", 100)\ndef dummy():\n return time.time()\n\nwhile True:\n print dummy()\n```\n\n> Warning: a redis server should be started first and listening on localhost:6379.\n\nAlso, if function `dummy` just runs in a single process, then you can just use `qps` decorator based on local memory, in which case you don't need a redis server running first:\n\n```python\nimport time\nfrom redis_funnel.local import qps\n\n@qps(100)\ndef dummy():\n return time.time()\n\nwhile True:\n print dummy()\n```\n\n## Management UI\n\nTBD\n\n## Author\n\nredis-funnel is developed and maintained by fanwei.zeng (stayblank@gmail.com). It can be found here:\n\nhttps://github.com/PurpleSun/redis_funnel", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/PurpleSun/redis_funnel", "keywords": "distributed,funnel,redis", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "redis-funnel", "package_url": "https://pypi.org/project/redis-funnel/", "platform": "any", "project_url": "https://pypi.org/project/redis-funnel/", "project_urls": { "Homepage": "https://github.com/PurpleSun/redis_funnel" }, "release_url": "https://pypi.org/project/redis-funnel/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "A distributed funnel system based on redis, management system included.", "version": "0.0.1" }, "last_serial": 4988138, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "3df8794548b1a8616e0e9f1659c306f1", "sha256": "a2e380794d1c3b7fb205c78da1a685f75c0716450ca44ee201c129e4a91b5dd4" }, "downloads": -1, "filename": "redis-funnel-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3df8794548b1a8616e0e9f1659c306f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7991, "upload_time": "2019-03-26T15:18:32", "url": "https://files.pythonhosted.org/packages/13/a1/83ff56f9730a137e27d9c1cffe2087b81c1d8ba59131591b12c31cd7cad1/redis-funnel-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3df8794548b1a8616e0e9f1659c306f1", "sha256": "a2e380794d1c3b7fb205c78da1a685f75c0716450ca44ee201c129e4a91b5dd4" }, "downloads": -1, "filename": "redis-funnel-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3df8794548b1a8616e0e9f1659c306f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7991, "upload_time": "2019-03-26T15:18:32", "url": "https://files.pythonhosted.org/packages/13/a1/83ff56f9730a137e27d9c1cffe2087b81c1d8ba59131591b12c31cd7cad1/redis-funnel-0.0.1.tar.gz" } ] }