Skip to main content

Simple rate limit decorator

Project description


To install ratelimitpy, simply use pip:

$ pip install ratelimitpy

or install directly from source to include latest changes:

$ pip install git+

or clone and then install:

$ git clone
$ cd ratelimitpy
$ python3 install


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):

for x in range(30):


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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ratelimitpy, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size ratelimitpy-1.1.0.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page