Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Flask RLMT (Flask Rate Limiter)

About

This project is a rate limiter for Flask, and allows you to apply rate limit rules to routes, blueprints, or apply global limits that affect all routes.

Current Stratagies

  • Sliding window

Installation

This project is registered with PyPi, and can be installed with

pip install flask_rlmt

How to use

  1. Import flask_rlmt
import flask_rlmt
  1. Create a new limiter
app = Flask(__name__)

limiter = Limiter(
    app=app,
    rules=[
        "10 per minute",
        "100 per hour"
    ]
)
  1. Add rules to an individual route
@app.route("/")
@limiter.guard(rules=["1000/d"])
def home():
  1. Apply rules to an entire blueprint
auth_bp = Blueprint('auth', __name__, url_prefix='/auth')

limiter.apply(auth_bp, rules=["2 per 10s"])

app.register_blueprint(auth_bp)

Detailed Instructions

For further questions on how to interact with the API, please refer to the docs/QUICKSTART.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_rlmt-0.1.0rc1.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

flask_rlmt-0.1.0rc1-py2.py3-none-any.whl (8.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file flask_rlmt-0.1.0rc1.tar.gz.

File metadata

  • Download URL: flask_rlmt-0.1.0rc1.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for flask_rlmt-0.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 b3957327eeebe81de89b976c8bb44787e8afdee4e2f1ccb01f0c79f702d4ff87
MD5 3b27cd9d88ecf7003a3b3bfc3620899b
BLAKE2b-256 89ddc44553e631cdc4fabda5bcf7496b575e89323cdd3fec0762b116f0f8bf44

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_rlmt-0.1.0rc1.tar.gz:

Publisher: publish.yml on anb2473/flask_rlmt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flask_rlmt-0.1.0rc1-py2.py3-none-any.whl.

File metadata

  • Download URL: flask_rlmt-0.1.0rc1-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for flask_rlmt-0.1.0rc1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ee2e5bd9dee387429f731fc9c7bc079f8249a73cec94b6544ac5747822d7265b
MD5 a86e088d1ee56f97e361e6019c0f4f36
BLAKE2b-256 1f88f1c454ed5d9b6eee254b261492b588dacf89e447d7e6b8d022df86c63222

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_rlmt-0.1.0rc1-py2.py3-none-any.whl:

Publisher: publish.yml on anb2473/flask_rlmt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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