py-Vwayland
Spawn virtual Wayland compositors from Python, run GUI programs inside them, capture their screens, and inject mouse/keyboard events.
No desktop environment required: one program per compositor, fullscreen. The compositor is written in Rust (Smithay) and bundled into the package, so no system compositor or display server is needed (in headless mode).
import vwayland
with vwayland.spawn(width=1280, height=720, headless=True) as comp:
comp.launch("my-gui-app")
img = comp.screenshot()
img.save("screen.png")
comp.click(100, 200)
comp.type_text("hello")
comp.key("enter")
Installation
$ pip install py-vwayland
The wheel bundles the compositor binary and its native libraries, so headless
mode works out of the box on any x86_64 Linux with glibc ≥ 2.28 — no display
server, GPU, or extra packages required. For screenshot().to_pil():
$ pip install py-vwayland[pillow]
Quick sanity check:
$ python3 -c "import vwayland; c = vwayland.spawn(); print(c.info()); c.kill()"
Building from source and platform details (windowed mode, musl, other architectures): see docs/installation.md.
Key features
- Create/list/terminate compositors (
spawn,list,kill) - Open/close a program inside a compositor (
launch,close_app) - Resize the screen (
resize) - Switch between headless and windowed mode (
set_headless) - Capture the screen (
screenshot→ PNG) - Mouse move/click/drag/scroll (
move_to,click,drag,scroll) - Keyboard input (
key,combo,type_text— any language/Unicode typing) - Clipboard and Unicode text paste (
clipboard_get/clipboard_set/clipboard_clear,paste_text)
Documentation
See docs/ for full documentation.
- Overview and motivation
- Installation and compatibility
- Python API reference
- CLI reference
- Architecture and IPC protocol
License
Apache License 2.0 — see LICENSE.
Metadata
Release files for py-Vwayland 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py_vwayland-0.2.0.tar.gz | 3.0 MB | With provenance | Details for py_vwayland-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_vwayland-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for py_vwayland-0.2.0-py3-none-any.whl |
Total release size: 5.8 MB
Release files / py_vwayland-0.2.0.tar.gz
| Download URL | py_vwayland-0.2.0.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1cc37b197564486282340c1932c67603af532734c4c176554ca4b9eda9ff334
|
|
BLAKE2b-256 checksum How to use checksums |
466ed5cafa2ac94556e6591e8ec71deb127d2cff977bad19e253b200f9db07fc
|
| 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 Oct 9, 2026.
Transparency logRelease files / py_vwayland-0.2.0-py3-none-any.whl
| Download URL | py_vwayland-0.2.0-py3-none-any.whl |
|---|---|
| Size | 2.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aea113d199299f3b714b2e07bbb572e61a355bae54a251f1375267b5af61a55d
|
|
BLAKE2b-256 checksum How to use checksums |
9ea4dadd91c231373039cc825fb69731fe03dae3c31eb818bb57612a3c1d47c3
|
| 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 Oct 9, 2026.
Transparency logSecurity for py-Vwayland 0.2.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 py_vwayland-0.2.0.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 Oct 9, 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.