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', 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-1.1.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

sliding_rate_limiter-1.1.0-py2.py3-none-any.whl (8.0 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

File hashes

Hashes for sliding_rate_limiter-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b5f1e72bdbcf2627243d51c413504f09b1e07e75774a8b6c456a39ecd9d819a8
MD5 4e08d6bbbff2fa755101488b7031d87e
BLAKE2b-256 562addfba14d52957f66e12ab8adba47fe81841678002fb16cded13d5e7666ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sliding_rate_limiter-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 14afdd9d6bc244271a08e4f977b3e5c36824af9c8a21e6d7731ef11223223ea4
MD5 e2e32f947ab7e0ce3982611954327712
BLAKE2b-256 a2114c6c9af1eb5cde52a6ea338ae87f77c52dd47a4d62263af8d813f92f571f

See more details on using hashes here.

Supported by

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