Skip to main content

depz-sensor-sdk

Python SDK for the DEPZ USB sensor line — USB CDC-ACM sensors that speak one shared framed protocol:

  • HC-SR04 — ultrasonic distance
  • VL53L0X / VL53L1CX / VL53L1CB / VL53L3CX / VL53L4CX — single-zone Time-of-Flight family, 2–8 m, with ST's light and histogram (multi-target) drivers on the host
  • VL53L4CD — single-zone Time-of-Flight to ~1.3 m (host runs the ST ULD)
  • VL53L5CX / VL53L7CX / VL53L7CH — 8×8 Time-of-Flight on an I2C board (63° / 90° view; L7CH adds streamed CNH histograms)
  • VL53L8CX — 8×8 multizone Time-of-Flight, the base ToF imager (host runs the ST ULD)
  • VL53L8CH — the VL53L8CX superset, adding Compact-Network-Histogram output
  • TMF8829 — multizone direct ToF, 8×8 … 48×32 zones, up to 4 targets per zone, raw histograms (host downloads the ams sensor firmware)
  • BNO055 — 9-axis IMU with on-chip fusion (orientation, gravity, calibration)
  • BNO085 / BNO086 — 9-axis IMU (host runs the SH-2 stack)

Sync API with a background reader thread: open a device, configure it, consume a stream of decoded, timestamped results. A TypeScript SDK (@depz/sensor-sdk) mirrors this one byte-for-byte via shared golden test vectors.

Install

pip install depz-sensor-sdk

Python 3.10 or newer; pyserial and numpy come with it. From a checkout of the repository, the same package from its sources:

pip install ./packages/depz-sensor-sdk-python

Linux: your user needs serial access (group dialout).

Quick start

from depz_sensor_sdk import open_device
from depz_sensor_sdk.vl53l8 import Vl53l8cx, RESOLUTION_8X8

dev = open_device()                    # first DEPZ sensor by USB id; raises if none
if isinstance(dev, Vl53l8cx):
    dev.init(progress=print)           # ~25 s: downloads the sensor firmware
    dev.set_resolution(RESOLUTION_8X8)
    dev.set_ranging_frequency_hz(15)   # must be >= 2 Hz
    dev.start_ranging()
    for frame in dev.frames():
        print(frame.grid())            # 8×8 numpy array of mm

open_device() finds the device by USB VID/PID; pass a serial (open_device(serial="...")), an index, or an explicit port. With no board attached it raises NoDepzDeviceError (no DEPZ device found (no serial port has a known DEPZ USB id). …).

The install puts the depz-sensor command on the PATH: depz-sensor list shows what's connected (no DEPZ devices found, exit code 1, when nothing is), depz-sensor --help lists the other commands (info, monitor, record, record-data, play-data, flash).

Runnable programs are in examples/: python examples/sr04_minimal.py [port] streams an SR04, and there is one each for the VL53L4CD, the VL53L8CX, the VL53L8CH and the BNO086. Without a port they take the first DEPZ board; with none attached they print open: no DEPZ device found … and exit with code 1. python examples/live_check.py [seconds] [port ...] streams every board it finds and prints its rate.

See docs/guide.md for the full guide and docs/api.md for the API reference.

Compatibility after 1.0

From 1.0 a minor release only adds (contract 07 §5): a field on what the SDK produces (LinkStats, DeviceInfo, the events, every measurement / frame / sample / report), an option on what you pass in (Tmf8829Config, SyncPinConfig, CalibrationConfig, the BNO055 configs), a member of an open set (SensorType, Status, PlayerState, the DeviceEvent kinds, the BNO086 Report kinds, the DatasetRecord kinds). Two rules keep your code building across those additions:

  • Every public dataclass is keyword-only (kw_only=True), so a new field never shifts a positional argument. Build them with keywords:

    cfg = SyncPinConfig(pin=3, mode=SyncPinMode.OUT_BOTH, polarity=SyncPinPolarity.IDLE_HIGH)  # right
    cfg = SyncPinConfig(3, SyncPinMode.OUT_BOTH, SyncPinPolarity.IDLE_HIGH)                    # wrong: TypeError
    
  • An enum (IntEnum or Enum) may gain members and an event / report hierarchy may gain classes: a match on one needs a case _, an if/elif chain an else.

License

MIT. The bundled VL53L5 / VL53L7 / VL53L8 sensor firmware, configuration data and the driver code ported from ST's Ultra Lite Driver are © STMicroelectronics (BSD-3-Clause, depz_sensor_sdk/vl53l8/data/LICENSE-BSD-3-Clause.txt); the bundled TMF8829 sensor firmware is © ams-OSRAM (MIT, depz_sensor_sdk/tmf8829/data/LICENSES-MIT.TXT); see NOTICE.

Open source — source and issue tracker: https://github.com/depz-ai/depz-sensor-sdk.

Metadata

Release files for depz-sensor-sdk 1.0.0

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

Source distribution (sdist)

Source distribution for depz-sensor-sdk 1.0.0
File Size Uploaded Provenance Actions
depz_sensor_sdk-1.0.0.tar.gz 489.6 kB With provenance Details for depz_sensor_sdk-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for depz-sensor-sdk 1.0.0
File Interpreter ABI Platform Actions
depz_sensor_sdk-1.0.0-py3-none-any.whl Python 3 none any Details for depz_sensor_sdk-1.0.0-py3-none-any.whl

Total release size: 1.0 MB

Release files / depz_sensor_sdk-1.0.0.tar.gz

Download URL depz_sensor_sdk-1.0.0.tar.gz
Size 489.6 kB
Tags Source
SHA-256 checksum
How to use checksums
17155c39cdf0476437dbd7b47460fce8c950bf4443c8ddcb66e51ffea2e3b74e
BLAKE2b-256 checksum
How to use checksums
37e3a47369c01f5318eecaa4131cc5b542b47a51076819a65cbad6e3ff47e7af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Release files / depz_sensor_sdk-1.0.0-py3-none-any.whl

Download URL depz_sensor_sdk-1.0.0-py3-none-any.whl
Size 527.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0268efcfe22e7335547d0a458fceb73f6e9768505cc5bd4d1f721e4c0d3063f0
BLAKE2b-256 checksum
How to use checksums
2ce0c7b272a3de1668de50e244dddc7f6c6d714fd4f06f682fa6b39bf752a0b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Security for depz-sensor-sdk 1.0.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for depz_sensor_sdk-1.0.0.tar.gz

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 Nov 18, 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.

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