PyPositron Alpha
Features Quick Start Docs GitHub
Currently in Alpha

Build Desktop Apps with Python & HTML

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.

Why Choose PyPositron?

Combine the power of Python with the flexibility of web technologies to create amazing desktop applications.

Python Backend

Use Python for all your backend logic while building beautiful UIs with HTML and CSS.

Any UI Framework

Use Bootstrap, Tailwind, or any HTML/CSS framework. Compatible with UI builders and AI tools.

Lightweight

Efficient installer that uses existing browsers instead of bundling a new one for every app.

Cross-Platform

Build once, run everywhere. Support for Windows, Linux, and macOS (coming soon).

Virtual Environment

Built-in virtual environment support for clean dependency management.

AI Compatible

Generate UI with AI tools without needing proprietary system prompts.

PyPositron vs Alternatives

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

Get Started in Minutes

Create your first PyPositron app with just a few commands.

Install

pip install py-positron

Create Project

positron create

Run App

positron start

Example Code

backend/main.py

9 lines

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)

frontend/index.html

7 lines

<!DOCTYPE html>
<html>
    <body>
        <h1>Hello from PyPositron!</h1>
        <button id="btn">Show Time</button>
    </body>
</html>


CLI Commands

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

Supported CSS Frameworks

PyPositron supports all HTML/CSS frameworks (including the ones not on this list), allowing you to effortlessly build beautiful UIs.

Tailwind CSS Bootstrap Bulma Materialize CSS

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

Ready to Build Amazing Apps?

Join the PyPositron community and start building cross-platform desktop apps with Python today.