Skip to main content

sparrow-engine (Python)

Camera-trap ML inference engine — Python API. sparrow-engine loads ONNX models and runs detection, classification, and audio inference.

This package ships the Python API only (import sparrow_engine). The command-line binaries (spe / spe-gpu) and the HTTP server are distributed separately (Homebrew, the system installer, or the GitHub Release tarball) — pip install does not place them on your PATH.

Install

pip install sparrow-engine        # CPU build (depends on onnxruntime)
pip install sparrow-engine-gpu    # GPU/CUDA build (depends on onnxruntime-gpu)

Both distributions import as sparrow_engine and are drop-in replacements for each other. Install exactly one per environment: they write the same sparrow_engine import package, so a second flavor overwrites the first. The GPU wheel carries only an advisory Provides-Dist: sparrow-engine, which pip

=22 does not enforce, so pip MAY still install both into one environment — keeping them apart is operator discipline. Neither wheel bundles ONNX Runtime or CUDA — those come from the runtime dependency (onnxruntime / onnxruntime-gpu).

Usage

import sparrow_engine

# Models are read from ~/.sparrow-engine/models (override with
# SPARROW_ENGINE_MODEL_DIR). Device defaults to "auto".
print(sparrow_engine.list_models())

# Object detection — returns list[DetectResult], one per input image.
results = sparrow_engine.detect("photo.jpg", model="MDV6-yolov10-c")
for det in results[0].detections:
    # bbox coordinates are normalized to [0, 1].
    print(det.label, det.confidence, det.bbox.x_min, det.bbox.y_min)

# Classification — result.top1 is the highest-confidence class (or None).
clf = sparrow_engine.classify("crop.jpg", model="Deepfaune-Europe")
print(clf[0].top1)

# Detect-then-classify pipeline (ad-hoc; no TOML required).
pipe = sparrow_engine.pipeline("photo.jpg", detector="MDV6-yolov10-c",
                               classifier="Deepfaune-Europe")

# Audio detection (WAV input).
audio = sparrow_engine.detect_audio("recording.wav", model="md-audiobirds-v1")

# Localized time-frequency audio events (WAV input).
events = sparrow_engine.detect_audio_events(
    "ultrasonic.wav", model="batdetect2-uk-v2"
)

init(device=..., model_dir=...) is optional — the engine auto-initializes on the first inference call. detect / classify / detect_audio / detect_audio_events / pipeline each accept a file path, a directory, or a list of paths, and take an optional progress_callback(index, total, filename).

detect, detect_audio, and detect_audio_events also accept an optional model. The first two use their catalog default and stable fallback ID. Audio-event detection uses a catalog default when present but has no hard-coded fallback because event taxonomies and geographic scopes are model-specific. classify, embed, and pipeline still require an explicit model.

Documentation

See the user manual (docs/user-manual.md) in the sparrow-engine repository for the full model catalog, device selection, and the CLI / server surfaces.

Metadata

Release files for sparrow-engine 0.1.30

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for sparrow-engine 0.1.30
File Interpreter ABI Platform Actions
sparrow_engine-0.1.30-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for sparrow_engine-0.1.30-cp311-abi3-win_amd64.whl
sparrow_engine-0.1.30-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for sparrow_engine-0.1.30-cp311-abi3-manylinux_2_28_x86_64.whl
sparrow_engine-0.1.30-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for sparrow_engine-0.1.30-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 7.8 MB

Release files / sparrow_engine-0.1.30-cp311-abi3-win_amd64.whl

Download URL sparrow_engine-0.1.30-cp311-abi3-win_amd64.whl
Size 2.5 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
56339895a4dc7b63c80f130301c355084ab5675d13bb08db61e8febf4852c1b7
BLAKE2b-256 checksum
How to use checksums
e90a3fdee03f8522b5628d1b89dff63975dcadc97d6893a4054413cbdc611d5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / sparrow_engine-0.1.30-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL sparrow_engine-0.1.30-cp311-abi3-manylinux_2_28_x86_64.whl
Size 2.9 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
b829b897d3dc9302fa674f345b55312cf99b5a81a618bb1228396091f0972460
BLAKE2b-256 checksum
How to use checksums
6481c0fce45e9e6c92179a27ad7b3d311fa10705b2cd2f5f0c2ce668a6cd0fe8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / sparrow_engine-0.1.30-cp311-abi3-macosx_11_0_arm64.whl

Download URL sparrow_engine-0.1.30-cp311-abi3-macosx_11_0_arm64.whl
Size 2.5 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9f9fa71d55aa3cd205ffff363b68eb420a2a40bc81fb78ce6cd818f6c2f0a60e
BLAKE2b-256 checksum
How to use checksums
ecf08186dce6c2c78d5b896e340830efd58f94e3dbb864acd6f861d3d6300992
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Security for sparrow-engine 0.1.30

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for sparrow_engine-0.1.30-cp311-abi3-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page