Skip to main content

tartaruga ratelimiter

Project description

tartaruga

Tartaruga is another ratelimiter library, based on Redis. It allows for distributed rate-limiting accross different processess, or even hosts.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Python 3.x, PIP, Redis server up and running

Installing

Library can be installed simply with pip:

pip install tartaruga

or by running:

make install

Usage examples

Example usage. Ratelimiting 10 requests per second + 120 requests per minute + 240 requests per hour:

from tartaruga.ratelimiter import rate_limit

limits = [(1, 10), (60, 120), (3600, 240)]

@rate_limit(api_id='MyShinyAPI', limits=limits)
def somefunction():
    # here you can call the API

Contributing

TBD

Authors

  • **Devmons s.r.o. - Initial work - crypkit

License

Commercial

Project details


Download files

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

Source Distribution

tartaruga-0.0.5.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

tartaruga-0.0.5-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page