{"id":15288705,"url":"https://github.com/thus/fastapi-tarpit","last_synced_at":"2026-02-03T08:02:45.829Z","repository":{"id":236840641,"uuid":"793272300","full_name":"thus/fastapi-tarpit","owner":"thus","description":"FastAPI middleware that purposely delays incoming connections on unused routes","archived":false,"fork":false,"pushed_at":"2024-05-23T20:35:18.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-02T23:12:21.856Z","etag":null,"topics":["fastapi","middleware","tarpit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-28T22:07:25.000Z","updated_at":"2025-02-12T15:56:33.000Z","dependencies_parsed_at":"2024-05-12T20:42:29.858Z","dependency_job_id":"6649304b-3bd3-45b6-b03b-4a5251683505","html_url":"https://github.com/thus/fastapi-tarpit","commit_stats":null,"previous_names":["thus/fastapi-tarpit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thus/fastapi-tarpit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thus%2Ffastapi-tarpit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thus%2Ffastapi-tarpit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thus%2Ffastapi-tarpit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thus%2Ffastapi-tarpit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thus","download_url":"https://codeload.github.com/thus/fastapi-tarpit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thus%2Ffastapi-tarpit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29037748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T06:39:36.383Z","status":"ssl_error","status_checked_at":"2026-02-03T06:39:32.787Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","middleware","tarpit"],"created_at":"2024-09-30T15:52:24.164Z","updated_at":"2026-02-03T08:02:45.813Z","avatar_url":"https://github.com/thus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Tarpit\n\n[FastAPI](https://fastapi.tiangolo.com/) middleware that purposely delays\nincoming connections on unused routes.\n\nDefinition of a tarpit from [Wikipedia](https://en.wikipedia.org/wiki/Tarpit_(networking)):\n\n\u003e A tarpit is a service on a computer system (usually a server) that purposely delays incoming connections. The technique was developed as a defense against a computer worm, and the idea is that network abuses such as spamming or broad scanning are less effective, and therefore less attractive, if they take too long. The concept is analogous with a tar pit, in which animals can get bogged down and slowly sink under the surface, like in a swamp.\n\n## Installation\n\nInstall the package using pip:\n\n```bash\npip install fastapi-tarpit\n```\n\n## Usage\n\n```python\nfrom fastapi import FastAPI\nfrom fastapi_tarpit import HTTPTarpitMiddleware\n\napp = FastAPI()\n\napp.add_middleware(HTTPTarpitMiddleware)\n\n@app.get(\"/foo\")\nasync def foobar():\n    return {\"foo\": \"bar\"}\n```\n\nThe code above triggers the tarpit on any other routes than `/foo`, and\nroutes related to docs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthus%2Ffastapi-tarpit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthus%2Ffastapi-tarpit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthus%2Ffastapi-tarpit/lists"}