{"library":"python-redis-rate-limit","title":"Python Redis Rate Limit","description":"A Python rate limiter based on Redis using a sliding window algorithm. It provides a decorator and context manager to limit the rate of function calls or code blocks. Version 0.0.10 is the latest release, with no recent updates; the package appears to be in maintenance mode.","language":"python","status":"maintenance","last_verified":"Sat May 09","install":{"commands":["pip install python-redis-rate-limit"],"cli":null},"imports":["from rate_limit import rate_limit"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import redis\nfrom rate_limit import rate_limit\n\nr = redis.Redis(host='localhost', port=6379, db=0)\n\n@rate_limit(r, max_calls=10, period=60)\ndef my_function():\n    print('Function called')\n\nfor _ in range(12):\n    my_function()","lang":"python","description":"Basic usage of the rate_limit decorator, limiting to 10 calls per 60 seconds.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}