Skip to content

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.

For most users, one line is enough:

Terminal window
pip install snipe

That 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.

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:

GoalCommand
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:

  • python is the feature you want for a normal wheel — CLI plus API, with Parquet .snipesig support included.
  • sra adds direct SRA input on top of python. The full feature is exactly sra + python.
  • --no-default-features produces 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.
  • 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.toml and pinned in the dev environment.

The one platform-specific wrinkle is SRA support.

Platformpythonsra / full
Linuxsupportedsupported
Windowssupportedsupported
macOSsupportednot 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.

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:

Terminal window
pixi run python-build-dev # dev-install the CLI (maturin develop --features python)
pixi run build
pixi run test
pixi run clippy
pixi run fmt
pixi run check

pixi 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.