Documentation Index
Fetch the complete documentation index at: https://docs.kynasmith.dev/llms.txt
Use this file to discover all available pages before exploring further.
Python SDK
Use the Python SDK for server-side integrations, local video replay, and local camera workflows. If you are still evaluating the product, start with the guided guest Workbench demo or the public catalog. This page is the integration path once you are ready to run your own backend workflow.Step 1: Install
media extra for local pose detection:
pip install "kynasmith[media]".
Step 2: Initialize the client
Step 3: Create and release a MoveSpec
Define a MoveSpec using YAML that describes the movement you want to detect, then validate it, version it, and release it:Step 4: Replay a video
Replace
squat-demo.mp4 with the path to your own video file. If you are working inside this repo, the deterministic squat replay fixture lives at activities_golden_set/videos/squat.mp4.Step 5: Run a live camera session
start_camera() captures up to max_frames camera frames, finalizes the session, and returns the result.
Manual session control
Use the lower-level session helpers when you need full control over realtime flow:Alternative credential formats
Alternative credential formats
Typed errors
The Python SDK raises typed exceptions for structured error handling:AuthError— authentication failures (invalid or expired credentials)AuthorizationError— permission or scope errorsCompatibilityError— SDK version is not compatible (update your SDK)SessionStateError— session lifecycle violationsValidationError— request or MoveSpec validation failuresRateLimitError— rate limit exceeded (HTTP 429)
Limitations
-
Synchronous only: The SDK is fully synchronous. In async frameworks, wrap SDK calls with
asyncio.to_thread()to avoid blocking the event loop: -
First-run model download: The first detector run downloads the default MediaPipe
.taskmodel (~100 MB) into the local cache. Passmodel_pathto use a pre-downloaded model.
Environment notes
- Python 3.12 or newer required
- Default install includes
mediapipeandopencv-python-headless - Tested compatibility line:
mediapipe==0.10.32 - Default model asset:
pose_landmarker_full/float16/1/pose_landmarker_full.task