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.

Source Distribution

sliding_rate_limiter-2.1.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

sliding_rate_limiter-2.1.0-py2.py3-none-any.whl (8.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sliding_rate_limiter-2.1.0.tar.gz.

File metadata

File hashes

Hashes for sliding_rate_limiter-2.1.0.tar.gz
Algorithm Hash digest
SHA256 a29035d1e3f6f578b7294faddaafeef107dc3e7f0103e80fcffa380f95f772cd
MD5 356c4a9012142218bb7f85527dcdac7f
BLAKE2b-256 58747076880cc78a6ea78849d7307a44efbe21a164970740ed9a53eca2dc1ed7

See more details on using hashes here.

File details

Details for the file sliding_rate_limiter-2.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sliding_rate_limiter-2.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f0d502ed56a7abaefe86c689e0cf33def104d9f0d611b46cebf61eb1222e1dc8
MD5 feb576ba2981bd161e9b595b2bf83be3
BLAKE2b-256 63f88db56e6ff4e55be2243d03eb89cc7de3ccbfdbeaabec70c81f02bd30a2c1

See more details on using hashes here.

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