FastAPI middleware to redirect spam requests to a random 10 hours of video
Project description
🍔 fastapi-spam
FastAPI middleware to redirect spam requests to a random 10 hours of video. Ported from django-spam (I'm the creator), which was inspired by this Nick Craver Tweet from 2018.
Installation
pip install fastapi-spam
Usage
Add the TenHoursOfRedirect middleware to your FastAPI app (or Starlette).
from fastapi import FastAPI
from fastapi_spam.middleware import TenHoursOfRedirect
app = FastAPI()
...
app.add_middleware(TenHoursOfRedirect)
Now, any time an intruder tries to access an endpoint in SPAM_ROUTES, they will be redirected to a random 10 hours of video...take that bots!
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
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 fastapi_spam-0.0.2.tar.gz.
File metadata
- Download URL: fastapi_spam-0.0.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bb9b3ddccc541a95c9465c0e4525ae3cb7226d4b22e41d440d285a68a61c5de
|
|
| MD5 |
9ecffaef9bb3b598941b0fc2a3ae2b24
|
|
| BLAKE2b-256 |
b4aa2f389db8202031a945d1427af9456c1ee749ecb31a8e85741f677ec213ef
|
Provenance
The following attestation bundles were made for fastapi_spam-0.0.2.tar.gz:
Publisher:
main.yaml on nickatnight/fastapi-spam
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastapi_spam-0.0.2.tar.gz -
Subject digest:
3bb9b3ddccc541a95c9465c0e4525ae3cb7226d4b22e41d440d285a68a61c5de - Sigstore transparency entry: 314185842
- Sigstore integration time:
-
Permalink:
nickatnight/fastapi-spam@95c89ebe2443761b1c2c11e4245843eb1c68ede6 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/nickatnight
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yaml@95c89ebe2443761b1c2c11e4245843eb1c68ede6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fastapi_spam-0.0.2-py3-none-any.whl.
File metadata
- Download URL: fastapi_spam-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
404782a427d642a1e8d045b8a583f71434d59694a30e4a11e19e7906ca1804ab
|
|
| MD5 |
6941b7e79f2de940f032658d7fab29b9
|
|
| BLAKE2b-256 |
6f391afa6a957801f91b572eb1fde1df575c5f6d851c444faab71a554acc5ed1
|
Provenance
The following attestation bundles were made for fastapi_spam-0.0.2-py3-none-any.whl:
Publisher:
main.yaml on nickatnight/fastapi-spam
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastapi_spam-0.0.2-py3-none-any.whl -
Subject digest:
404782a427d642a1e8d045b8a583f71434d59694a30e4a11e19e7906ca1804ab - Sigstore transparency entry: 314185851
- Sigstore integration time:
-
Permalink:
nickatnight/fastapi-spam@95c89ebe2443761b1c2c11e4245843eb1c68ede6 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/nickatnight
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yaml@95c89ebe2443761b1c2c11e4245843eb1c68ede6 -
Trigger Event:
push
-
Statement type: