Turn your Python code into a desktop app with a Chromium UI.
Bring your Python libraries, data, and application logic. Build the interface with HTML, CSS, and JavaScript. Pytonium connects them in a desktop window powered by the Chromium Embedded Framework (CEF).
Create a dashboard for a Python workflow, an interactive data tool, or a 3D viewer. Start with a single HTML file, bring a frontend built with React, Svelte, or Vue, or author reactive UI components in Python.
Get started · Documentation · Explore examples
- Put your Python code behind a real interface. Call Python functions from JavaScript and receive results as Promises. Use your existing libraries for the work behind the UI.
- Design with the browser tools you know. Use modern CSS, Canvas, and WebGL, with Chromium rendering your interface inside a native desktop window.
- Keep the interface connected to your data. Share state between Python and JavaScript and subscribe to changes for live charts, progress displays, and interactive controls.
- Make the window part of your design. Create custom HTML/CSS title bars, frameless windows, context menus, and multi-window apps.
- Load your UI locally. Serve bundled frontend files through URLs such as
app://index.html, without running a separate web server.
For frontend development, Pytonium can generate TypeScript definitions for your Python bindings. Prefer writing the UI in Python? Explore reactive components.
Install Pytonium:
pip install PytoniumSave this as main.py:
import time
from Pytonium import Pytonium
app = Pytonium()
app.initialize("https://example.com", 800, 600)
while app.is_running():
time.sleep(0.01)
app.update_message_loop()Run python main.py to open a Chromium desktop window. Close the window to exit.
Next: build your first app to load your own HTML, call Python from JavaScript, and send state updates to the page.
Requires Python 3.10+ on Windows 10/11 or Linux X11, with x86_64 architecture. macOS is not supported yet. The first import extracts the bundled Chromium runtime and takes a little longer. See the installation guide for setup and Linux dependencies.
Explore the example apps for ideas and starting points:
| Example | What to explore |
|---|---|
| Data Studio | A local data analysis UI with Python handling the data |
| Control Center | A dashboard with multiple panels driven by Python state |
| Babylon.js 3D | A WebGL scene with local 3D assets |
| Frameless Window | A custom HTML/CSS title bar and window controls |
| Reactive App | An interface authored with Python reactive components |
Find more examples and walkthroughs in the examples guide.
- Quick start — application lifecycle, local content, and the JavaScript bridge.
- Python–JavaScript bindings and state management — connect your UI to your application.
- API reference — methods, arguments, and behavior.
- Build from source — work on Pytonium itself.
Bug reports, feature requests, documentation improvements, and example apps are welcome. Open an issue or read the contributing guide to get started.
To build the Markdown documentation locally, install requirements-docs.txt
and run python build_docs.py. Use python build_docs.py --serve for a
live-reloading preview.
Pytonium is MIT licensed. See third-party licenses for CEF and other included dependencies.