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: sdk.modelhealth.io
License
Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file modelhealth-0.5.1-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: modelhealth-0.5.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
958bbd715226915cfe331fe44ccc86a42084f26a3b0643f8097e9b3c5260791f
|
|
| MD5 |
b5ca1931c78d68ce27b0e5d3a40a66e2
|
|
| BLAKE2b-256 |
00104fa3188595eead892f7e1f4f7b57578a93e1280b879402d92accfbdfaf3f
|
Provenance
The following attestation bundles were made for modelhealth-0.5.1-cp311-abi3-win_amd64.whl:
Publisher:
build-python-wheels.yml on model-health/model-health-internal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
modelhealth-0.5.1-cp311-abi3-win_amd64.whl -
Subject digest:
958bbd715226915cfe331fe44ccc86a42084f26a3b0643f8097e9b3c5260791f - Sigstore transparency entry: 1523929350
- Sigstore integration time:
-
Permalink:
model-health/model-health-internal@07711478bcac97d3955e0354bb00de3b4d6998eb -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/model-health
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-python-wheels.yml@07711478bcac97d3955e0354bb00de3b4d6998eb -
Trigger Event:
push
-
Statement type:
File details
Details for the file modelhealth-0.5.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: modelhealth-0.5.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
496629559a1ca40dc6d91505c370975725aff5c0b86910d333b010ded5bf3552
|
|
| MD5 |
f3f5ebd69f918b7363c0e59208944ad5
|
|
| BLAKE2b-256 |
ae4c8760f1040a241cdf3dc85122ef0174e4d421b771cd3178b8e6eaa19bec58
|
Provenance
The following attestation bundles were made for modelhealth-0.5.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
build-python-wheels.yml on model-health/model-health-internal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
modelhealth-0.5.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
496629559a1ca40dc6d91505c370975725aff5c0b86910d333b010ded5bf3552 - Sigstore transparency entry: 1523929491
- Sigstore integration time:
-
Permalink:
model-health/model-health-internal@07711478bcac97d3955e0354bb00de3b4d6998eb -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/model-health
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-python-wheels.yml@07711478bcac97d3955e0354bb00de3b4d6998eb -
Trigger Event:
push
-
Statement type:
File details
Details for the file modelhealth-0.5.1-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: modelhealth-0.5.1-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.11+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a878c9ce70d7f3028d5a82bc0458377b67262f58196e7a9f0e17fe40d2e4fbe
|
|
| MD5 |
6311213055202f750fb39769191c6d13
|
|
| BLAKE2b-256 |
79de459a16790c1bdc692320c82b29aa1070751642ec09d30e3955cbf3d94d16
|
Provenance
The following attestation bundles were made for modelhealth-0.5.1-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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
modelhealth-0.5.1-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
2a878c9ce70d7f3028d5a82bc0458377b67262f58196e7a9f0e17fe40d2e4fbe - Sigstore transparency entry: 1523929433
- Sigstore integration time:
-
Permalink:
model-health/model-health-internal@07711478bcac97d3955e0354bb00de3b4d6998eb -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/model-health
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-python-wheels.yml@07711478bcac97d3955e0354bb00de3b4d6998eb -
Trigger Event:
push
-
Statement type: