Skip to main content

LumiView

Pythonic webview desktop app framework — lightweight, out-of-the-box, async-first.

PyPI Python versions License: MPL-2.0

中文


⚠️ Early Development Stage — APIs May Change

LumiView is currently in alpha. The API is functional but not yet fully stable — method names, parameter structures, and import paths may still change between releases. We use alpha releases to gather early feedback while retaining the flexibility to adjust the API.

Early adopters welcome! Try building an app with it and tell us what works well and what doesn't. Your feedback will directly shape the final stable API. When upgrading, please check the changelog and be prepared to adjust your code.


What is LumiView?

LumiView is an app development framework focused on system webviews. At the core layer, it wraps tao and wry (via wryview); at the top layer, it provides a clean, out-of-the-box, async-first Python API.

Architecture

flowchart TB
    subgraph py["Python Layer"]
        direction LR
        App ~~~ Window ~~~ Bridge ~~~ Task["Task[T]"] ~~~ Serve
    end

    subgraph rust["Rust Layer (PyO3)"]
        TaoWindow ~~~ EventLoop
    end

    subgraph plat["Platform WebView"]
        direction LR
        Win["Windows: WebView2"] ~~~ Mac["macOS: WKWebView"] ~~~ Linux["Linux: WebKitGTK"]
    end

    py --> rust --> plat

Threading model: Main thread (event loop + native ops) → Async thread (asyncio + user coroutines) → Thread pool (synchronous code).

Documentation

Installation

pip install lumiview

Quick Start

from lumiview import App, Window, WindowOptions

app = App(name="HelloLumiView")

async def main():
    win = await Window.create(WindowOptions(
        title="Hello LumiView!",
        url="https://example.com",
        width=900, height=640,
        devtools=True,
    ))
    title = await win.eval_js("document.title")
    print(f"Page title: {title}")

app.run(main)

Key Features

  • 🧵 Unified async/sync — All cross-thread / async operations return Task. await, .result(), or .on_done() — same API, your choice.
  • 🌉 JS ↔ Python Bridge — Expose Python functions to JS via window.lumiview.invoke(). No HTTP server, no manual serialization required.
  • 🪟 Native window effects — Acrylic, Mica, Vibrancy via window-vibrancy.
  • 🎨 Custom titlebar — Declarative data-lumiview-drag-region drag areas + built-in lumiview.window.* JS API (minimize / maximize / close).
  • 📋 Native menus — Per-item on_activate callbacks + global MenuItemActivatedEvent; macOS default app menu installed automatically, window menu bars on Windows.
  • 🎛️ System tray — Cross-platform tray icons with context menus and click events; close-to-tray pattern.
  • 📁 Static serving & WSGI & ASGI — Directly load local files, proxy to WSGI apps (Flask, Django, etc.), or run FastAPI/Starlette apps without external servers.

Logging

LumiView logs to the lumiview logger tree using the standard logging configuration. To see internal diagnostics, raise the level of the lumiview logger:

import logging

logging.getLogger("lumiview").setLevel(logging.INFO)   # lifecycle events
logging.getLogger("lumiview").setLevel(logging.DEBUG)  # + scheduling / dispatch

When reporting a bug, please include the DEBUG log output from your repro — it covers window / tray lifecycle and event dispatch, which usually pinpoints the issue. See CONTRIBUTING.md.

For runnable code, see the examples/ directory.

Examples

Example Description
hello_world.py Minimal app — create window, load URL (async)
hello_world_sync.py Same as above, using .result() — pure synchronous style
bridge_demo.py JS ↔ Python IPC — sync/async commands, error handling
multi_window.py Multi-window + shared WebContext
custom_titlebar.py Frameless window + native effects + drag regions
events.py App/Window hook events + JS event emission
fastapi_demo.py FastAPI running via source=ASGI(...)
django_demo.py Django running via source=WSGI(...) — template rendering, form POST, JSON APIs
menu.py Native menus — accelerators, on_activate callbacks, macOS app menu / Windows window menu bar
tray.py System tray — close-to-tray pattern, tray context menu

