{"repo":"ZhuoZhuoCrayon/throttled-py","free":true,"listed":false,"github":"https://github.com/ZhuoZhuoCrayon/throttled-py","clone":"git clone https://github.com/ZhuoZhuoCrayon/throttled-py.git","description":"🔧 High-performance Python rate limiting library with multiple algorithms (Fixed Window, Sliding Window, Token Bucket, Leaky Bucket & GCRA) and storage backends (Redis, In-Memory).","language":"Python","stars":644,"topics":["gcra","python","rate-limiter","throttler","rate-limiting","redis","token-bucket","in-memory","throttling","rate-limit"],"license":"MIT","category":"databases-storage","readme_excerpt":"throttled-py 🔧 High-performance Python rate limiting library with multiple algorithms (Fixed Window, Sliding Window, Token Bucket, Leaky Bucket & GCRA) and storage backends (Redis, In-Memory). 简体中文 English 🔰 Installation 🎨 Quick Start 📝 Usage ⚙️ Data Models 📊 Benchmarks 🍃 Inspiration 📚 Version History 📄 License ✨ Features Supports both synchronous and asynchronous ( async / await ). Provides thread-safe storage backends: Redis(Standalone/Sentinel/Cluster), In-Memory (with support for key expiration and eviction). Supports multiple rate limiting algorithms: Fixed Window, Sliding Window, Token Bucket, Leaky Bucket & Generic Cell Rate Algorithm (GCRA). Supports configuration of rate limiting algorithms and provides flexible quota configuration. Supports immediate response and wait-retry modes, and provides function call, decorator, and context manager modes. Supports integration with the MCP Python SDK to provide rate limiting support for model dialog processes. Official FastAPI integration with async decorator-based rate limiting, IETF-compliant RateLimit- headers, and HTTP 429 handling. Excellent performance, The execution time for a single rate limiting API call is equivalent to(see Benchmarks for details): In-Memory: 2.5-4.5x dict[key] += 1 operations. Redis: 1.06-1.37x INCRBY key increment operations. 🔰 Installation Note: v3.x requires Python =3.10 . If you are using Python 3.8/3.9 , install throttled-py n per unit n per unit burst [2] unit supports s / m / h / d /","default_branch":null,"files":null,"tree":[],"storefront":"/r/ZhuoZhuoCrayon","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ZhuoZhuoCrayon/throttled-py/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}