PyPositron is a Python-powered desktop app framework that lets you build cross-platform apps using HTML, CSS, and Python—just like Electron, but with Python as the backend.
Combine the power of Python with the flexibility of web technologies to create amazing desktop applications.
Use Python for all your backend logic while building beautiful UIs with HTML and CSS.
Use Bootstrap, Tailwind, or any HTML/CSS framework. Compatible with UI builders and AI tools.
Efficient installer that uses existing browsers instead of bundling a new one for every app.
Build once, run everywhere. Support for Windows, Linux, and macOS (coming soon).
Built-in virtual environment support for clean dependency management.
Generate UI with AI tools without needing proprietary system prompts.
Feature | PyPositron | Electron | PyQt (or any other Python UI framework) |
---|---|---|---|
Language | Python, HTML, CSS and JS (optional) | HTML, CSS, JS, C or C++ | Python only |
Supported UI Frameworks | Any HTML/CSS/JS framework | Any web framework | Limited to Qt |
Performance | Lightweight | Heavyweight | Heavyweight |
Compatible with AI tools? | Requires docs reference for backend | Yes | Limited |
Create your first PyPositron app with just a few commands.
pip install py-positron
positron create
positron start
import py_positron as positron
import time
def main(ui):
button = ui.document.getElementById("btn")
def on_click():
timestr = time.strftime("%H:%M:%S")
ui.document.alert(f"Time: {timestr}")
button.addEventListener("click", on_click)
positron.openUI("frontend/index.html", main)
<!DOCTYPE html>
<html>
<body>
<h1>Hello from PyPositron!</h1>
<button id="btn">Show Time</button>
</body>
</html>
Powerful command-line tools to manage your PyPositron projects.
positron create
Create a new PyPositron project with interactive setup
positron start
Run your PyPositron app
positron install <package>
Install Python packages into the project virtual environment
positron venv
Create a virtual environment inside your project folder
PyPositron supports all HTML/CSS frameworks (including the ones not on this list), allowing you to effortlessly build beautiful UIs.
And many more! Use any HTML/CSS/JS framework you like, along with any HTML/CSS/JS web development IDE or drag-and-drop builder (like Bootstrap Studio).
Join the PyPositron community and start building cross-platform desktop apps with Python today.