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
- Import flask_rlmt
import flask_rlmt
- Create a new limiter
app = Flask(__name__)
limiter = Limiter(
app=app,
rules=[
"10 per minute",
"100 per hour"
]
)
- Add rules to an individual route
@app.route("/")
@limiter.guard(rules=["1000/d"])
def home():
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3957327eeebe81de89b976c8bb44787e8afdee4e2f1ccb01f0c79f702d4ff87
|
|
| MD5 |
3b27cd9d88ecf7003a3b3bfc3620899b
|
|
| BLAKE2b-256 |
89ddc44553e631cdc4fabda5bcf7496b575e89323cdd3fec0762b116f0f8bf44
|
Provenance
The following attestation bundles were made for flask_rlmt-0.1.0rc1.tar.gz:
Publisher:
publish.yml on anb2473/flask_rlmt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flask_rlmt-0.1.0rc1.tar.gz -
Subject digest:
b3957327eeebe81de89b976c8bb44787e8afdee4e2f1ccb01f0c79f702d4ff87 - Sigstore transparency entry: 2342055569
- Sigstore integration time:
-
Permalink:
anb2473/flask_rlmt@4564214760f46538f95c5090aa5ac4ce45ba76ba -
Branch / Tag:
refs/tags/0.1.0-pre.1 - Owner: https://github.com/anb2473
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4564214760f46538f95c5090aa5ac4ce45ba76ba -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee2e5bd9dee387429f731fc9c7bc079f8249a73cec94b6544ac5747822d7265b
|
|
| MD5 |
a86e088d1ee56f97e361e6019c0f4f36
|
|
| BLAKE2b-256 |
1f88f1c454ed5d9b6eee254b261492b588dacf89e447d7e6b8d022df86c63222
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flask_rlmt-0.1.0rc1-py2.py3-none-any.whl -
Subject digest:
ee2e5bd9dee387429f731fc9c7bc079f8249a73cec94b6544ac5747822d7265b - Sigstore transparency entry: 2342055576
- Sigstore integration time:
-
Permalink:
anb2473/flask_rlmt@4564214760f46538f95c5090aa5ac4ce45ba76ba -
Branch / Tag:
refs/tags/0.1.0-pre.1 - Owner: https://github.com/anb2473
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4564214760f46538f95c5090aa5ac4ce45ba76ba -
Trigger Event:
release
-
Statement type: