Pytonium
Build Python desktop apps with HTML, CSS, and JavaScript.
Pytonium embeds the Chromium Embedded Framework (CEF 145 / Chromium 145) in Python, giving you the full power of modern web technologies for your desktop application UI.
Install
pip install Pytonium
Quick Start
import time
from Pytonium import Pytonium
p = Pytonium()
p.initialize("https://example.com", 800, 600)
while p.is_running():
time.sleep(0.01)
p.update_message_loop()
That's it -- a native desktop window running a full Chromium browser, in 7 lines of Python.
Features
- Chromium rendering -- Full browser engine for HTML/CSS/JS, use React, Tailwind, or any web framework
- Python-JS bridge -- Call Python functions from JavaScript, return values via Promises
- State management -- Shared state between Python and JS with namespace subscriptions and DOM events
- Custom URL schemes -- Map
myapp://to a local folder for loading HTML, assets, and 3D models - Frameless windows -- Build custom window chrome with HTML/CSS, Electron-style
- Window control -- Position, size, minimize, maximize, fullscreen, drag, native handle access
- Multi-instance -- Run multiple browser windows in a single process
- TypeScript definitions -- Auto-generate
.d.tsfiles for IDE auto-completion - Async support --
asynciointegration withrun_pytonium_async - Event callbacks -- React to title changes, URL navigation, and fullscreen state
- Cross-platform -- Windows 11 and Linux
Example: Python + JavaScript Interop
from Pytonium import Pytonium, returns_value_to_javascript
p = Pytonium()
@returns_value_to_javascript("any")
def get_data():
return {"answer": 42, "source": "Python"}
p.bind_function_to_javascript(get_data, javascript_object="api")
p.initialize("file:///path/to/index.html", 800, 600)
while p.is_running():
p.update_message_loop()
// In your HTML/JS -- wait for bindings, then call Python
if (window.PytoniumReady) {
callPython();
} else {
window.addEventListener('PytoniumReady', callPython);
}
async function callPython() {
const result = await Pytonium.api.get_data();
console.log(result.answer); // 42
}
Examples
Complete examples are included in the pytonium_examples/ directory:
| Example | Description |
|---|---|
| Simple App | Bindings, state management, and context menus |
| Frameless Window | Custom HTML/CSS titlebar with window controls |
| Babylon.js 3D | 3D rendering with custom schemes and MIME types |
| Line Graph | Real-time data visualization with state updates |
| Control Center | Dashboard with multiple data panels |
| Data Studio | Interactive data analysis tool |
Documentation
Full documentation is available at maximilian-winter.github.io/pytonium, covering:
- Getting Started -- Installation, quick start, and first app tutorial
- Guides -- JS bindings, state management, frameless windows, async, and more
- API Reference -- Complete Pytonium class reference (~35 methods)
- Examples -- Walkthroughs of each example app
- Building from Source -- Windows and Linux build instructions
Platform Support
| Platform | Status |
|---|---|
| Windows 11 | Fully supported |
| Linux (X11) | Fully supported |
| Python 3.10+ | Required (64-bit) |
Building from Source
See the Build Guide or how-to-build-from-source.md for detailed instructions.
# Quick version (Windows)
pip install build scikit-build cmake ninja Cython
cmake -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
cmake --build cmake-build-release --target pytonium_subprocess --config Release
cd building_pythonium_core && python prepare_build.py --platform windows --build-dir ../cmake-build-release
cd ../src/pytonium_python_framework && python -m build --wheel
pip install dist/pytonium-*.whl --force-reinstall
License
MIT License -- Pytonium also includes CEF (BSD) and nlohmann/json (MIT).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytonium-0.0.31-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: pytonium-0.0.31-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 166.4 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78c0dcfeda3fcbc60b835154a383e36832cb2c288504107dbd69d22182316948
|
|
| MD5 |
199f546158675544d7ff4cf565e27a3e
|
|
| BLAKE2b-256 |
6210e88f8b2e91da8e134f4d2eeb49530f11c822c60c5ed1d502955b0b34ae35
|
Provenance
The following attestation bundles were made for pytonium-0.0.31-cp312-cp312-win_amd64.whl:
Publisher:
build-wheels.yml on Maximilian-Winter/pytonium
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytonium-0.0.31-cp312-cp312-win_amd64.whl -
Subject digest:
78c0dcfeda3fcbc60b835154a383e36832cb2c288504107dbd69d22182316948 - Sigstore transparency entry: 2699495830
- Sigstore integration time:
-
Permalink:
Maximilian-Winter/pytonium@c62b797ca97b046b1a4feb66dfbde8c0dc07219d -
Branch / Tag:
refs/tags/0.0.31 - Owner: https://github.com/Maximilian-Winter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@c62b797ca97b046b1a4feb66dfbde8c0dc07219d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytonium-0.0.31-cp312-cp312-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: pytonium-0.0.31-cp312-cp312-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 147.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cb39a19d263179633b9e2fe0cd988555441875a4ede13f7974bd4f39a4a4cc2
|
|
| MD5 |
c8b617f8821cca0d3b37bf2cc3deec60
|
|
| BLAKE2b-256 |
55ec8e5c115c281c46bf7fc3046bc1543b17f6214f99d16994487dc4f599198f
|
Provenance
The following attestation bundles were made for pytonium-0.0.31-cp312-cp312-manylinux_2_39_x86_64.whl:
Publisher:
build-wheels.yml on Maximilian-Winter/pytonium
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytonium-0.0.31-cp312-cp312-manylinux_2_39_x86_64.whl -
Subject digest:
3cb39a19d263179633b9e2fe0cd988555441875a4ede13f7974bd4f39a4a4cc2 - Sigstore transparency entry: 2699496043
- Sigstore integration time:
-
Permalink:
Maximilian-Winter/pytonium@c62b797ca97b046b1a4feb66dfbde8c0dc07219d -
Branch / Tag:
refs/tags/0.0.31 - Owner: https://github.com/Maximilian-Winter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-wheels.yml@c62b797ca97b046b1a4feb66dfbde8c0dc07219d -
Trigger Event:
push
-
Statement type: