Skip to main content

wryview

PyPI version License Python versions

| English | 简体中文 |


⚠️ Status: Pre-Alpha

wryview is in early development. The API may change without notice between versions. It was created to serve QtWebView, a Qt webview widget project, and the author is a Rust beginner — the binding code may not be idiomatic. Feedback, bug reports, and contributions (code or ideas) are very welcome.


📖 Introduction

wryview is a Python binding for wry, the cross-platform WebView rendering library used by Tauri. It wraps the full wry API — no event loop, no window management, just the webview.

Built on PyO3 and distributed as pre-compiled wheels (no Rust toolchain required for end users).

✨ Features

  • Zero Event Loop — wryview creates the webview as a child of your window. Your GUI framework owns the event loop. No conflicts, no deadlocks.
  • Full wry API — Navigation, JavaScript execution, IPC (window.ipc.postMessage), custom protocols, cookies, drag & drop, proxy, devtools, zoom, and more.
  • Cross-Platform — Windows (WebView2), macOS (WKWebView), Linux (WebKitGTK). Same API everywhere.
  • Framework-Agnostic — Embed into Qt, tkinter, wxPython, or any native window via HWND/NSView/XID.
  • Pre-Built Wheels — pip install wryview just works. No Rust, no cmake, no system deps (beyond the OS webview).

⬇️ Installation

pip install wryview

Windows: WebView2 Runtime is required (pre-installed on Windows 10 1803+, or download).
macOS: WKWebView is built-in.
Linux: Requires libwebkit2gtk-4.1-dev and related packages (see wry docs).

🧑‍💻 Usage

from wryview import WebView

# Embed as a child of any native window (default)
wv = WebView(parent_hwnd, url="https://example.com", devtools=True)

# Fill an independent window — wry manages size via WM_SIZE / layout
wv = WebView(anchor_hwnd, url="https://example.com", as_child=False)

# JS execution
wv.eval_js("document.body.style.background = '#333'")

# JS → Python IPC (JS side: window.ipc.postMessage('hello'))
wv.set_ipc_handler(lambda msg: print(f"JS says: {msg}"))

# Navigation callback
wv.set_on_page_load(lambda event, url: print(f"{event}: {url}"))

# Custom protocol (intercept requests asynchronously)
def my_handler(method, uri, headers, body, respond):
    # respond(status, headers, body) must be called from any thread
    respond(200, {"Content-Type": "text/html"}, b"<h1>Hello from Python!</h1>")

wv = WebView(hwnd, custom_protocols={"myapp": my_handler}, url="myapp://localhost/")

📦 API Summary

Category Methods
Content load_url, load_html, load_url_with_headers, reload, url
JavaScript eval_js, eval_js_with_callback
IPC set_ipc_handler, clear_ipc_handler
Callbacks set_on_navigation, set_on_page_load, set_on_title_changed, set_on_new_window, set_drag_drop_handler
Geometry set_bounds, bounds
Appearance set_visible, set_background_color, focus
DevTools open_devtools, close_devtools, is_devtools_open
Cookies cookies, cookies_for_url, set_cookie, delete_cookie
Other zoom, print, clear_all_browsing_data

Full constructor options: transparent, background_color, incognito, user_agent, autoplay, initialization_script, proxy, back_forward_gestures, clipboard, and more.

🧩 Used By

  • QtWebView — A cross-platform webview widget for Qt (PySide/PyQt), powered by wryview. Embeds a wry WebView as a native child window inside any Qt widget, with a seamless JS bridge and WSGI support.

🤝 Contributing

The author is a Rust beginner — if you see something that could be improved, please open an issue or PR. All contributions (code, ideas, documentation) are welcome.

License

Copyright (c) 2026 Xiaosu.

Distributed under the terms of the Mozilla Public License Version 2.0.

Metadata

Release files for wryview 0.5.1

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

Source distribution (sdist)

