Metadata-Version: 2.4
Name: pyturi
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: User Interfaces
Requires-Dist: pytest>=7.0 ; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21 ; extra == 'dev'
Requires-Dist: black>=23.0 ; extra == 'dev'
Requires-Dist: ruff>=0.1 ; extra == 'dev'
Requires-Dist: maturin>=1.0 ; extra == 'dev'
Provides-Extra: dev
Summary: Build cross-platform desktop apps with Python and web technologies
Keywords: desktop,gui,tauri,webview,cross-platform
Author: PyTuri Contributors
License: MIT OR Apache-2.0
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# PyTuri

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

## Installation

```bash
pip install pyturi
```

Or with uv:

```bash
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

```python
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:

```python
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](./examples) directory for more examples.

## License

MIT OR Apache-2.0

