Skip to main content

babon

Kinematics-as-a-service client. Video in, movement data out.

pip install babon
from babon import Babon

client = Babon()                                              # picks up BABON_API_KEY
analysis = client.analyses.create(video="trial.mp4", wait=True)
print(analysis.metrics["gait_speed_m_s"])                     # 1.32
print(analysis.angles)                                        # DataFrame

That's it. Three lines.

A bit more

# Fire and forget, retrieve later
analysis = client.analyses.create(video="trial.mp4")
# ... save analysis.id somewhere, exit, come back ...
analysis = client.analyses.retrieve("YOUR_ANALYSIS_ID")
print(analysis.status)                                        # queued|processing|completed|failed|canceled

# Cohort
batch = client.batches.create(requests=[
    {"video": "a.mp4"},
    {"video": "b.mp4", "label": "cohort-3"},
    {"video": "c.mp4", "model": "gemx"},
])
for analysis in batch.results(as_completed=True):             # yields as each finishes
    save(analysis.angles)

# Lazy projections (each is one cheap HTTP GET, cached per instance)
analysis.angles                       # DataFrame, all joints
analysis.angles(joint="knee_R")       # filtered
analysis.grf                          # GRF waveform, None for non-walking clips
analysis.events                       # heel-strike / toe-off
analysis.metrics                      # cadence, gait_speed, symmetry_index, ...
analysis.quality                      # tier + z-scores
analysis.skeleton                     # 3D viewer payload
analysis.download("out.zip", include=["angles", "grf"])

# Big files? The SDK auto-switches to presigned PUT above 100 MB.
client.analyses.create(video="4gb_video.mp4")                 # transparent

CLI

babon login                                                   # interactive: paste key
babon analyses create trial.mp4 --wait
babon analyses get YOUR_ANALYSIS_ID
babon analyses list --status completed --limit 20
babon batches create ./study/ --label baseline
babon usage                                                   # seconds used this month

Errors

The client raises typed exceptions:

  • BabonAuthError — bad key, wrong environment, DPA not accepted.
  • BabonQuotaExceeded — monthly limit, concurrent limit, or rate-limited.
  • BabonInvalidVideo — file is not a recognised container.
  • BabonInvalidLabel — label looks like a real name (ADR-0002).
  • BabonRunFailed — pipeline failed.
  • BabonTimeout — wait() exceeded its timeout.

All carry .code (the API error code) and .request_id (the support handle).

The HTTP transport retries 429 (honoring Retry-After), 5xx, and network errors with exponential backoff. POST requests are only retried when sent with Idempotency-Key (the SDK auto-generates one per file). 4xx errors raise immediately.

What we are and are not

  • Measurement only. Output is kinematics; clinical interpretation is yours.
  • EU-cloud (Scaleway fr-par). Videos never leave the EU.
  • Don't put real patient names in label or in your filenames. We reject name-shaped labels server-side.

Configure

client = Babon(
    key="YOUR_KEY",                       # optional, else BABON_API_KEY env
    base_url="https://api.babon.eu",      # optional, override for staging
    timeout_s=600,                        # optional, per-request timeout
    max_retries=5,                        # optional, set 0 to disable retries
)

v0.x → v1.0 migration

The v0.x surface (bb.submit, bb.runs.list, Run.data, Run.angles("knee")) is preserved as a thin shim — your existing code keeps working — but new code should target the v1 resource verbs (client.analyses.create, client.analyses.list, Analysis.metrics, Analysis.angles(joint="knee_R")). The v0.x shims will be removed in v2.0.

Contact

daan@babon.eu — onboarding, quota, bugs.

Docs: https://app.babon.eu/developers/docs

Metadata

Release files for babon 1.2.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 babon 1.2.0
File Size Uploaded Provenance Actions
babon-1.2.0.tar.gz 53.2 kB Without provenance Details for babon-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for babon 1.2.0
File Interpreter ABI Platform Actions
babon-1.2.0-py3-none-any.whl Python 3 none any Details for babon-1.2.0-py3-none-any.whl

Total release size: 114.3 kB

Release files / babon-1.2.0.tar.gz

Download URL babon-1.2.0.tar.gz
Size 53.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8ec799b62e8584294eaa391ed65b6807bab01fb745e834146a46aa687a02efc9
BLAKE2b-256 checksum
How to use checksums
f1d2232ef3d4cb8fcbce5fdd4d0c06a96b1b3884c30e9cabc8d26ea556ffb493
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / babon-1.2.0-py3-none-any.whl

Download URL babon-1.2.0-py3-none-any.whl
Size 61.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5240463efd867b6c0e7f6b1e3bd7bf430e5768b97e084238cf401ad93c18e1f
BLAKE2b-256 checksum
How to use checksums
d2bfc2f26183ad6f9aec2c4890a163f711b9f973a626eb0b42e35159f1473d02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for babon 1.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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