Source distribution for wryview 0.5.1
File Size Uploaded
wryview-0.5.1.tar.gz 45.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for wryview 0.5.1
File
wryview-0.5.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
wryview-0.5.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
wryview-0.5.1-cp314-cp314-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.12+ x86-64 Details
wryview-0.5.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
wryview-0.5.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
wryview-0.5.1-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details
wryview-0.5.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
wryview-0.5.1-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
wryview-0.5.1-cp312-cp312-manylinux_2_35_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.35+ x86-64 Details
wryview-0.5.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
wryview-0.5.1-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
wryview-0.5.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
wryview-0.5.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
wryview-0.5.1-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
wryview-0.5.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
wryview-0.5.1-cp310-cp310-manylinux_2_35_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.35+ x86-64 Details

Total release size: 32.6 MB

Release files / wryview-0.5.1.tar.gz

Download URL wryview-0.5.1.tar.gz
Size 45.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e8d28d2678cc9732dd57535c94ebe91462bb5eb0a4565e36be61a596f60831f4
BLAKE2b-256 checksum
How to use checksums
a2e33817e579de68c4b4d26db11623a486b42e7bb060b5c4c2ac4335e5fc202d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp314-cp314-win_amd64.whl

Download URL wryview-0.5.1-cp314-cp314-win_amd64.whl
Size 381.4 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
76082bea52f0f4d42fed218fffc069b8705be272988b56accfda0dd103393cd7
BLAKE2b-256 checksum
How to use checksums
2e34211a272b9d2c705c9c92faec7acd2c29f3cd7bace7700036b6b526a1aac5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp314-cp314-macosx_11_0_arm64.whl

Download URL wryview-0.5.1-cp314-cp314-macosx_11_0_arm64.whl
Size 551.9 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c329f79f3dd969c5704d241d214503f167eb081e327cfebd11bd4987284b89dd
BLAKE2b-256 checksum
How to use checksums
354ea284b8a5fe89589287645a9fcba03dd589689b3ab4ee352b12d38604b382
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp314-cp314-macosx_10_12_x86_64.whl

Download URL wryview-0.5.1-cp314-cp314-macosx_10_12_x86_64.whl
Size 587.6 kB
Tags CPython 3.14 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e69e26117c2d6f13870c45259452c132a493605f819e50b019c823e2101db75e
BLAKE2b-256 checksum
How to use checksums
a4934cec8bf5f23eb04d0889aa54f3d83688fae4c55a676093b66310efc4fcb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp313-cp313-win_amd64.whl

Download URL wryview-0.5.1-cp313-cp313-win_amd64.whl
Size 381.9 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
fda5c1600853a9913cd8a8263af343a3e0af1fb382b32222be4cacab469b754b
BLAKE2b-256 checksum
How to use checksums
9bcd55e92bed7a4891d9e319e33f135ac7646442a312e245520af417e5538c53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL wryview-0.5.1-cp313-cp313-macosx_11_0_arm64.whl
Size 551.9 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
57bfb04c04c64bb0d5bfa9463d99a66b10c9d5a2d771ab43a166f3803275eb86
BLAKE2b-256 checksum
How to use checksums
c43e36775e77e49411c741935141ef65c24434d0f2e45c75dd0557f9ca61c879
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp313-cp313-macosx_10_12_x86_64.whl

Download URL wryview-0.5.1-cp313-cp313-macosx_10_12_x86_64.whl
Size 587.4 kB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f6a56185a0930299281f20c6bfed274a400b7a53e1a8dc362e9c5a7e13085b52
BLAKE2b-256 checksum
How to use checksums
1a5e36946914b881bf03f8e10026b24ad889f07c50f44e897758f479045b0676
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp312-cp312-win_amd64.whl

Download URL wryview-0.5.1-cp312-cp312-win_amd64.whl
Size 381.1 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
2f96040411d247faad99db1a9e2fbcc438710b252bc52ecb5a76c50de86592b4
BLAKE2b-256 checksum
How to use checksums
a7dc0c5cf2fd2a1ea1979445b70922f43efb34243e4fdb73b9474b6ecd53fe44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp312-cp312-win32.whl

