Metadata-Version: 2.4
Name: polytranspiler
Version: 0.1.0
Requires-Dist: halo>=0.0.31
Requires-Dist: pyfiglet>=1.0.4
Requires-Dist: questionary>=2.1.1
Requires-Dist: rich>=15.0.0
Requires-Dist: textual>=8.2.8
Summary: Rust powered polytranspiler
Author-email: Nabin Bera <mail@nabinbera.in>
Requires-Python: >=3.14
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# PolyTranspiler Python Package

This package ships the Python CLI and native wheel for PolyTranspiler. The actual implementation lives in the Rust crate under `../../rust`, while this package owns the Python packaging, dependencies, and wheel metadata.

## What this package publishes

- A Python package on PyPI named `polytranspiler`
- A native wheel built with [Maturin](https://www.maturin.rs/)

## Build Process

The package uses `uv` for dependency management and `maturin` for building the extension module.

```bash
uv sync
uv build
uv run pytest
```

The Maturin configuration points to the Rust manifest in `../../rust/Cargo.toml`, so the wheel is built from the shared core crate instead of a local Rust project inside `packages/python`.

## Configuration

- `pyproject.toml` defines the Python package metadata and dependencies.
- `tool.maturin.manifest-path` points to the Rust core crate.
- `tool.maturin.features = ["python"]` enables the Python bindings in the Rust crate.

## Install / Publish

```bash
uv sync
uv build
uv publish
```

## Output

The built wheel is written to `dist/`.

## CLI and library usage

Run `polytranspiler` with no arguments to open the interactive UI. It provides
merge, split, and key-generation flows, including a native file-picker option
and Halo loading animations.

```bash
polytranspiler hello.py hello.js
polytranspiler hello.py hello.ts hello.py.ts
polytranspiler hello.py.ts
polytranspiler keys
polytranspiler keys out --public-name application-public.pem --private-name application-private.pem
```

The same functions are available for local scripts:

```python
from polytranspiler import generate_keys, merge, split

merge("src/hello.py", "src/hello.ts", "out/hello.py.ts")
split("out/hello.py.ts", "out/split")
generate_keys("out/keys")
```

## Notes

- Keep this README package-specific.
- The top-level repository README explains the overall monorepo architecture.

