Skip to content
YosoiDocs

PageRequest

yosoi.request.PageRequest

class PageRequest(NativeAuthoringModel):

Authored page acquisition intent, independent of policy binding.

Attributes: target: Original target text. URL validation is deferred until checking or sending; construction does not perform I/O.

Source: python/yosoi/request.py:291

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

target: WebTarget = Field(repr=False)
def model_post_init(self, context: object) -> None:

Create a native request handle without acquiring or validating a URL.

Source: python/yosoi/request.py:302

@property
def id(self) -> RequestId:

Return the request identity retained across policy bindings and sends.

Source: python/yosoi/request.py:307

def check(self) -> None:

Validate target and package-default policy without acquisition I/O.

Raises: RequestError: Request preparation or policy resolution fails.

Source: python/yosoi/request.py:311

def bind(self, policy: Policy) -> BoundPageRequest:

Snapshot a complete policy declaration for subsequent acquisition.

Args: policy: Complete declaration to serialize at binding time.

Returns: A binding unaffected by later edits to the caller policy.

Source: python/yosoi/request.py:319

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

Bind this request to the caller-owned browser Session.

Source: python/yosoi/request.py:330

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

Bind this request to the caller-owned Work lease.

Source: python/yosoi/request.py:334

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

Acquire document representations with defaults.

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:338