Development Status

  • Window management (TaoWindow + Window)
  • WebView embedding (wryview)
  • JS ↔ Python Bridge (invoke/listen IPC)
  • Event class system (WindowEvent / AppEvent)
  • Unified async/sync Task interface
  • Static file serving + WSGI proxy
  • ASGI adapter (FastAPI, Starlette, etc.)
  • Native window effects (Acrylic / Mica / Vibrancy)
  • Custom titlebar
  • Native menus (muda)
  • System tray (tray-icon)
  • API stabilization
  • Complete documentation site

Contributing

This is an early-stage project — your feedback is crucial.

Due to limited personal time, some features may not be completed promptly — PRs and other contributions are warmly welcomed.

Please read CONTRIBUTING.md before submitting PRs — the API is still in flux and significant changes require prior discussion.

License

Copyright (c) 2026 Xiaosu.

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

Metadata

Release files for lumiview 0.1.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 lumiview 0.1.1
File Size Uploaded
lumiview-0.1.1.tar.gz 149.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for lumiview 0.1.1
File
lumiview-0.1.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
lumiview-0.1.1-cp310-abi3-win32.whl CPython 3.10 abi3 Windows x86-32 Details
lumiview-0.1.1-cp310-abi3-manylinux_2_34_x86_64.whl CPython 3.10 abi3 Linux glibc 2.34+ x86-64 Details
lumiview-0.1.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
lumiview-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 4.0 MB

Release files / lumiview-0.1.1.tar.gz

Download URL lumiview-0.1.1.tar.gz
Size 149.6 kB
Tags Source
SHA-256 checksum
How to use checksums
13352acbd1b8caa668c92981dea8f2646a12ce9437106c3724e0fef4fc6b930e
BLAKE2b-256 checksum
How to use checksums
c36a4749595707ac783e46008488c188525accccccc887c08e812acda16ab764
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 28, 2026.

Transparency log

Release files / lumiview-0.1.1-cp310-abi3-win_amd64.whl

Download URL lumiview-0.1.1-cp310-abi3-win_amd64.whl
Size 650.5 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
19879468d3283e4b3c2bd51c40f41a945d290e9604086ad28606cfd4992658b7
BLAKE2b-256 checksum
How to use checksums
39c5e8f56a5dc4a52b5ce31bfd9c186005d78e0768595b06e91518931beff9ed
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 28, 2026.

Transparency log

Release files / lumiview-0.1.1-cp310-abi3-win32.whl

Download URL lumiview-0.1.1-cp310-abi3-win32.whl
Size 601.9 kB
Tags CPython 3.10 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
ea0f3736d33e022602a89036cb1c2bd4a4e617acb589b53bc9f31d7b9f7c0ff9
BLAKE2b-256 checksum
How to use checksums
8edb03cc93c5f3884fb32816793fced5394eb2f39eff5cff3afc03c67dddff86
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 28, 2026.

Transparency log

Release files / lumiview-0.1.1-cp310-abi3-manylinux_2_34_x86_64.whl

Download URL lumiview-0.1.1-cp310-abi3-manylinux_2_34_x86_64.whl
Size 856.8 kB
Tags CPython 3.10 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
0330c477dd8f0799872448bea44fb066daa8ed8982f647a6c09894b9579957f5
BLAKE2b-256 checksum
How to use checksums
4fbef667cd301b9be3231e7358228504265faba6e6ec95679ee703772898b529
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 28, 2026.

Transparency log

Release files / lumiview-0.1.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL lumiview-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Size 865.4 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3a5daa4740770e4dc419796ffc77b72e0bd381e95b9068fc20a2c21a049fb725
BLAKE2b-256 checksum
How to use checksums
02b3d71d2567536102bd2b53dd40ac676961a056331ae9396974265d665bcc96
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 28, 2026.

Transparency log

Release files / lumiview-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL lumiview-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 907.4 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c93827b599e452df5d4ed967fae140dd2dfa21e17c56abcbf5147805c70ec96c
BLAKE2b-256 checksum
How to use checksums
7522b2b0bea2133d923f7fcd3fc99921cc4ff00ae42c51d94430857d0cba0321
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 28, 2026.

Transparency log
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