Skip to main content

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

Metadata

Release files for wearlink 0.1.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 wearlink 0.1.0
File Size Uploaded Provenance Actions
wearlink-0.1.0.tar.gz 6.6 kB Without provenance Details for wearlink-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 12.7 kB

Security for wearlink 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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