Skip to content
YosoiDocs

BoundPageRequest

yosoi.request.BoundPageRequest

class BoundPageRequest:

A page request bound to a serialized policy snapshot.

Attributes: request: Retained authored request. Later edits to the caller policy do not affect this binding.

Source: python/yosoi/request.py:358

Members below are declared on this class. Inherited Pydantic methods and generated constructor signatures are not expanded.

def __init__(self, request: PageRequest, policy: Policy) -> None:

Retain the request and snapshot its policy without acquisition I/O.

Args: request: Authored acquisition request to retain. policy: Complete declaration to serialize for subsequent checks and sends.

Source: python/yosoi/request.py:366

@property
def id(self) -> RequestId:

Return the identity of the retained authored request.

Source: python/yosoi/request.py:377

@property
def target(self) -> WebTarget:

Return original target text without validating it or performing I/O.

Source: python/yosoi/request.py:382

@property
def policy(self) -> Policy:

Return a policy copy whose edits do not change this binding.

Source: python/yosoi/request.py:387

def check(self) -> None:

Validate target and bound-policy snapshot without acquisition I/O.

Raises: RequestError: Request preparation or policy resolution fails.

Source: python/yosoi/request.py:391

def in_session(self, session: Session) -> BoundSessionRequest:

Use this bound Policy while borrowing the caller-owned Session.

Source: python/yosoi/request.py:399

def with_work(self, work: Work) -> BoundSessionRequest:

Use this bound Policy while borrowing the caller-owned Work lease.

Source: python/yosoi/request.py:403

async def send(self, *, cancellation: CancellationToken | None=None) -> Response:

Acquire document representations with the bound policy.

Args: cancellation: Optional cooperative token shared with other operations. Observed cancellation retains prior attempts and marks later attempts not started; external effects are not rolled back.

Returns: Typed response retaining document owners. Completed termination does not imply that every attempt succeeded; inspect attempts and document outcomes.

Raises: RequestError: Preparation or adapter setup fails before execution. pydantic.ValidationError: Native response data cannot form a typed result.

Source: python/yosoi/request.py:407