Skip to main content

A production-grade distributed rate limiting SDK for Python powered by Redis and Lua.

Project description

🛡️ Aegis

Production-grade distributed rate limiting for Python powered by Redis and Lua.

Installation

pip install aegis-rl

Quick Start

from aegis import Aegis
from aegis.backends import RedisBackend

backend = RedisBackend()

limiter = Aegis(
    backend=backend,
    algorithm="fixed_window",
    limit=100,
    window_size=60,
)

limiter.allow("user123")

Supported Algorithms

  • Fixed Window
  • Sliding Window Log
  • Token Bucket
  • Leaky Bucket

Features

  • Redis Lua Scripts
  • Atomic Operations
  • Race-condition safe
  • In-memory backend
  • Redis backend
  • Python SDK

Documentation

See the GitHub repository for full documentation.

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

aegis_rl-0.1.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aegis_rl-0.1.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file aegis_rl-0.1.1.tar.gz.

File metadata

  • Download URL: aegis_rl-0.1.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aegis_rl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3d231b1faf93cee0034e16ab8f3566628bdc3878d9abd654cc5d2132d232bba5
MD5 1391440a56161aeafc146975b2fc28ec
BLAKE2b-256 8d95afc562e8407e572c4a8679f8ac0e256acf84622f3ecbe0528adaf942ec3d

See more details on using hashes here.

File details

Details for the file aegis_rl-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aegis_rl-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aegis_rl-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b92215cd9d7e77d77d12c413beb6ce766e7860f4076f5259432583328cd45813
MD5 476bb7631d16b925fb1ad9823584bd48
BLAKE2b-256 7da4083c1307e7fe001d68961c8878722fbd98f954bead70c1900420f60fff36

See more details on using hashes here.

Supported by

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