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.0

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.0
File Size Uploaded
lumiview-0.1.0.tar.gz 149.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for lumiview 0.1.0
File
lumiview-0.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
lumiview-0.1.0-cp310-abi3-win32.whl CPython 3.10 abi3 Windows x86-32 Details
lumiview-0.1.0-cp310-abi3-manylinux_2_34_x86_64.whl CPython 3.10 abi3 Linux glibc 2.34+ x86-64 Details
lumiview-0.1.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
lumiview-0.1.0-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.0.tar.gz

Download URL lumiview-0.1.0.tar.gz
Size 149.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9ba8bc15a80680e48e01012d63440697ef3c9c58f787a66f32a779514813397c
BLAKE2b-256 checksum
How to use checksums
fb03034701110dc624360ce51998cfb5364745afb449f8c38283bac5dd8decfe
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.0-cp310-abi3-win_amd64.whl

Download URL lumiview-0.1.0-cp310-abi3-win_amd64.whl
Size 650.0 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
7b6b4ea81422c235cdac40a70cdc0d482ffad2b277d41c3da48951d8942cdb95
BLAKE2b-256 checksum
How to use checksums
67ba1359f3189e7c862ae3b7ef86c5a7115655d7b2b86ccaa7b62014062ee28f
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.0-cp310-abi3-win32.whl

Download URL lumiview-0.1.0-cp310-abi3-win32.whl
Size 601.3 kB
Tags CPython 3.10 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
1575a3ae92f7a13db233484ec08905e994ec79f4bb231c28c0073d067b0a6c64
BLAKE2b-256 checksum
How to use checksums
8709175e57634b716c57765fa23a1f61c182bde6eb9f9781671d1f9d84d9c755
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.0-cp310-abi3-manylinux_2_34_x86_64.whl

Download URL lumiview-0.1.0-cp310-abi3-manylinux_2_34_x86_64.whl
Size 856.2 kB
Tags CPython 3.10 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
88f7a2ea3b1b3ab512035e35f6e7680015e1f7d5258e8010e4e0c2e01d36d10d
BLAKE2b-256 checksum
How to use checksums
72c02b02540cd83b078db56fdd4a0b08910fe1ac3e628f6de3d74502aaba5eb8
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.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL lumiview-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
Size 864.7 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
87d4d3c8218ba9eb98957d72f345191228023ad9e380f474bd7600ef97943809
BLAKE2b-256 checksum
How to use checksums
3cff7390c4760aa8d7a1edf3febef2096ba267d7e5aab2af1b5e1fe3c837aa39
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.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL lumiview-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 906.7 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
05c34a7112728828eee860034d4abb70897dd220e80dd4d9f5f9b509e00039c3
BLAKE2b-256 checksum
How to use checksums
5c42079f17a6373a9aa81296fbe97be41fee574459c3d4a78f1068d457e94e2f
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