🍔 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!
Release files for fastapi-spam 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastapi_spam-0.0.4.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastapi_spam-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / fastapi_spam-0.0.4.tar.gz
| Download URL | fastapi_spam-0.0.4.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5ca474c12dda04267f335d13894e1eb98aec49acc7627d41328e75e2a369b78
|
|
BLAKE2b-256 checksum How to use checksums |
e3132f578ab0adc2c1dacdeecb52d12c4753227455c424d20f3a8f649787d559
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 1, 2025.
Transparency logRelease files / fastapi_spam-0.0.4-py3-none-any.whl
| Download URL | fastapi_spam-0.0.4-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
473cd9beb0c51be06c8905728208c91aa893012472a27f67d195f83020cb664f
|
|
BLAKE2b-256 checksum How to use checksums |
31427e38ba2f155ba3258d233b944b33553b737006aeb994792f4cafbcb8c40d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 1, 2025.
Transparency log