
tethered
Your app's network firewall — in one function call.
FreeOpen SourceSecurityAI Agents3,357 impressions#9 of its week1 comment
Comments
>log in to commentHey 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!
tethered is a zero-dependency Python library that enforces outbound network allow-lists at runtime.
- for
- Python developers who need runtime network egress control, including AI-generated code and third-party libraries.
- pricing
- open source
- license
- MIT
Key features
- Process-wide activation — Call activate() once to set a global allow-list for all outbound sockets.
- Scoped tightening — Use scope() to apply tighter restrictions to specific code paths or libraries.
- Zero external dependencies — Implements checks by hooking Python's native socket layer, no extra packages needed.
- Works with common frameworks — Compatible with requests, httpx, aiohttp, Django, Flask, FastAPI, and any socket-based library.
- Subprocess propagation — Automatically propagates policies to child processes via site-packages bootstrap.
- Locked-mode integrity checks — Detects tampering of policy payloads and filesystem changes.
- DNS divergence repair — Falls back to safe DNS resolution when standard lookup fails.
- Simple API — One-line allow-list declaration blocks unauthorized network calls with EgressBlocked exceptions.
Use cases
- Prevent compromised dependencies from contacting external services during tests
- Guard AI-generated code from unintentionally calling production APIs
- Isolate background jobs to only permitted databases and services
- Enforce staging-only network access in CI pipelines
tethered vs alternatives
tethered | aikido | Fine | Pocketenv | Daytona | |
|---|---|---|---|---|---|
| Best for | In-process network firewall for Python | General dev security tooling | AI-assisted code generation | Isolated execution environments | Rapid dev environment provisioning |
| Pricing | Open source | Free | Free | Free | Free |
| DevHunt upvotes | 1 | 65 | 75 | 73 | 339 |
| Launched | Mar 2026 | Dec 2024 | Jan 2023 | Apr 2026 | May 2024 |
- tethered vs aikido: Focuses on broader security hardening for developers, not specifically runtime network egress control.
- tethered vs Fine: Provides AI agents for software building, whereas tethered guards network calls made by such agents.
- tethered vs Pocketenv: Offers a sandbox runtime for agents and humans, but does not enforce per-process network allow-lists.
- tethered vs Daytona: Sets up development environments, not runtime network restrictions.
tethered FAQ
How does tethered block unauthorized network calls?+
It hooks into Python's socket layer and checks each outbound connection against the configured allow-list, raising an EgressBlocked exception if the target is not permitted.
Do I need a proxy or sidecar to use tethered?+
No, tethered runs entirely in-process and requires no external infrastructure or admin privileges.
Can I apply different policies to different parts of my code?+
Yes, the scope() function lets you define tighter allow-lists for specific modules, request handlers, or background jobs.
Is tethered compatible with asynchronous code?+
Yes, it works with async libraries such as httpx and aiohttp that rely on Python sockets.
What happens to subprocesses spawned by my application?+
tethered can auto-propagate the policy to child processes via a site-packages bootstrap, ensuring consistent enforcement.
Summarized by DevHunt from github.com · Sep 29, 2026. Details may change; check the official site.
tethered
aikido
Fine
Pocketenv
Daytona










