Metadata-Version: 2.4
Name: ppui
Version: 2026.1.20.2
Summary: Python Process User Intent: A high-level abstract UI system (TUI, Web, Voice)
Project-URL: Homepage, https://github.com/nextoken/pas
Author-email: Next Token <nextoken@gmail.com>
License: MIT
Requires-Python: >=3.8
Requires-Dist: prompt-toolkit>=3.0.0
Requires-Dist: questionary>=2.0.0
Requires-Dist: rich>=13.0.0
Description-Content-Type: text/markdown

# PPUI: Python Process User Intent 🎭

A high-level abstract UI system for Python scripts. 

PPUI (pronounced "pui") is the Python implementation of the **PUI** (**Process User Intent**) philosophy.

The goal isn't just to "draw a menu"—it's to capture what the user wants to do next. Whether that intent is captured via a terminal hotkey, a web click, or a voice command, the script's logic remains the same. 

*PPUI: Because your scripts should care about what you want, not just how you say it.*

## Features
- **High-level Abstractions**: Use concepts like `Selection` and `Input` without caring about the rendering engine.
- **TUI Implementation**: Professional, hotkey-driven terminal menus.
- **Submenu Support**: Nested selections with `push` (drill-down) or `inline` (expandable) behaviors.
- **Rich Integration**: Full support for Rich-formatted output and panels.

## Installation

```bash
pip install ppui
```

## Usage

### High-Level Menu Class

The `Menu` class provides a declarative way to build interactive loops with callback support.

```python
from ppui import Menu

def run_setup():
    print("Running setup...")

def main():
    menu = Menu("Project Manager", style="bold green")
    menu.add_option("Setup Project", run_setup)
    menu.add_option("View Dashboard", "view_dash")
    
    # Submenu support
    advanced = Menu("Advanced Settings")
    advanced.add_option("DNS Config", lambda: print("Configuring DNS..."))
    menu.add_submenu("Advanced...", advanced, behavior="push")
    
    menu.add_back_item() 
    menu.add_quit_item()
    
    selection = menu.run()
```
