Installation¶
This page sets up a local development environment for the Tryx Python bindings backed by Rust.
Recommended shell flow
Use uv to manage the project environment and dependencies consistently.
Prerequisites¶
- Python 3.8+
- Rust toolchain (stable)
uv
Environment Bootstrap¶
Local Development Install¶
This installs the Rust extension module into your active environment in editable mode.
Fast rebuild loop
Re-run uv run maturin develop after Rust binding changes to keep Python runtime artifacts in sync.
Build Wheel¶
Typical wheel output appears under target/wheels/.
Verify Installation¶
from tryx.client import Tryx, TryxClient
from tryx.backend import SqliteBackend
backend = SqliteBackend("whatsapp.db")
app = Tryx(backend)
client = app.get_client()
print(type(client).__name__)
If output shows TryxClient, extension loading is successful.
Optional Tools¶
uv run mypy ...orpyrightfor static type checksuv run --no-project --with ruff==0.11.4 ruff check .for linting (no project build)uv run pytestfor integration test harnessesuv run pre-commit run --all-filesfor local gate parity with CI
Common Install Issues¶
Rust compiler not found¶
Install Rust with rustup and reopen your shell.
Build fails with linker errors¶
Ensure your platform build tools are installed:
- Linux:
build-essentialand OpenSSL dev headers - macOS: Xcode command line tools
- Windows: MSVC Build Tools
ImportError for extension module¶
Re-run uv run maturin develop in the same project environment where you run Python.
Next Step¶
- Continue to Quick Start
- Then configure pairing in Authentication Flow