Skip to main content

Rate Limiter for Flask

Project description

Garm Rate Limiter

Source code on Github PyPI Documentation Docs Tests Coverage MIT License

IP address based rate limiter for Flask

Development of Garm Rate Limiter happens on Github.

You can read the full documentation online. [IN PROGRESS]

NB: Route specific rate limiting has not been implemented yet. The specified rate limiting will apply individually to every flask route.

Installation

To install the latest released version of Garm Rate Limiter, run this command in your terminal:

pip install garm_rate_limiter

This is the preferred method to install Garm Rate Limiter, as it will always install the most recent stable release.

If you don't have pip installed, the Python installation guide, respectively the Python Packaging User Guide can guide you through the process.

To install the latest development version of Garm Rate Limiter from Github.

pip install git+https://github.com/burakozdemir32/garm_rate_limiter.git@main#egg=garm_rate_limiter

Usage

To use Garm Rate Limiter in a Flask project:

from datetime import timedelta

from flask import Flask

from garm_rate_limiter.config import RateLimiterConfig
from garm_rate_limiter.limiter import RateLimiterMiddleware

app = Flask(__name__)

rate_limiter_config = RateLimiterConfig(limit=10, time=timedelta(seconds=60))
app.wsgi_app = RateLimiterMiddleware(config=rate_limiter_config, app=app.wsgi_app)

History

0.1.3 (2021-02-14)

  • Garm Rate Limiter 0.1.3

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

garm_rate_limiter-0.1.3.tar.gz (21.7 kB view hashes)

Uploaded Source

Built Distribution

garm_rate_limiter-0.1.3-py3-none-any.whl (6.5 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