Skip to content

v0.3.2

Choose a tag to compare

@SergiiShcherbak SergiiShcherbak released this 22 Mar 02:05
· 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=[...])). Supports log_only, fail_closed, allow_localhost,
    and on_blocked options. 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() and scope() parameters (type checks for allow,
    on_blocked, locked, log_only, fail_closed, allow_localhost).
  • Runnable examples in examples/.