Metadata-Version: 2.4
Name: vexarr-rivex
Version: 0.1.1
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
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: Topic :: Internet :: WWW/HTTP :: HTTP Servers
License-File: LICENSE
Summary: Rivex — high-performance Python web framework with a bundled Rust core
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Bug Tracker, https://github.com/vexarr-stack/python.rivex.dev/issues
Project-URL: Homepage, https://rivex.vexarr.com
Project-URL: Source, https://github.com/vexarr-stack/python.rivex.dev

# Rivex — Python SDK

[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![PyPI](https://img.shields.io/pypi/v/vexarr-rivex.svg)](https://pypi.org/project/vexarr-rivex/)
[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)

The Python SDK for [Rivex](https://rivex.vexarr.com) — a high-performance web
framework whose hot paths run as native Rust. Published to PyPI as
**`vexarr-rivex`** and imported as `rivex`.

```bash
pip install vexarr-rivex
```

```python
import rivex

app = rivex.RivexServer()
app.add_route("GET", "/", lambda req: {"hello": "world"})
app.run("0.0.0.0", 8000)
```

The wheel is **self-contained**: the Rust core (Hyper + Tokio) is
compiled into a PyO3 extension and bundled with every wheel. No external
download. No Rust toolchain required at install time.

## How the bundling works

The Rust source lives in the [core repository][core-repo], which is
linked here as a git submodule at `core/`. At build time `maturin`
compiles the `rivex-python` crate from that submodule and packages the
resulting `rivex_core.<ext>` shared library into the wheel alongside a
thin Python wrapper (`rivex/__init__.py`) that re-exports the public
API.

```
        vexarr-rivex wheel
        ┌─────────────────────────────┐
        │  rivex/__init__.py          │ ← Python wrapper (this repo)
        │  rivex_core.<ext>           │ ← Compiled PyO3 extension
        │  rivex_core.pyi             │ ← Type stubs
        └─────────────────────────────┘
                      ▲
                   maturin
                      │
                ┌────────────┐
                │  core/     │  ← git submodule
                │   crates/  │     of rivex-core
                │     rivex- │
                │     python │
                └────────────┘
```

[core-repo]: https://github.com/rivex-dev/core.rivex.vexarr.com

## Local development

```bash
# 1. Clone with the core submodule
git clone --recurse-submodules https://github.com/rivex-dev/python.rivex.vexarr.com
cd python.rivex.vexarr.com

# 2. Install maturin and a Rust toolchain (only needed for local builds —
#    end users get prebuilt wheels)
pip install maturin
rustup toolchain install stable

# 3. Build + install into the current venv
maturin develop --release
python -c "import rivex; print(rivex.__version__)"
```

To bump the bundled core version, update the submodule pointer:

```bash
cd core && git fetch && git checkout v0.2.0 && cd ..
git add core && git commit -m "core: bump to v0.2.0"
```

## Releasing

Tagging a version on `main` triggers CI to build wheels for Linux
(`x86_64`, `aarch64`), macOS (`x86_64`, `aarch64`), and Windows (`x64`)
across Python 3.10–3.13, then publishes them to PyPI.

## License

MIT — see [LICENSE](LICENSE).

