Skip to main content

Description

https://raw.githubusercontent.com/enricobacis/limit/master/.screenshot/limit.gif

This decorator limits the calling rate of the decorated function. This is useful in conjuction with web API calls, where you often get banned if you perform more calls than the ones specified in the terms of services.

The rate is limit over every, where limit is the number of invocation allowed every every seconds. limit(4, 60) creates a decorator that limits the function calls to 4 per minute. If not specified, every defaults to 1 second.

@limit(4, 60)
def function(...):
    """never invoke this function more than 4 times per minute."""
    ...

Installation

The package has been uploaded to PyPI, so you can install it with pip:

pip install limit

Metadata

Release files for limit 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for limit 0.2.3
File Size Uploaded Provenance
limit-0.2.3.tar.gz 1.9 kB Without provenance Details

Release files / limit-0.2.3.tar.gz

Download URL limit-0.2.3.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5dcb9d657a17fd4285cda417fb67dcef297bc6179e4c0d25f0a1eaab87ed30ba
BLAKE2b-256 checksum
How to use checksums
ebf4dc421fbc654e922be53288bf75160da62a0c3f81928957163e997fdb3198
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for limit 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page