Skip to main content

Sliding rate limiter using memory or a distributed Redis backend.

Project description

sliding-rate-limiter

https://img.shields.io/pypi/v/sliding_rate_limiter.svg https://img.shields.io/travis/kalibrr/sliding_rate_limiter.svg Documentation Status Updates

Sliding rate limiter using memory or a distributed Redis backend.

Features

  • Pluggable rate limiting backend (threadsafe in-memory or distributed Redis backend)

Usage

from sliding_rate_limiter.region import RateLimiterRegion
from sliding_rate_limiter.backends.memory import MemoryBackend

region = RateLimiterRegion('default')
region.configure(MemoryBackend())

@region.rate_limit_on_arguments()
def foo(user_id):
    pass

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

API heavily inspired by dogpile.cache

History

0.1.0 (2018-05-10)

  • First release on PyPI.

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 sliding-rate-limiter, version 2.1.0
Filename, size File type Python version Upload date Hashes
Filename, size sliding_rate_limiter-2.1.0-py2.py3-none-any.whl (8.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size sliding_rate_limiter-2.1.0.tar.gz (13.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page