Official Python SDK for WearLink — unified connected-health data API.
Project description
wearlink
Official Python SDK for WearLink — a unified connected-health data API for Garmin, Oura, Fitbit, WHOOP, Polar, Strava, Apple Health, Google Fit, and Samsung Health.
Install
pip install wearlink
Requires Python 3.10+.
Quick start
from wearlink import WearLinkClient
wl = WearLinkClient(api_key="sk-...")
user = wl.users.create({"external_user_id": "abc-123", "email": "jane@example.com"})
token = wl.sdk.create_user_token(user.id, app_id="com.example.myapp")
workouts = wl.data.workouts(
user.id,
start="2026-04-01T00:00:00Z",
end="2026-04-30T23:59:59Z",
)
for w in workouts:
print(w.type, w.start_datetime, w.duration_seconds)
Webhook signature verification
from flask import Flask, request, abort
from wearlink import verify_webhook_signature
app = Flask(__name__)
@app.post("/webhooks/wearlink")
def handle_webhook():
ok = verify_webhook_signature(
request.get_data(),
request.headers.get("x-webhook-signature"),
secret=os.environ["WEARLINK_WEBHOOK_SECRET"],
)
if not ok:
abort(401)
event = request.get_json()
# handle event["type"] ...
return "", 200
Error handling
All non-2xx responses raise WearLinkError:
from wearlink import WearLinkError
try:
wl.users.get("nope")
except WearLinkError as err:
print(err.status, err.detail)
Context manager
with WearLinkClient(api_key="sk-...") as wl:
users = wl.users.list(limit=100)
License
MIT
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 Distribution
wearlink-0.1.0.tar.gz
(6.6 kB
view details)
Built Distribution
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 wearlink-0.1.0.tar.gz.
File metadata
- Download URL: wearlink-0.1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9da7b50f24784e0c037d513f98ae3a439aa8f5d31e171c9468166a063b3f18e0
|
|
| MD5 |
31cf7883f5703e3938999c83f18fa871
|
|
| BLAKE2b-256 |
238f2090ccd7a795b0f5c99498438bcade9dd055048fa78dcac32b71d17742a2
|
File details
Details for the file wearlink-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wearlink-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f215befd955d85f9e6d83f50719e127abdaeb402bdcf5f83ce90e6ca6eb6c9b
|
|
| MD5 |
d15d3793b0bfe541fcc0f103905211f7
|
|
| BLAKE2b-256 |
f8f9c64cff49c70196fba8b5ba898e64ece00fbe4eb8ea0f9161f8cd7b3c56ab
|