Skip to content
YosoiDocs

BrowserConfig

yosoi.policy.BrowserConfig

class BrowserConfig(Model):

Select a browser implementation without installing or launching it.

Rust validates the complete declaration. Capability never grants arbitrary JavaScript permission, and an optional engine never silently falls back.

Attributes: engine: Chrome/CDP by default, or optional Firefox/Moli native BiDi. executable: Absolute installed binary path; omitted paths use engine discovery. endpoint: Existing BiDi WebSocket service, mutually exclusive with executable. User information, queries and fragments are rejected. Debug repr omits it. moli_profile: DOM-only or on-demand layout. Layout is not native headful mode. moli_resources: Load optional Moli image/font/media resources deliberately. moli_allow_private_networks: Explicit exception to owned Moli’s native private network blocking. A client cannot attest a shared service’s egress policy.

Source: python/yosoi/policy.py:1138

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

model_config = ConfigDict(hide_input_in_errors=True)
engine: BrowserEngine = 'chrome'
executable: Path | None = None
endpoint: str | None = Field(default=None, repr=False, max_length=4096)
moli_profile: MoliProfile = 'dom'
moli_resources: StrictBool = False
moli_allow_private_networks: StrictBool = False
def is_default(self) -> bool:

Return whether canonical policy serialization may omit this declaration.

Source: python/yosoi/policy.py:1164