Metadata-Version: 2.4
Name: pyopentui
Version: 0.1.1
Summary: Python bindings for OpenTUI - a native terminal UI core written in Zig
Author-email: David Brochart <david.brochart@gmail.com>
License: MIT License
        
        Copyright (c) 2025 opentui
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/davidbrochart/pyopentui
Project-URL: Repository, https://github.com/davidbrochart/pyopentui
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# pyopentui

[![Test](https://github.com/davidbrochart/pyopentui/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/davidbrochart/pyopentui/actions/workflows/test.yml)

Python bindings for OpenTUI - a native terminal UI core written in Zig.

## Installation

```bash
pip install pyopentui
```

## Development

Install [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html), then:

```bash
# Create a conda environment and install pip and zig:
git clean -fdx
micromamba create -n pyopentui -y
micromamba activate pyopentui
micromamba install pip zig -y

# Get the latest opentui code:
curl -L -o opentui.zip https://github.com/anomalyco/opentui/archive/refs/tags/v0.1.92.zip
unzip opentui.zip

# Compile the core Zig code:
cd opentui-0.1.92/packages/core/src/zig
zig build -Doptimize=ReleaseSafe

# Copy the shared library in the lib directory:
cd -
mkdir src/pyopentui/lib
cp opentui-0.1.92/packages/core/src/zig/lib/*/* src/pyopentui/lib

# Install the package in editable mode:
pip install -e . --group dev
```

Run tests:

```bash
pytest -v tests
```

Build the package:

```bash
python -m build --wheel
python -m build --sdist
python rename_wheel.py
```
