A zero-dependency Python library that restricts outbound network access at runtime. Declare an allow list, and every socket call outside it is blocked — supply chain defense, AI agent guardrails, and test isolation in a single line of code.
Hey community!
I built tethered because Python has no built-in way to restrict outbound network access at runtime.
One function call, zero dependencies — declare an allow list and any socket call outside it is blocked before a packet leaves the machine. Uses Python's audit hook system (PEP 578), no monkey-patching or proxies.
Built it mainly for supply chain defense (compromised deps can't phone home), AI agent guardrails, and test isolation. Works with requests, httpx, aiohttp, Django, FastAPI — anything built on Python sockets.
Fully open-source (MIT). Would love your feedback!
Replies
ContextGem