Dry
One native window rendering a web frontend, and a Bridge to Python.
Dry is a small, dependency-free library for building a desktop UI out of HTML, CSS and JavaScript, driven by Python. It is written in Rust on top of Wry, and renders with the web engine the operating system already ships — WebView2 on Windows, WKWebView on macOS.
Installation
pip install dry-webview
Requires CPython 3.14 or newer, on Windows or macOS.
Getting started
from dry import Webview
HTML = """
<button onclick="greet()">Greet</button>
<p id="out"></p>
<script>
async function greet() {
out.textContent = await window.dry.api.hello('World');
}
</script>
"""
def hello(name: str) -> str:
return f'Hello, {name}!'
wv = Webview(
app_id='com.example.hello',
title='Hello',
html=HTML,
api={'hello': hello},
)
wv.run()
wv.run() opens the window and hands it the process: closing the window exits
the interpreter, so nothing written after it runs.
Render an HTML string, a URL, or a directory of compiled assets. Call Python
from JavaScript and get a Promise back. Emit Events in either direction.
Drop the native titlebar and draw your own. Move, resize, hide and read the
open window from Python. More examples are in
examples/.
Documentation
Everything else lives on the documentation site:
- Content modes — an HTML string, a URL, or a served directory
- The Bridge — Calls, Events, and the contract on what may cross
- Custom titlebars and window Events
- Runtime window control — moving, resizing, hiding and reading the open window from Python
- Errors and logging
- Reference
- Architecture decisions
Upgrading from 0.3.x
0.4.0 is a breaking release. The JavaScript surface moved under
window.dry, content modes are explicit, sizes are logical pixels, the Bridge
contract is now strictly the JSON data model, application data moved to an App
id, and the Python floor is 3.14. Each break, and what to do about it, is in
the migration
guide. The
changelog has
the full list.
Platform support
| Platform | Status |
|---|---|
| Windows (x86-64) | Supported. Built and tested on every commit |
| macOS (universal2) | Supported. Built and tested on every commit |
| Linux | Not supported |
| Python | Status |
|---|---|
| CPython 3.14 and newer | Supported, via a single abi3 wheel per platform |
| CPython 3.13 and older | Not supported |
| Free-threaded builds | Not supported until abi3t |
Contributing
Issues and specs live as GitHub issues. Building from source needs a Rust toolchain and maturin:
uv run maturin develop --uv
uv run python -m unittest discover -s tests
cargo test
The documentation site is Markdown under docs/guide, built with
mdBook: mdbook serve docs previews it.
License
MIT. See LICENSE.
Metadata
Release files for dry-webview 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dry_webview-0.4.0-cp314-abi3-win_amd64.whl | CPython 3.14 | abi3 | Windows x86-64 | Details for dry_webview-0.4.0-cp314-abi3-win_amd64.whl |
| dry_webview-0.4.0-cp314-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.14 | abi3 | macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 | Details for dry_webview-0.4.0-cp314-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
Total release size: 1.8 MB
Release files / dry_webview-0.4.0-cp314-abi3-win_amd64.whl
| Download URL | dry_webview-0.4.0-cp314-abi3-win_amd64.whl |
|---|---|
| Size | 548.6 kB |
| Tags | CPython 3.14 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
962e996df7f389b0d6b4ebeba08f4d65084a7b9be708a4c1a5e811830e31d438
|
|
BLAKE2b-256 checksum How to use checksums |
03b67704e2981b36e29adea1b5c7899ea02e543de3aa5e7b8fd5153cf91fed3c
|
| 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 Aug 8, 2026.
Transparency logRelease files / dry_webview-0.4.0-cp314-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | dry_webview-0.4.0-cp314-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2f6d6015935bf5893ce13d025afbd84e6bd45467b3eb803c96fb82be4f42be04
|
|
BLAKE2b-256 checksum How to use checksums |
543012487a6b08a43ac8844f59cba6235339fce43dd8be5d6189012ad6e783db
|
| 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 Aug 8, 2026.
Transparency logSecurity for dry-webview 0.4.0
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.
Attestation for dry_webview-0.4.0-cp314-abi3-win_amd64.whl
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 Aug 8, 2026.
Transparency logA 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.