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.3.tar.gz (78.5 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.3-cp310-abi3-win_amd64.whl (392.4 kB view details)

Uploaded CPython 3.10+Windows x86-64

zendo_sdk-0.4.3-cp310-abi3-musllinux_1_2_x86_64.whl (762.9 kB view details)

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

zendo_sdk-0.4.3-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.3-cp310-abi3-manylinux_2_28_aarch64.whl (556.9 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

zendo_sdk-0.4.3-cp310-abi3-macosx_11_0_arm64.whl (502.5 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

zendo_sdk-0.4.3-cp310-abi3-macosx_10_12_x86_64.whl (508.3 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: zendo_sdk-0.4.3.tar.gz
  • Upload date:
  • Size: 78.5 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.3.tar.gz
Algorithm Hash digest
SHA256 7cd3606a338bc917d89c92da8320c237df1a4a74445ebf7d0f537ee7f9551091
MD5 663d44dc6d611b49b6e9528819966fc2
BLAKE2b-256 c2cad27ecdc999568b0ff264bb96def6298de7b11339cd0034c195e9a72c3f78

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.3.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.3-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: zendo_sdk-0.4.3-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 392.4 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.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bb383d05f4dd47cd5cbad9ad871bd98d5c293313918d50bc01b44852e4fa57bc
MD5 1c35b66521e96b66ab2498378ebb8e30
BLAKE2b-256 f32d08d3abd785c43c63592d9c2779b09b7bbd4f4d11a4ad9707d80d9b5e5632

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.3-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.3-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for zendo_sdk-0.4.3-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5fa6f138f77fe0a2444e9d066c1152630485b285c8451864b86dc76b63c319ce
MD5 17d267b36dd512377f7f078e3a8fe32f
BLAKE2b-256 d122c1255ffbb23593d9ec8dcbadebaacf017dad68e639a44ae7318fdbcd7b63

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.3-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.3-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zendo_sdk-0.4.3-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af7ad3370726b9a960a71018304763d595f2ca04ebfb0f20446ce010d6bd5b45
MD5 c745fa01f2d990ff5106aad4f2a91be0
BLAKE2b-256 a061084e86694f7c0618a572edd5673d1d071b3960d864bbb68772abcdc934f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.3-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.3-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for zendo_sdk-0.4.3-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0abb1781013e11ffe6150ac3f2771d68bdca51ddebdba353aab0cae34203928c
MD5 ad56b5f0d50dc5937fbe24065e1f7b4a
BLAKE2b-256 0ca76727a1827a7f9cfabd27104ec525f589d7ee8260cb66bef718c4c5a6daa7

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.3-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.3-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for zendo_sdk-0.4.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c364b483c2c81c71333ac8a1d8429625660950c26191e3d561c195866391f3a
MD5 07cae84d0ac9b06fca0ea5837de5a567
BLAKE2b-256 a439d28b8b279141b0abe27358503f6c58549937a8179b5ed121ee1c94db13a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.3-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.3-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for zendo_sdk-0.4.3-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7fb6333ae598e8894da740611a81cb9a584e41eb9a6fdb3d469c7748ca1c24c9
MD5 c52d99d4ba2f504bdfe67fbc2861ce4c
BLAKE2b-256 51ee000fd88c661b725c0c7ca7382b4725bc8c8f2ae61ad74b71eca2dbc7bff7

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendo_sdk-0.4.3-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

This release

0.4.3 This release

7 files

0.4.2

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