Installation
snipe ships as a single Python wheel. Installing it gives you both the Python API and the snipe command — the wheel installs a Typer console-script (snipe = "snipe.cli:main"), which is the sole CLI. There is no standalone binary to build separately.
Install the wheel
Section titled “Install the wheel”For most users, one line is enough:
pip install snipeThat puts the snipe command on your PATH and makes import snipe available in Python. The wheel is built with the python feature, so it reads and writes the native Parquet-encoded .snipesig format.
Build from source
Section titled “Build from source”Building from source uses maturin, and you pick what goes into the wheel with Cargo feature flags. The choice is a small matrix of goal × platform:
| Goal | Command |
|---|---|
| Python wheel (CLI + API) | maturin build --release --features python |
| Python dev install (the CLI) | maturin develop --features python |
| + SRA input (Linux / Windows) | add sra → --features python,sra |
| Everything | --features full |
| Library only (no Parquet) | cargo build --no-default-features |
A few things to know about these choices:
pythonis the feature you want for a normal wheel — CLI plus API, with Parquet.snipesigsupport included.sraadds direct SRA input on top ofpython. Thefullfeature is exactlysra + python.--no-default-featuresproduces a library-only build with no Parquet: it can still read and write the legacy JSON.snipesig, but errors on a Parquet one. Most people never want this.
Build requirements
Section titled “Build requirements”- cmake is required at build time — some compression dependencies build native libraries with it. If cmake is missing, the build prints a hint but doesn’t hard-fail on the check itself; install cmake before building.
- Rust 1.82 is the minimum supported version (MSRV), set in
Cargo.tomland pinned in the dev environment.
Platform × feature notes
Section titled “Platform × feature notes”The one platform-specific wrinkle is SRA support.
| Platform | python | sra / full |
|---|---|---|
| Linux | supported | supported |
| Windows | supported | supported |
| macOS | supported | not supported |
SRA support does not build on recent macOS SDKs — there’s a strchrnul symbol conflict in the underlying SRA libraries. On macOS, build with --features python and omit sra. On Linux and Windows, --features python,sra (or --features full) works.
The pixi workflow
Section titled “The pixi workflow”For development, pixi is the preferred wrapper. It pins the toolchain (including the Rust MSRV) and wires up the build accelerators, so you don’t manage them by hand. The common tasks:
pixi run python-build-dev # dev-install the CLI (maturin develop --features python)pixi run buildpixi run testpixi run clippypixi run fmtpixi run checkpixi run python-build-dev is the fast path to a working snipe command from a checkout — it’s the maturin dev install wrapped so the environment is set up for you.
- Quickstart → — sketch your first sample and read a QC report.
- The
.snipesigformat → — what a wheel with Parquet support reads and writes. - Troubleshooting → — common build and install snags.