v0.3.2
·
9 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Added
- Context-local
scope()API for narrowing allowed destinations within a block of code.
Usable as both a context manager (with tethered.scope(allow=[...]):) and a decorator
(@tethered.scope(allow=[...])). Supportslog_only,fail_closed,allow_localhost,
andon_blockedoptions. Scopes use intersection semantics — they can only narrow the
global policy, never widen it. Safe for concurrent use across threads and async tasks. - Input validation on
activate()andscope()parameters (type checks forallow,
on_blocked,locked,log_only,fail_closed,allow_localhost). - Runnable examples in
examples/.