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 details)

Uploaded Source

Built Distribution

garm_rate_limiter-0.1.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file garm_rate_limiter-0.1.3.tar.gz.

File metadata

  • Download URL: garm_rate_limiter-0.1.3.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.5

File hashes

Hashes for garm_rate_limiter-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e91034fafa1f4f0568974b5b9b598b54d7554411224dc0628c1c1f6deb6ef8f5
MD5 d27d0443919ed9d0e2075b8dca7d044d
BLAKE2b-256 cd97377b91492541f073489309cc4a34a596ff019e89167acbe10c31146ec839

See more details on using hashes here.

File details

Details for the file garm_rate_limiter-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: garm_rate_limiter-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.5

File hashes

Hashes for garm_rate_limiter-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 78eec73861b8513547060beddcdf5c2540a96feb5ad4a753a23c5eab13d96f58
MD5 c03b5b08ebe58b2d5248e4167d5e39b5
BLAKE2b-256 08f71f034a44a96d15727b932bb03010cddaa1518c30ddff677aff6b0b76ac77

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