Download URL wryview-0.5.1-cp312-cp312-win32.whl
Size 346.9 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
d3412e744c3493f1065a0e053b085db4238aa0bd5e6f8a9fc324d4899734616a
BLAKE2b-256 checksum
How to use checksums
91b8c5ceac5cf2378b8bc8633bab33a35654bfacaccf97b3469cc818796c7c76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp312-cp312-manylinux_2_35_x86_64.whl

Download URL wryview-0.5.1-cp312-cp312-manylinux_2_35_x86_64.whl
Size 12.9 MB
Tags CPython 3.12 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
1f82315626a46ebd438be44255f8f6a9220afae871209bcb7e9268c2ea81560a
BLAKE2b-256 checksum
How to use checksums
033fedada787af91546d5a6a8050a1fa4411831c95299cef0ceef3d5c4823c63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL wryview-0.5.1-cp312-cp312-macosx_11_0_arm64.whl
Size 551.5 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0838de2f929db818d1b1cce8d1a9e39349f4cac2de7aae0c79b7346485a7e8b7
BLAKE2b-256 checksum
How to use checksums
fa9e39796c914cf7821a8c95304713ed9ad93bd0fb0ba866ddbc3015b3200967
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp312-cp312-macosx_10_12_x86_64.whl

Download URL wryview-0.5.1-cp312-cp312-macosx_10_12_x86_64.whl
Size 586.6 kB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b9aa4b23972489445562fc60de889a6148724231e36c7615f737576c12851b73
BLAKE2b-256 checksum
How to use checksums
6b770eb82a29b0d8355038acd86fc7fe47467cd16fba436df9663f106d8b3147
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp311-cp311-win_amd64.whl

Download URL wryview-0.5.1-cp311-cp311-win_amd64.whl
Size 384.1 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
305fbe0b9dfb8ec031f275f9a812d160bb093b4c22fe5aec4c4f6ced36bb3a8a
BLAKE2b-256 checksum
How to use checksums
4236988f6b93673f69c724a4fc93114a3ac95b666997108afd84dd8dee8a2e36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL wryview-0.5.1-cp311-cp311-macosx_11_0_arm64.whl
Size 553.2 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2a21c45b6dfba5b5340a81f831a3356230d984e68edb17e9af9362974c8cd3e0
BLAKE2b-256 checksum
How to use checksums
0ed34396c860f5d9deb7608e025e1e58864132ebed4248a829658ff6de038090
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp311-cp311-macosx_10_12_x86_64.whl

Download URL wryview-0.5.1-cp311-cp311-macosx_10_12_x86_64.whl
Size 580.6 kB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7dbf06a0aaae0572d5a39ca677d22f9eae5e38d5f2fc12efce45802398d19f02
BLAKE2b-256 checksum
How to use checksums
48518d8bccc84e3d99d0b9e59906f50056f40be79fbd715225042dbd7578c9b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp310-cp310-win_amd64.whl

Download URL wryview-0.5.1-cp310-cp310-win_amd64.whl
Size 384.9 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
3e577f777fd253abb95cf189385d315a3557507cbbe5c1e4684b13180e4028a5
BLAKE2b-256 checksum
How to use checksums
7cef3867fe4d8fa96601cb057ea5314d516b6ed15220a66028f2fa668769d332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / wryview-0.5.1-cp310-cp310-manylinux_2_35_x86_64.whl

Download URL wryview-0.5.1-cp310-cp310-manylinux_2_35_x86_64.whl
Size 12.9 MB
Tags CPython 3.10 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
336c20303f2c4d1c6d56e4798fcad5a34b59da3e391f02869abca27a3dd49e15
BLAKE2b-256 checksum
How to use checksums
0d19e7690461511fa206834a40c9ecf8d4ba6b759c357d4431260ba0acbb2ee4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.4

6 release files

0.5.3

6 release files

0.5.2

6 release files

This release

0.5.1 This release

17 release files

0.4.0

17 release files

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