Pytron Kit
Stop wrapping AI in boring API calls and web tabs. Turn Python scripts into full-fledged desktop applications.
The Vision: Python is the Controller, JS is the UI
Python is the undisputed heart of AI, ML, and data processing — PyTorch, Ollama, Transformers, LangChain, Whisper, and OpenCV all live here. But traditionally, building desktop apps forced developers to make Node/JavaScript the main process while Python got demoted to an awkward "sidecar" subprocess.
Pytron Kit inverts the architecture:
- Python is the Native Controller: Manages state, OS integrations, daemons, file systems, and heavy AI hardware directly.
- JavaScript is the UI Controller: Renders beautiful, ultra-responsive web UIs (React, Vite, Next.js, Vue, Tailwind).
Instead of locking AI inside terminal scripts or browser tabs tied to requests.post(), Pytron is the ultimate Python-to-App Enabler — giving your Python logic native desktop superpowers, zero-latency IPC, and automatic TypeScript definitions.
Why Pytron Kit?
- Built for AI & Python Workflows: Offload heavy Python models (Ollama, PyTorch, Whisper) to background thread pools effortlessly. Your UI stays smooth at 60 FPS while Python works.
- Native or Chrome/Electron Engines: Use lightweight native OS WebViews by default, or run
pytron run --chrome/pytron package --chrometo bundle Electron/Chromium for 100% cross-platform UI consistency! - Type-Safe Magic: Decorated Python functions auto-generate frontend TypeScript definitions (
.d.ts). Calling Python from JS feels like calling a local function with full autocompletion! - Dual Hot-Reloading: Save frontend code -> Vite HMR updates UI instantly. Save Python backend code -> Pytron hot-restarts the backend automatically.
- Full Desktop Superpowers: Daemons, system notifications, taskbar progress, dock badges, native file dialogs, system tray icons, and global shortcuts out of the box.
- One-Command Standalone Executables: Ready to distribute?
pytron packagebundles your Python controller and web frontend into a compact binary (.exe, macOS app, Linux binary).
Show Me the Code: Build a Native AI Assistant in Seconds
1. Python Backend (main.py)
from pytron import App
from pydantic import BaseModel
app = App()
class Query(BaseModel):
prompt: str
@app.expose
def ask_ai(query: Query) -> str:
# Run local Ollama, PyTorch model, or agentic loop here!
return f"AI Thinking on: {query.prompt}"
app.generate_types() # Auto-generates frontend/src/pytron.d.ts
app.run()
2. Frontend React / TypeScript (App.tsx)
import pytron from 'pytron-client';
import { useState } from 'react';
export function App() {
const [response, setResponse] = useState('');
async function handleAsk() {
// Fully typed autocomplete for your Python methods!
const answer = await pytron.ask_ai({ prompt: "Analyze local desktop files" });
setResponse(answer);
}
return (
<button onClick={handleAsk}>
{response || "Run AI Agent"}
</button>
);
}
Quick Start
1. Install Pytron Kit
# Windows
pip install pytron-kit
# Linux / macOS (Recommended via pipx)
pipx install pytron-kit
2. Initialize Your App
Create a new app with your choice of frontend framework:
pytron init my_ai_app --template react
(Supported templates: react (default), next, vue, svelte, preact, solid, lit, qwik, vanilla)
3. Install & Run in Dev Mode
cd my_ai_app
pytron install
# Run with native OS webview
pytron run --dev
# Or run with Electron / Chrome engine
pytron run --dev --chrome
Platform Superpowers & Cross-Platform Support
- Engine Flexibility: Switch between native webview engines or Electron (
--chrome) seamlessly during dev and packaging. - Daemon & System Integration: Run in background mode, show/hide windows programmatically, emit cross-platform native OS notifications.
- Taskbar & Dock Controls: Set taskbar progress bars, update app icons, and control macOS Dock badges.
- Native Dialogs: Use native OS file dialogs (open, save, folder select) and message boxes without third-party popups.
- Linux Schism Guard: Built-in GTK3 & WebKit2GTK isolation prevents GLib crashes automatically on Linux distros (Ubuntu 22.04 / 24.04+).
Packaging & Distribution
Ready to ship your app to users? Distribute it as a standalone desktop binary:
# Package with Native Webview
pytron package
# Package with Chrome / Electron engine
pytron package --chrome
Pytron handles current working directory safety (so app data writes cleanly to %APPDATA% or user configs without permission errors), splash screens (--splash), and bundle optimization.
CLI Reference
pytron init <name> [--template <template>]— Scaffold a new Pytron app.pytron install— Smartly manage Python dependencies in a project virtual environment (env/).pytron run [--dev] [--chrome]— Launch your app with dual hot-reloading (optionally with Chrome/Electron engine).pytron frontend install <pkg>— Auto-install frontend npm dependencies.pytron package [--chrome]— Build a standalone desktop executable (Native or Chrome/Electron).pytron show— List installed environment packages.
Community & Support
Join the Pytron developer community on Discord! Whether you're building local AI agents, sleek utility tools, or native desktop dashboards:
- Get help and debug issues
- Showcase what you're building
- Suggest features and shape the roadmap
Documentation & Resources
Explore the detailed documentation and community resources:
- Official Website — Official documentation, tutorials, and guides.
- Usage Guide — Comprehensive usage patterns, state management, and API examples.
- Architecture Overview — Deep dive into Pytron's native IPC, engine adapters, and process isolation.
- Project Roadmap — Upcoming features, vision, and release milestones.
- Contributing Guide — Guidelines for contributing, local setup, and pull requests.
- Credits & Acknowledgements — Core contributors, open-source libraries, and technology inspirations.
- Changelog — Version history and release notes.
- Support Guide — Troubleshooting tips and community support channels.
- Security Policy — Security guidelines and vulnerability reporting.
- Code of Conduct — Community standards and principles.
- License — MIT License details.
Happy building with Pytron Kit!
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 pytron_kit-0.3.15.post8.tar.gz.
File metadata
- Download URL: pytron_kit-0.3.15.post8.tar.gz
- Upload date:
- Size: 18.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8be4fef89c4dfdd2f7e20be08701d88a75ee5c436b88435ee42d167aba90b7b8
|
|
| MD5 |
f0b24136926cafc8f139fa7fcadc2348
|
|
| BLAKE2b-256 |
773b37bc142aef64343b0b7cd4144e5bf771baffdd2953fc82e41bdef4707d8e
|
Provenance
The following attestation bundles were made for pytron_kit-0.3.15.post8.tar.gz:
Publisher:
publish.yml on Ghua8088/pytron-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytron_kit-0.3.15.post8.tar.gz -
Subject digest:
8be4fef89c4dfdd2f7e20be08701d88a75ee5c436b88435ee42d167aba90b7b8 - Sigstore transparency entry: 2489969428
- Sigstore integration time:
-
Permalink:
Ghua8088/pytron-kit@feb14c5c7e89e9c4e4007cca8fceb071766c34ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Ghua8088
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@feb14c5c7e89e9c4e4007cca8fceb071766c34ed -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pytron_kit-0.3.15.post8-py3-none-win_amd64.whl.
File metadata
- Download URL: pytron_kit-0.3.15.post8-py3-none-win_amd64.whl
- Upload date:
- Size: 20.5 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89517998b019b4c7f8d4dc3c82c70bef7832d0637593cad750a68c7d880db435
|
|
| MD5 |
3269af6c053064d12ff33993ab057ef0
|
|
| BLAKE2b-256 |
75c90dc21dae37a1771e60e992d867617e1944687a47e373aad677f467a3d629
|
Provenance
The following attestation bundles were made for pytron_kit-0.3.15.post8-py3-none-win_amd64.whl:
Publisher:
publish.yml on Ghua8088/pytron-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytron_kit-0.3.15.post8-py3-none-win_amd64.whl -
Subject digest:
89517998b019b4c7f8d4dc3c82c70bef7832d0637593cad750a68c7d880db435 - Sigstore transparency entry: 2489969575
- Sigstore integration time:
-
Permalink:
Ghua8088/pytron-kit@feb14c5c7e89e9c4e4007cca8fceb071766c34ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Ghua8088
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@feb14c5c7e89e9c4e4007cca8fceb071766c34ed -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pytron_kit-0.3.15.post8-py3-none-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: pytron_kit-0.3.15.post8-py3-none-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 22.1 MB
- Tags: Python 3, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a0b052e0b24766df8dfb4987ebc3db078325af34f37343608d72b4dff95cbba
|
|
| MD5 |
8db022aa1fff2d2f301afa44512843ae
|
|
| BLAKE2b-256 |
150b2673ad046ece5e75457379be8a1ad2755b4935eab61287ba18419dd7edb2
|
Provenance
The following attestation bundles were made for pytron_kit-0.3.15.post8-py3-none-manylinux_2_31_x86_64.whl:
Publisher:
publish.yml on Ghua8088/pytron-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytron_kit-0.3.15.post8-py3-none-manylinux_2_31_x86_64.whl -
Subject digest:
2a0b052e0b24766df8dfb4987ebc3db078325af34f37343608d72b4dff95cbba - Sigstore transparency entry: 2489969507
- Sigstore integration time:
-
Permalink:
Ghua8088/pytron-kit@feb14c5c7e89e9c4e4007cca8fceb071766c34ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Ghua8088
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@feb14c5c7e89e9c4e4007cca8fceb071766c34ed -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pytron_kit-0.3.15.post8-py3-none-macosx_11_0_universal2.whl.
File metadata
- Download URL: pytron_kit-0.3.15.post8-py3-none-macosx_11_0_universal2.whl
- Upload date:
- Size: 20.4 MB
- Tags: Python 3, macOS 11.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80291afc4b3f646e7744cd12928e1636cb314c8e9e909d3ef4e635d0aa6e0564
|
|
| MD5 |
11d3f08284a3ea77150fe7dff44b7c86
|
|
| BLAKE2b-256 |
1bea287c33b93b175e16b569c5b9f888d285c8173da605921e4469b797cb2a2c
|
Provenance
The following attestation bundles were made for pytron_kit-0.3.15.post8-py3-none-macosx_11_0_universal2.whl:
Publisher:
publish.yml on Ghua8088/pytron-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytron_kit-0.3.15.post8-py3-none-macosx_11_0_universal2.whl -
Subject digest:
80291afc4b3f646e7744cd12928e1636cb314c8e9e909d3ef4e635d0aa6e0564 - Sigstore transparency entry: 2489969634
- Sigstore integration time:
-
Permalink:
Ghua8088/pytron-kit@feb14c5c7e89e9c4e4007cca8fceb071766c34ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Ghua8088
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@feb14c5c7e89e9c4e4007cca8fceb071766c34ed -
Trigger Event:
workflow_dispatch
-
Statement type: