Skip to main content

zendo-sdk (Python)

PyPI Python versions

Python client for the Zendo motion-tracking WebSocket stream. Connect to a running Zendo instance and get typed quaternion and landmark events — no byte-parsing, no port hunting.

The package is a thin layer over the Rust zendo-sdk crate (via PyO3), so decoding and the connection lifecycle are handled in Rust. It imports as zendo.

Install

pip install zendo-sdk

Wheels are published for Linux (x86_64, aarch64), macOS (Apple Silicon and Intel), and Windows (x86_64), on CPython 3.10 and newer.

Quickstart

The client is synchronous and blocking: iterating it waits for the next frame. This keeps it ergonomic in notebooks and scripts.

import zendo

with zendo.connect() as client:          # auto-discovers the port (5432-5435)
    print(f"connected on port {client.port}")
    for event in client:
        match event:
            case zendo.BodyQuaternions(frame):
                print("hips:", frame.hips.w, frame.hips.x, frame.hips.y, frame.hips.z)
            case zendo.BodyLandmarks(frame):
                print("nose:", frame.nose.x, frame.nose.y, frame.nose.z)
            case zendo.HandQuaternions(side, frame):
                print(side, "wrist:", frame.wrist.w)
            case zendo.HandLandmarks(side, frame):
                print(side, "thumb tip:", frame.thumb_tip.x, frame.thumb_tip.confidence)
            case zendo.BodyIsbAngles(frame):
                print("right elbow flexion:", frame.right_elbow_flexion)

Without structural pattern matching:

import zendo

with zendo.connect() as client:
    for event in client:
        if isinstance(event, zendo.BodyQuaternions):
            print(event.frame.hips)

Connecting

Function Behaviour
zendo.connect() Scans ports 5432-5435 on 127.0.0.1, connects to the first Zendo found.
zendo.connect_at(port) Connects to an explicit port on 127.0.0.1.
zendo.connect_url(url) Connects to an explicit ws://host:port URL.

To reach a Zendo on another machine, copy the address from Zendo's Settings: zendo.connect_url("ws://192.168.1.42:5432"). The stream is plain ws:// — unencrypted and unauthenticated — so only use it on a trusted network.

All three accept reconnect=True to transparently re-establish a dropped connection with exponential backoff:

client = zendo.connect(reconnect=True, base_delay_ms=250, max_retries=10)

Types

Events are immutable dataclasses. Frames expose one attribute per joint or landmark — frame.hips, frame.left_wrist, frame.thumb_tip — each a Quaternion (w, x, y, z) or Landmark (x, y, z, confidence). Frames are also iterable: for name, value in frame: ....

BodyIsbAnglesFrame instead exposes 21 scalar float attributes (in radians) — frame.neck_flexion, frame.right_elbow_flexion, etc. The shoulder plane_of_elevation fields are float('nan') when the shoulder is near neutral (gimbal singularity).

The package ships type information (py.typed) and is checked with ty and linted with ruff.

Offline decoding

zendo.decode_frame(data: bytes) decodes a single raw protocol frame into a typed event — handy for replaying captures or testing.

License

Licensed under either of Apache-2.0 or MIT at your option.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zendo_sdk-0.4.2.tar.gz (78.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

zendo_sdk-0.4.2-cp310-abi3-win_amd64.whl (396.6 kB view details)

Uploaded CPython 3.10+Windows x86-64

zendo_sdk-0.4.2-cp310-abi3-musllinux_1_2_x86_64.whl (762.8 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

zendo_sdk-0.4.2-cp310-abi3-manylinux_2_28_x86_64.whl (555.1 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

zendo_sdk-0.4.2-cp310-abi3-manylinux_2_28_aarch64.whl (551.6 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

zendo_sdk-0.4.2-cp310-abi3-macosx_11_0_arm64.whl (500.7 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

zendo_sdk-0.4.2-cp310-abi3-macosx_10_12_x86_64.whl (505.9 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file zendo_sdk-0.4.2.tar.gz.

File metadata

  • Download URL: zendo_sdk-0.4.2.tar.gz
  • Upload date:
  • Size: 78.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zendo_sdk-0.4.2.tar.gz
Algorithm Hash digest
SHA256 71a24b38c3e36a6ede8051d4d3f58e8e8be19597a474b293583179dbafbc3a0d
MD5 569d9e133abd4abda4dd67dcefe55b97
BLAKE2b-256 e213f18625aa884dd157e2cff1a1f89f6ae6c9e4cacd4561ff3c66f6bc347c8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.2.tar.gz:

Publisher: publish-sdk.yml on akina-health/zendo-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zendo_sdk-0.4.2-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: zendo_sdk-0.4.2-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 396.6 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zendo_sdk-0.4.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b9991b04239f9b07414134a64c5d2e980e34418cf8e4a44cfaefc4f71c5314a6
MD5 5f8b8376b38475223780f17a11ff27f5
BLAKE2b-256 8b27d03d0e216f91d23cb114dc8ded8658aa261663ef14ebd06e14573c784ff2

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.2-cp310-abi3-win_amd64.whl:

Publisher: publish-sdk.yml on akina-health/zendo-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zendo_sdk-0.4.2-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for zendo_sdk-0.4.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bafc728c0adb0c3c381f730f061c0ab1809d36cea7e78829abc119e8f4d145a0
MD5 8a91a8fe8d97045cde3b75d6ad5fe1fa
BLAKE2b-256 fdbd3df45dc73aa6b8ba2c7fb008b44d883e5209a4acd044992b35767f28ef33

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.2-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: publish-sdk.yml on akina-health/zendo-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zendo_sdk-0.4.2-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zendo_sdk-0.4.2-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 60a7529da4f216d8a03757370eb1afbdf8bc794dedf48288ae2f1e6b7254c3e7
MD5 9ba5f67caee5cd5b2df999f64458ac2a
BLAKE2b-256 a2dbe84d6d68de7469c36f1696cbdc2c499ebdadc05c1ff29d712e86b21b2edb

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.2-cp310-abi3-manylinux_2_28_x86_64.whl:

Publisher: publish-sdk.yml on akina-health/zendo-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zendo_sdk-0.4.2-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zendo_sdk-0.4.2-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 799ee24c68b10b7bf0b8b8fbeb1d93c3f90a31a1d3b36e5e40d9c310ca3d68f0
MD5 cd9ed00479171c6e5490e4577187571d
BLAKE2b-256 0bfcc122ccce263ad6b92eb677f356e570bfb6e0f54e76faf092446ad4a7a0d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.2-cp310-abi3-manylinux_2_28_aarch64.whl:

Publisher: publish-sdk.yml on akina-health/zendo-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zendo_sdk-0.4.2-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for zendo_sdk-0.4.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6305327df09f00b7bb3823b82c8546bd71b0d4c42c1274ca542d60f7b25cb467
MD5 476c6265275dfae34f938310f1e9a129
BLAKE2b-256 c10d171acabeb7a180331a956cc31c4693b8310106655b2f036a536f928e85f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.2-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: publish-sdk.yml on akina-health/zendo-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zendo_sdk-0.4.2-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for zendo_sdk-0.4.2-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c1da533d46f5b273793e954a87ca27df47c00584ce7bb5e8c1db0a225fe89bf0
MD5 19c024bcddc969f4d7f44c1913c29142
BLAKE2b-256 4094a1e5c4c2f540f962c4207ca3592fa628435fd293be4fa61e2950080f4a6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.2-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: publish-sdk.yml on akina-health/zendo-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.3

7 files

This release

0.4.2 This release

7 files

0.3.3

7 files

0.2.0

7 files

0.1.3

7 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page