Skip to main content

Structured Workout Format (SWF)

SWF is a JSON format for describing structured endurance workouts. Define a workout once in SWF, then export to Garmin, Intervals.icu, or other platforms.

uv add structured-workout-format
from structured_workout_format import Workout, Step, Repeat, duration, power, to_garmin

workout = Workout(
    sport="cycling",
    content=[
        Repeat(count=5, content=[
            Step(volume=duration(240), intensity=power(250)),
            Step(effort="rest", volume=duration(120)),
        ]),
    ],
)

print(to_garmin(workout))

Full documentation, specification, and examples at structuredworkoutformat.dev.

Source code and conformance suite on GitHub.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

structured_workout_format-0.6.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

structured_workout_format-0.6.0-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file structured_workout_format-0.6.0.tar.gz.

File metadata

File hashes

Hashes for structured_workout_format-0.6.0.tar.gz
Algorithm Hash digest
SHA256 192cd70803b21f08ef386beff79257dfe46d289a3519acd1945f27ec5e783c47
MD5 b49394e54976ebda7a93678320ccfcf1
BLAKE2b-256 7cb66beb76c65d19ca933bebc51de7badf7e6b6c772ef037aa737b7adf164c66

See more details on using hashes here.

File details

Details for the file structured_workout_format-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for structured_workout_format-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 664ec5631373390ab80515e9d4d1ec40cea755e0b60772a5759c2e945ea4a561
MD5 4df0df187e017801f61654b8fcf5ffdf
BLAKE2b-256 8f67929ac0ee7030df31181f53508a27aae7ce4133606d86617c3cdceb4f29e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page