Skip to main content

Python SDK for biomechanical analysis from smartphone videos

Project description

Model Health Python SDK

Python SDK for the Model Health biomechanical analysis API.

Installation

pip install modelhealth

Requires Python 3.11 or later.

Quick Start

import time
from modelhealth import (
    ModelHealthService,
    ActivityStatus,
    ActivityStatusUploading,
    AnalysisStatus,
)

service = ModelHealthService("your_api_key")

# List sessions created via the mobile app
sessions = service.session_list()
session = sessions[0]

# Get activities for a subject
subjects = service.subject_list()
activities = service.activities_for_subject(
    str(subjects[0].id), start_index=0, count=20
)
activity = activities[0]

# Poll until processing is complete
status = service.activity_status(activity)
while isinstance(status, ActivityStatusUploading) or status == ActivityStatus.processing:
    time.sleep(10)
    status = service.activity_status(activity)

# Run analysis
task = service.start_analysis("gait", activity, session)
analysis_status = service.analysis_status(task)
while analysis_status == AnalysisStatus.processing:
    time.sleep(10)
    analysis_status = service.analysis_status(task)

# Download results
import json
results = service.analysis_data_for_activity(activity, ["metrics"])
metrics = json.loads(results[0].data)

Documentation

Full documentation: docs.modelhealth.io

License

Apache 2.0

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

modelhealth-0.4.3-cp311-abi3-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.11+Windows x86-64

modelhealth-0.4.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

modelhealth-0.4.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.5 MB view details)

Uploaded CPython 3.11+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file modelhealth-0.4.3-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: modelhealth-0.4.3-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for modelhealth-0.4.3-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a953cb570b7f8ea69d1a06626dd8b2d2474cf0623077f14d38c392efc43c66f4
MD5 a6d1a6a4ba97510ffad04e552d4d23d6
BLAKE2b-256 fe3a8781f237d632cf90663e02c4182d6a4c084d7ca01675d489ccf0429f322b

See more details on using hashes here.

Provenance

The following attestation bundles were made for modelhealth-0.4.3-cp311-abi3-win_amd64.whl:

Publisher: build-python-wheels.yml on model-health/model-health-internal

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

File details

Details for the file modelhealth-0.4.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for modelhealth-0.4.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6f54b726150b668b94501e9bbd9d79e2aaee9e3eb9ef58b5737897e956d85a3
MD5 d4f67083dbef86851b5de28a4e5223ad
BLAKE2b-256 83dc1c2de7cedc93afbca06a4a7955a8c98839230b6f737cfc7cfa77fbe43320

See more details on using hashes here.

Provenance

The following attestation bundles were made for modelhealth-0.4.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build-python-wheels.yml on model-health/model-health-internal

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

File details

Details for the file modelhealth-0.4.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for modelhealth-0.4.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 c165bde61fb039a996a17002275eaad032e2a183afc6b82a170ec150f2287ced
MD5 cc3b5ffd03fb24842b11a3b254f854ea
BLAKE2b-256 c529901a35e28c65a68117547fd4f788eaa8b60040ab00aa1b037ac34c5a2f97

See more details on using hashes here.

Provenance

The following attestation bundles were made for modelhealth-0.4.3-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: build-python-wheels.yml on model-health/model-health-internal

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

Supported by

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