Activities API reference
Activity streams
Activity streams sub-module for time-series stream data.
Heart rate, power, cadence, elevation, speed, pace and map streams, plus the visibility filtering applied before a stream is served.
This package exports nothing from __init__; other modules use it only through
integration_service (see tests/architecture).
Activity summary
FastAPI routes for activity summaries (authenticated).
Thin HTTP adapter: it validates query parameters and delegates every decision to
:mod:activity_summary_service. Mounted under /activities/summaries as a sub-resource
of activities, and the period is a query parameter, not a path segment, because
week/month/
year/lifetime are four views of one resource, not four resources.
read_activity_summary
read_activity_summary(_check_scopes, token_user_id, db, period='week', anchor_date=None, target_year=None, activity_type=None)
Return the authenticated user's activity summary for one period.
Source code in backend/app/modules/activities/activity/summary_router.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
Activity workout steps
Activity workout steps sub-module.
Step duration, targets, intensity and exercise details for structured workouts.
This package exports nothing from __init__; other modules use it only through
integration_service (see tests/architecture).
Activity file import
Pure parsers turning activity file bytes into the canonical parsed contract.
.gpx / .tcx / .fit in, ParsedFile out. Pure by contract: no
database, no privacy settings, no gear lookup, no provider client, no HTTP —
which is what makes a parser testable with bytes alone. The domain context a
parsed activity needs (owner privacy defaults, gear, provider ids) is re-attached
afterwards by activity_ingestion.enrichment_service, and the
activity-file-import-purity import-linter contract keeps it that way.
Callers outside this package use :mod:integration_service (get_parser,
supported_extensions); the parser modules and registry are private to it.
Importing this package does not pull in a parser.