Skip to content

Open source

The shared parts of sports software, in the open

How a sport is named, how a workout is written down, how an activity file is read. These should work the same way in every app, so we maintain them in the open. Use them with SweatStack or without it. We compete on what we build on top.

Formats

The formats the SweatStack API uses, so every app built on SweatStack already works with them.

Workouts

Structured Workout Format

A workout as JSON. Targets can be a share of the athlete's own threshold, so one workout fits every athlete it's given to.

{
  "version": "0.3.0",
  "title": "Sweet spot 2x20",
  "sport": "cycling",
  "content": [{"type": "repeat", "count": 2, "content": [
    {"type": "step", "effort": "work",
     "volume": {"type": "constant", "quantity": "duration", "value": 1200},
     "intensity": {"type": "range", "quantity": "power",
                   "min": {"percent": 88, "of": "ftp"},
                   "max": {"percent": 93, "of": "ftp"}}},
    {"type": "step", "effort": "rest",
     "volume": {"type": "constant", "quantity": "duration", "value": 300}}
  ]}]
}
  • JSON Schema, Python reference implementation and conformance suite: any tool can check a workout before it reaches an athlete.
  • SweatStack delivers SWF workouts to the athlete's device, in the format the device platform expects.

JSON · Python · MIT

structuredworkoutformat.dev · GitHub

Sports

OpenSportTaxonomy

One name for every sport, read from broad to specific.

runningsport.traildiscipline+racemodifier

A trail race is running.trail+race in every app that uses it, and it still counts as running. More codes:

cycling.roadcycling.road+stationaryswimming.poolrunning+race
  • Mappings from the sport labels devices and platforms record, so each activity lands on the right code.
  • A Python library for parsing codes, walking the hierarchy and matching.

Python · MIT

open-sport-taxonomy.sweatstack.no · GitHub

Libraries

FIT is the file format most sports devices record in, and reading it correctly across every device and firmware version is harder than it looks. The first two make that easier for any app.

  • Pyroparse


    Fast activity file parsing. The FIT parser we couldn't find, so we wrote one.

    Rust · Python

    GitHub

  • MisFITs


    FIT files, well-formed and deliberately broken, with a label for every defect. Test your parser against the files that break parsers.

    FIT corpus · defect taxonomy

    GitHub

  • Silhouette


    Intensity-duration modeling for endurance sports: fit a model to an athlete's best efforts across durations.

    Python · scikit-learn compatible

    GitHub

  • goldencheetah-proxy


    Lets web apps read your GoldenCheetah data from your own computer. Nothing leaves the machine.

    Python · local server

    GitHub

Our commitments

Open licenses, for good

Every project on this page is MIT or Apache-2.0 licensed, and stays that way. If you don't like where a project goes, fork it.

No strings

None of them needs a SweatStack account, an API key or our servers. They're as useful to our competitors as to us, and that's intended.

Using SWF or OpenSportTaxonomy?

If you're adding either one to your app or platform, tell us. We'll help with the mappings and the edge cases, and we want to know where they're used. [email protected] · Issues and pull requests on GitHub

What we build on

Others did the hard work first. A few of the projects whose design decisions show in ours:

PythonRustFastAPIPydanticApache ParquetpandasPolarsscikit-learnuvmkdocs-material