Skip to main content

Build cross-platform desktop apps with Python and web technologies

Project description

PyTuri

Build cross-platform desktop applications using Python for both backend logic and UI generation.

Installation

pip install pyturi

Or with uv:

uv add pyturi

Features

  • Python UI DSL: Write UI in Python, generates HTML/CSS/JS
  • Cross-platform: Windows, Linux, macOS
  • Compatible with C libraries: Works alongside numpy, pandas, etc.
  • Reactive state: Built-in state management
  • Type-safe commands: Python ↔ Frontend communication
  • Fast: Powered by Rust and Tauri

Quick Start

from pyturi import App
from pyturi.ui import Div, H1, Button, Style

app = App(name="My App")

@app.ui
def create_ui():
    return Div(
        children=[
            H1("Hello, PyTuri!"),
            Button("Click Me", onclick=handle_click),
        ],
        style=Style(padding="20px"),
    )

@app.command()
def handle_click():
    return {"message": "Button clicked!"}

if __name__ == "__main__":
    app.run()

Use with Data Science Libraries

PyTuri works seamlessly with numpy, pandas, and other C extension libraries:

from pyturi import App
import numpy as np
import pandas as pd

app = App(name="Data App")

@app.command()
def process_data(values: list):
    arr = np.array(values)
    df = pd.DataFrame({"values": arr})
    return df.describe().to_dict()

app.run()

Documentation

See the examples directory for more examples.

License

MIT OR Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyturi-0.1.0-cp311-cp311-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.11Windows x86-64

pyturi-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file pyturi-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyturi-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyturi-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 24cf484f182e129065a6de0b1fdcaccddc0f3762e7ca2c324fdb61ee9726eec2
MD5 bba9dfb3bd4f1535def1d41f637b1533
BLAKE2b-256 4e50a365af6afd98e200571526a36f03669cdf544c99ab62ec67ec146fa70044

See more details on using hashes here.

File details

Details for the file pyturi-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyturi-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8027f96c235fc155edbf8ddc6957eb9bab03a18f2e74c19dcb923d90ebb64b40
MD5 e47c66bb08d3ac92626e8a02fa819e73
BLAKE2b-256 c766ca25ddcdd180f162801612ef08e5a01d7e35dae57d70c710bb923d285a96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page