{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/10"}],"enrichment":{"capability":"Provides connectionless rate limiting for Python applications in serverless environments, using Redis as the backing store and supporting multiple rate-limiting algorithms.","skillfed_tags":["serverless","rate-limiting","redis"],"use_cases":["Protect Lambda functions or serverless APIs from being overwhelmed by enforcing per-user or per-IP request quotas","Implement tiered rate limits (e.g., 10 req/10s for free users, 60 req/10s for paid) using multiple Ratelimit instances with different prefixes","Smooth out traffic bursts in serverless workloads using Token Bucket to process requests at a constant rate","Prevent request stampedes at window boundaries by using Sliding Window instead of Fixed Window","Share a single Redis instance across multiple applications by setting custom key prefixes to avoid collisions"],"what_it_does":"upstash-ratelimit is a Python SDK for rate limiting designed specifically for serverless environments like AWS Lambda, Vercel, and Google Cloud Functions. It uses HTTP to communicate with Upstash's managed Redis service rather than TCP connections, making it suitable for ephemeral compute contexts where persistent connections are impractical. The package provides three rate-limiting algorithms\u2014Fixed Window, Sliding Window, and Token Bucket\u2014each with different trade-offs between computational cost and burst-handling behavior.\n\nYou instantiate a Ratelimit object with a Redis client and your chosen algorithm, then call the limit() method with an identifier (user ID, API key, IP address, etc.) to check whether a request should be allowed. The method returns a Response object containing whether the request passed, the configured limit, remaining requests in the window, and when the limit resets. The package also supports async/await patterns via an asyncio module and allows you to block until a request is ready to proceed.","worth_installing":"Yes, if you are building serverless applications and need rate limiting backed by a managed Redis service. The package is production-stable, has no known vulnerabilities, and low install friction. However, maintenance is dormant\u2014no updates since mid-2024\u2014so you should be comfortable with a package that will not receive active development or rapid bug fixes. It is a good fit for established serverless workloads where the core functionality is stable and you do not expect frequent feature requests."},"id":"upstash-ratelimit","links":{"html":"https://skillfed.io/packages/upstash-ratelimit","md":"https://skillfed.io/packages/upstash-ratelimit.md","pypi":"https://pypi.org/project/upstash-ratelimit/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-05-16","license_spdx":null,"license_treatment":"permissive","name":"upstash-ratelimit","python_support":"supports_current","summary":"Serverless ratelimiting package from Upstash"},"popularity":{"monthly_downloads":83347,"position":14079,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.1.0"}
