Protect against bots and DDoS attacks
Project description
flask-Humanify
A strong bot protection system for Flask with many features: rate limiting, special rules for users, web crawler detection, and automatic bot detection.
from flask import Flask
from flask_Humanify import Humanify
app = Flask(__name__)
humanify = Humanify(app)
@app.route("/")
def index():
"""
A route that is protected against bots and DDoS attacks.
"""
if humanify.is_bot:
return humanify.redirect_to_access_denied()
return "Hello, Human!"
if __name__ == "__main__":
app.run()
Usage
Installation
Install the package with pip:
pip install flask-humanify --upgrade
Import the extension:
from flask_humanify import Humanify
Add the extension to your Flask app:
app = Flask(__name__)
humanify = Humanify(app)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flask_humanify-0.1.1.tar.gz
(5.9 MB
view details)
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_humanify-0.1.1.tar.gz.
File metadata
- Download URL: flask_humanify-0.1.1.tar.gz
- Upload date:
- Size: 5.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2884dc15a9f773c0f40951cf8a1606af3f28a8d445b291a24b87228f067c5a5
|
|
| MD5 |
9022011914432da6906a646134353254
|
|
| BLAKE2b-256 |
777aca9c3b2fc4cccb8b9b11179ec9b993c46205924fa198ba6072adf27d5b76
|
File details
Details for the file flask_humanify-0.1.1-py3-none-any.whl.
File metadata
- Download URL: flask_humanify-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f5bb98e313600c9c03edb30cfd0f13b84825232e165ee6bc6f2041eb1d87452
|
|
| MD5 |
f89539fb708f1f9324fe8f1f6a54b414
|
|
| BLAKE2b-256 |
e06f3d41e4deef13a91a36e5e2dec6b2e75c21836169084de97ee06168c7422f
|