Skip to main content
https://img.shields.io/badge/Made%20with-Python-1f425f.svg https://img.shields.io/pypi/v/ratelimitpy.svg https://img.shields.io/pypi/l/ratelimitpy.svg https://img.shields.io/pypi/pyversions/ratelimitpy.svg

Installation

To install ratelimitpy, simply use pip:

$ pip install ratelimitpy

or install directly from source to include latest changes:

$ pip install git+https://github.com/saporitigianni/ratelimitpy.git

or clone and then install:

$ git clone https://github.com/saporitigianni/ratelimitpy.git
$ cd ratelimitpy
$ python3 setup.py install

Usage

Simply decorate anything that requires a rate limit and specify calls and period

from ratelimitpy import ratelimitpy

# Function to be rate limited
# Will print no more than 10 calls for every 3 second period
@ratelimitpy(calls=10, period=3)
def print_limited(data):
    print(data)

for x in range(30):
    print_limited(x)

Contributing

Please read the CONTRIBUTING document before making changes that you would like adopted in the code.

Code of Conduct

Everyone interacting in the ratelimitpy project’s codebase, issue trackers, chat rooms, and mailing lists is expected to follow the PyPA Code of Conduct.



ETH 0xaD1F09626b9B8e701D5f0F4a237193Df73d3C445
BTC 199zsVqCusefv8yjdYQhUQZmLCyh75dqNV
LTC LUBqs7VxC43ttPsQuM1jaZFmshKTAU1Rs9

Metadata

Release files for ratelimitpy 1.1.0

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

Source distribution (sdist)

Source distribution for ratelimitpy 1.1.0
File Size Uploaded Provenance
ratelimitpy-1.1.0.tar.gz 3.6 kB Without provenance Details

Release files / ratelimitpy-1.1.0.tar.gz

Download URL ratelimitpy-1.1.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ebb9656404d74291d586a3f27a899afc45927d32d0ea751058ded02858d42e0c
BLAKE2b-256 checksum
How to use checksums
35bde1a8a5fe57cd17af9d4019053c983954d96ffba5b1d705eee12e91de7ebd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for ratelimitpy 1.1.0

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

1 release file No provenance

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