wove.context

wove.context contains the context manager implementation behind the public weave entrypoint. Most users should import weave from wove; wove.context is useful when you need to understand context-manager behavior exactly.

When you need to understand exactly what with weave(...) as w: creates, wove.context shows the lifecycle around setup, task collection, block exit, execution, and teardown.

Public Surface

WoveContextManager is exported as wove.weave. Using the class directly is rarely necessary, but its methods define the context lifecycle used by every inline weave.

API Details

class wove.context.WoveContextManager(parent_weave=None, *, debug=False, environment=None, max_workers=None, background=None, fork=None, on_done=None, max_pending=None, error_mode=None, delivery_timeout=None, delivery_idempotency_key=None, delivery_cancel_mode=None, delivery_heartbeat_seconds=None, delivery_max_in_flight=None, delivery_orphan_policy=None, **kwargs)[source]

Bases: object

The core context manager that discovers, orchestrates, and executes tasks defined within a with weave() or async with weave() block.

Parameters:
  • parent_weave (Type[Weave] | None)

  • debug (bool)

  • environment (str | None)

  • max_workers (int | None)

  • background (bool | None)

  • fork (bool | None)

  • on_done (Callable | None)

  • max_pending (int | None)

  • error_mode (str | None)

  • delivery_timeout (float | None)

  • delivery_idempotency_key (Any | None)

  • delivery_cancel_mode (str | None)

  • delivery_heartbeat_seconds (float | None)

  • delivery_max_in_flight (int | None)

  • delivery_orphan_policy (str | None)

  • kwargs (Any)