Skip to main content

Windows / Linux compatibility in 0.11.2

One py3-none-any wheel supports Windows and Linux with the same sync and async API. Omit server_gpu_backend for host defaults: WARP on Windows, Mesa llvmpipe on Linux. Explicit backends are validated before launch. Windows supports warp/swiftshader; Linux supports llvmpipe/native/software/swiftshader. Paths refer to the host running Python.

Install a native custom YSBrowser and pass its executable_path, or register one with the SDK archive installer. Windows keeps its built-in release URL. Linux requires an explicit native .zip/.7z URL or YSBROWSER_LINUX_BROWSER_URL; an absent Linux URL never falls back to downloading Windows Chrome. The Python wheel does not bundle Chromium. Linux deployments need the native Chromium shared-library, font and sandbox runtime dependencies. WSLg supplies Windows desktop display/audio for a Linux process.

from ysbrowser_sdk.sync_api import YSBrowser
# Windows: executable_path="./browser/chrome.exe"
# Linux: executable_path="./browser/chrome"
with YSBrowser(headless=True) as browser:
    context = browser.new_context()
    page = context.new_page()
    page.set_content("<h1>YSBrowser</h1>")

The remaining reference below also contains Windows-specific path examples.

YSbrowser SDK 0.11.2

配套 YSbrowser 定制浏览器的 Windows / Linux Python SDK,支持同步/异步调用、Context 配置、代理、状态保存和模型鼠标操作。

安装

pip install ysbrowser-sdk
python -m ysbrowser_sdk install

Python >= 3.10;依赖 Patchright 1.64.2、NumPy 和 ONNX Runtime。默认下载内置的 YSBrowser 6.2;需要其他版本时,可用 --url 显式指定压缩包直链。浏览器默认安装到当前目录的 ./browsers,下载压缩包在解压完成后删除。推理不需要 PyTorch。

使用

from ysbrowser_sdk.sync_api import YSBrowser

with YSBrowser(headless=False) as browser:
    context = browser.new_context()
    page = context.new_page()
    page.set_content('<button style="position:absolute;left:700px;top:300px">目标</button>')
    mouse = context.mouse(page)
    result = mouse.move_between(100, 200, 500, 300)
    result = mouse.click_element(page.get_by_role("button", name="目标"))
    print(result.plan.model_id, result.plan.data_source)

异步代码从 ysbrowser_sdk.async_api 导入,在浏览器操作前加 await。

鼠标使用随包条件 Flow Matching Transformer。move()、move_to() 为绝对坐标,move_by() 为相对距离,move_between() 指定起终点。省略 duration_s 自动预测运动时长。原生 page.mouse 和 Locator 保持原生调用方式,模型操作通过 context.mouse(page) 使用。

Metadata

Release files for ysbrowser-sdk 0.11.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ysbrowser-sdk 0.11.2
File Size Uploaded Provenance Actions
ysbrowser_sdk-0.11.2.tar.gz 16.5 MB Without provenance Details for ysbrowser_sdk-0.11.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ysbrowser-sdk 0.11.2
File Interpreter ABI Platform Actions
ysbrowser_sdk-0.11.2-py3-none-any.whl Python 3 none any Details for ysbrowser_sdk-0.11.2-py3-none-any.whl

Total release size: 32.2 MB

Release files / ysbrowser_sdk-0.11.2.tar.gz

Download URL ysbrowser_sdk-0.11.2.tar.gz
Size 16.5 MB
Tags Source
SHA-256 checksum
How to use checksums
baf66d31aad6fa81ca1975e421e47cbec7bdcf48a2183a5ceb00a80f36ab9e60
BLAKE2b-256 checksum
How to use checksums
5ff1e27964b572817550dae8d68115815bd556f17baa4b318918ab458ab7a07e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / ysbrowser_sdk-0.11.2-py3-none-any.whl

Download URL ysbrowser_sdk-0.11.2-py3-none-any.whl
Size 15.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0a88e0568af02242ac1e677dd448ce94e5b3914385fed1c6fb9daa4226491b29
BLAKE2b-256 checksum
How to use checksums
c50e9b0c49df5dab1168a427eda2d9259825b95fd876be84d28deb645a152fbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for ysbrowser-sdk 0.11.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page