Skip to main content

GitHub Actions status Coverage PyPi Shield uv version Python Versions Shield License Shield

🍔 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)

Source distribution for fastapi-spam 0.0.4
File Size Uploaded
fastapi_spam-0.0.4.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-spam 0.0.4
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page