{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/2"}],"enrichment":{"capability":"A function decorator that enforces rate limits on API calls, raising an exception or sleeping to prevent exceeding a specified call quota within a time window.","skillfed_tags":["api-throttling","decorator","legacy-stable"],"use_cases":["Wrap API client functions to enforce a 15 minute rate limit or any custom quota without manual tracking","Combine with retry logic to implement automatic retry when rate limits are hit","Ensure background jobs or data-sync tasks respect API provider rate limits without explicit delay management","Protect against accidental API abuse by adding a decorator to functions that call rate-limited endpoints"],"what_it_does":"ratelimit is a simple decorator-based rate limiter for Python functions that make API calls. It enforces a maximum number of function invocations within a specified time period (defaulting to 15 minutes), raising a RateLimitException when the quota is exceeded. This helps prevent applications from violating API provider rate limits and getting banned.\n\nThe package provides two strategies for handling rate-limit violations: raising an exception (which you can catch and retry), or using the sleep_and_retry decorator to automatically pause the current thread until the time window resets before retrying. It has no runtime dependencies and works by wrapping any function with a simple @limits(calls=N, period=seconds) decorator.","worth_installing":"Yes, with caution. The package is simple, stable, and solves a real problem for API-heavy applications. However, the lack of updates since 2018-12-17 is a significant concern\u2014verify compatibility with your Python version before relying on it in production. For straightforward rate-limiting needs, this remains functional."},"id":"ratelimit","links":{"html":"https://skillfed.io/packages/ratelimit","md":"https://skillfed.io/packages/ratelimit.md","pypi":"https://pypi.org/project/ratelimit/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2018-12-17","license_spdx":null,"license_treatment":"permissive","name":"ratelimit","python_support":"unspecified","summary":"API rate limit decorator"},"popularity":{"monthly_downloads":12749177,"position":1307,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.2.1"}
