Observed since 20 Oct, 21:04 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python bindings for AffineUI — GPU-accelerated HTML/CSS UI for tools and game engines. EXPERIMENTAL preview; APIs will change.
A small, HTML5-compliant, GPU-accelerated UI renderer with an integrated component framework — a native replacement for Electron and Qt, for Python.
Think Gradio, but native: describe your UI as a tree of typed components, get a real HTML/CSS renderer with a browser-quality cascade, animations, hit-testing, and 120 Hz paint — all in one binary, no browser embedded, no JavaScript runtime, no Electron. Bootstrap and Tailwind-style stylesheets render out of the box; the bundled default is Decius CSS.
Status: alpha. Broad standards coverage, real UIs run today, but expect bugs and expect APIs to move.
Note: this release carries no
-alphasuffix in its version number, but AffineUI is alpha and pre-1.0. Features, APIs, and the set of supported platforms are all still in flux.Verified on: Linux (Ubuntu, x86-64), macOS (Apple Silicon), and Windows (x86-64) — the full suite (600+ tests) passes on each. Other platforms and architectures are not yet supported.
pip install affineui
Prebuilt wheels ship for CPython 3.9 – 3.13 on Linux (manylinux_2_28
x86_64), macOS (universal2 — Intel + Apple Silicon), and Windows AMD64.
For a source install from a clone of the main repo:
pip install ./bindings/python # regular install
pip install -e ./bindings/python # editable / dev
import affineui as ui
view = ui.View(ui.ViewTheme.Decius)
view.begin()
view.heading(1, "Hello from Python")
view.paragraph("AffineUI — native HTML/CSS, no browser, no JS.")
view.button("Click me", primary=True, key="go").on_click(lambda: print("clicked!"))
view.end()
app = ui.App(title="Hello", width=720, height=480)
app.load_view(view)
raise SystemExit(app.run())
import affineui as ui
app = ui.App(title="Hello", width=720, height=480)
app.load_html("""
<main style="padding: 24px; font-family: sans-serif;">
<h1>Hello from Python</h1>
<p>AffineUI is alive.</p>
<button>Click me</button>
</main>
""")
raise SystemExit(app.run())
import affineui as ui
doc = ui.document(
"<main><h1>Hello</h1><p>Layout without a window.</p></main>",
"main { padding: 16px; } h1 { font-size: 32px; }",
width=640, height=360,
)
print(ui.version(), doc.content_size())
A live-updating counter — state lives in Python; the reconciler diffs your view and patches the DOM in place. CSS hover/focus/animation keeps running between updates.
import affineui as ui
count = 0
app = ui.App(title="Counter", width=480, height=240)
def build_view() -> ui.View:
view = ui.View(ui.ViewTheme.Decius)
view.begin()
view.heading(1, f"Count: {count}")
view.button("Increment", primary=True, key="inc").on_click(bump)
view.button("Reset", key="reset").on_click(reset)
view.end()
return view
def bump():
global count
count += 1
app.load_view(build_view())
def reset():
global count
count = 0
app.load_view(build_view())
app.load_view(build_view())
raise SystemExit(app.run())
The main repo's bindings/python/examples/
ships larger runnable programs — a component gallery, a photo editor,
and a full Bootstrap-styled panel demo.
Decius CSS is the default when you use the component API. To render your own HTML with a framework stylesheet, tell the app where its asset folder is:
app = ui.App(
title="Bootstrap demo",
width=1280,
height=720,
asset_folders=["examples"], # so href="frameworks/..." resolves
)
app.load_html("""
<link rel="stylesheet" href="frameworks/css/bootstrap-5.3.8.min.css">
<div class="container py-4">
<button class="btn btn-primary">Native Bootstrap</button>
</div>
""")
raise SystemExit(app.run())
Bootstrap 4.6 / 5.3, Tailwind-style utility classes, and Ant-style component markup all render — this is a real CSS engine, not an HTML-shaped layout solver.
fetch, no cookies.See the main README for the full picture, embedding notes, C++ / Rust / C# APIs, and the demo gallery.
pypistats · 63 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-20 – 2026-10-20 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-19 – 2026-10-19 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-18 – 2026-10-18 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-16 – 2026-10-16 | 2 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-14 – 2026-10-14 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-13 – 2026-10-13 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-11 – 2026-10-11 | 19 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-10 – 2026-10-10 | 49 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-09 – 2026-10-09 | 2 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-08 – 2026-10-08 | 3 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-07 – 2026-10-07 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-06 – 2026-10-06 | 17 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-05 – 2026-10-05 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-04 – 2026-10-04 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-10-02 – 2026-10-02 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-30 – 2026-09-30 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-28 – 2026-09-28 | 2 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-27 – 2026-09-27 | 3 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-26 – 2026-09-26 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-25 – 2026-09-25 | 7 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-24 – 2026-09-24 | 48 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-23 – 2026-09-23 | 5 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-22 – 2026-09-22 | 20 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-21 – 2026-09-21 | 14 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-20 – 2026-09-20 | 49 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-18 – 2026-09-18 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-16 – 2026-09-16 | 48 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-14 – 2026-09-14 | 11 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-13 – 2026-09-13 | 49 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-12 – 2026-09-12 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-10 – 2026-09-10 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-09 – 2026-09-09 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-08 – 2026-09-08 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-07 – 2026-09-07 | 8 | 2026-10-21T10:05:46.8985824Z |
| 2026-09-06 – 2026-09-06 | 55 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-31 – 2026-08-31 | 2 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-28 – 2026-08-28 | 2 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-27 – 2026-08-27 | 49 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-26 – 2026-08-26 | 2 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-24 – 2026-08-24 | 11 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-23 – 2026-08-23 | 50 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-22 – 2026-08-22 | 6 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-21 – 2026-08-21 | 12 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-20 – 2026-08-20 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-17 – 2026-08-17 | 16 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-15 – 2026-08-15 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-14 – 2026-08-14 | 4 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-10 – 2026-08-10 | 3 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-09 – 2026-08-09 | 3 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-08 – 2026-08-08 | 18 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-07 – 2026-08-07 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-06 – 2026-08-06 | 7 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-03 – 2026-08-03 | 51 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-02 – 2026-08-02 | 2 | 2026-10-21T10:05:46.8985824Z |
| 2026-08-01 – 2026-08-01 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-07-30 – 2026-07-30 | 80 | 2026-10-21T10:05:46.8985824Z |
| 2026-07-29 – 2026-07-29 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-07-28 – 2026-07-28 | 38 | 2026-10-21T10:05:46.8985824Z |
| 2026-07-27 – 2026-07-27 | 10 | 2026-10-21T10:05:46.8985824Z |
| 2026-07-26 – 2026-07-26 | 18 | 2026-10-21T10:05:46.8985824Z |
| 2026-07-25 – 2026-07-25 | 1 | 2026-10-21T10:05:46.8985824Z |
| 2026-07-24 – 2026-07-24 | 25 | 2026-10-21T10:05:46.8985824Z |
| 2026-07-23 – 2026-07-23 | 70 | 2026-10-21T10:05:46.8985824Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.4.2 | 13 Jul 2026 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:04 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:27fd6b415d96711044cba85ec1d3bef51196c7829e1484a9fe1d7432356a46bf