Skip to main content

allwright Python client

This folder contains the high-level Python client for the allwright engine.

It loads the shared proto/engine/v1/engine.proto contract dynamically at runtime and exposes a browser/page API instead of raw gRPC channel setup.

Install

pip install allwright

Installing from a local checkout instead:

pip install -e ./python

Example

Runnable examples include examples/web_basic.py, examples/android_basic.py, examples/ios_basic.py, examples/macos_basic.py, and examples/windows_basic.py. The desktop examples default to Calculator on macOS and Notepad on Windows and accept ALLWRIGHT_MAC_APP_ID or ALLWRIGHT_WINDOWS_APP_ID.

from allwright import firefox

browser = firefox.launch()
page = browser.page()
page.goto("https://themoderninternet.vercel.app")
page.click(
    "xpath=//div[contains(@class,'card')][.//h2[normalize-space()='Form Inputs']]"
    "//button[normalize-space()='Visit page']"
)
page.wait_for_selector('xpath=//h1[text()="Form Inputs"]')
browser.close()

Web clicks accept ClickOptions(button="left" | "middle" | "right", click_count=1 | 2 | 3). Use page.dblclick(selector) or locator.dblclick() for the common double-click case.

For an action that opens a tab, register the generic typed hook first:

from allwright import hooks

hook = page.register_hook(hooks.new_page)
page.click("a[target=_blank]")
new_page = hook.wait()
hook = page.register_hook(hooks.file_chooser)
page.click("button.open-upload")
chooser = hook.wait()
chooser.set_files("fixtures/document.pdf")
hook = page.register_hook(hooks.download)
page.click("a.download-report")
download = hook.wait()
download.save_as(f"artifacts/{download.suggested_filename}")

These paths are local to the Python test process and are streamed through a remote Allwright server when necessary. Android app contexts support hooks.file_chooser and hooks.download with the same lifecycle.

Web state reads: page.url(), locator.input_value(), locator.selected_options(), locator.selected_text(), locator.is_checked(), locator.get_attribute(name), and locator.bounding_box(). Element methods also accept selectors on Page. Selected options return CapturedOption(value, label, index) objects; boxes return BoundingBox(x, y, width, height) in frame/page viewport CSS pixels. Missing attributes, unsupported text selections, and hidden/zero-area boxes return None. Existing text_content() and inner_text() read element text. See the shared semantics.

Native apps and locators also expose input_value, is_checked, get_attribute, and bounding_box across Android, iOS, macOS, and Windows. Native boxes use platform screen coordinates; selected-option and selected-text reads remain web-only.

Metadata

Release files for allwright 0.2.8

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

Source distribution (sdist)

Source distribution for allwright 0.2.8
File Size Uploaded Provenance Actions
allwright-0.2.8.tar.gz 37.6 kB With provenance Details for allwright-0.2.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for allwright 0.2.8
File Interpreter ABI Platform Actions
allwright-0.2.8-py3-none-any.whl Python 3 none any Details for allwright-0.2.8-py3-none-any.whl

Total release size: 78.7 kB

Release files / allwright-0.2.8.tar.gz

Download URL allwright-0.2.8.tar.gz
Size 37.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ac5662b4bbec1df8cc9943669c50a5cbeab818d43774f4fc14bbfc07d452bd01
BLAKE2b-256 checksum
How to use checksums
a26c4fae4aab73c573faa3842854f9938bf7d66aef62bafbfbc48fe2b596beb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / allwright-0.2.8-py3-none-any.whl

Download URL allwright-0.2.8-py3-none-any.whl
Size 41.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33ae6648d9146827cb421817b1decffa31d3c27d637a2bc98ab6809d2efd48b2
BLAKE2b-256 checksum
How to use checksums
73f0efa564db8091536a66e6a8e7738fda7deb29c04b373e0fe0afa6c70194b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for allwright 0.2.8

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for allwright-0.2.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.8 This release

2 release files Full provenance

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