Zwift workout generator
Have you ever been frustrated by any WYSIWYG workout editor, such as the Zwift Workout editor and the TrainingPeaks Workout Builder?
ZWOG makes it easier to generate structured workouts using a syntax similar to the one used on What's on Zwift?.
Installation
PyPI
Install the latest stable version from PyPI
$ pip install zwog
GitHub
Install the version from the main branch
$ pip install git+https://github.com/tare/zwog.git
Syntax
The basic building blocks are ramp intervals
10min from 30 to 60% FTP
and steady state intervals
2hrs 10min @ 60% FTP
Interval durations can be given in seconds (sec,s), minutes (min,m), and hours (hrs,h).
Moreover, it is possible to create repeated intervals
4x 5min @ 95% FTP, 5min @ 85% FTP
Finally, a complete workout can be defined as follows
10min from 40 to 85% FTP
3x 5min @ 95% FTP, 5min @ 86% FTP
5min @ 50% FTP
3x 5min @ 95% FTP, 5min @ 86% FTP
10min from 75 to 55% FTP
The parser is rather robust when it comes to newlines and other whitespaces.
Usage
You can use the command line application
$ zwog --help
usage: zwog [-h] -i INPUT_FILE [-o OUTPUT_FILE] [-a AUTHOR] [-n NAME]
[-c CATEGORY] [-s SUBCATEGORY] [-v]
Zwift workout generator
optional arguments:
-h, --help show this help message and exit
-i INPUT_FILE, --input_file INPUT_FILE
input filename
-o OUTPUT_FILE, --output_file OUTPUT_FILE
output filename
-a AUTHOR, --author AUTHOR
author name
-n NAME, --name NAME workout name
-c CATEGORY, --category CATEGORY
category
-s SUBCATEGORY, --subcategory SUBCATEGORY
subcategory
-v, --version show program's version number and exit
or call it from Python
import zwog
workout_text = "15min from 10 to 50% FTP 5min from 50 to 70% FTP 2x 0.5hrs @ 100% FTP, 0.5hrs @ 50% FTP, 10min from 80 to 90% FTP 2min @ 50% FTP\n2min @ 50% FTP\n 10min @ 50% FTP, 10min @ 60% FTP 10min from 50 to 10% FTP"
workout = zwog.ZWOG(workout_text)
workout.save_zwo('workout.xml')
print(workout)
print(f"{round(workout.tss)} TSS")
Limitations
- Only the ZWO file format is supported currently
- Workout files have to be uploaded manually to Zwift
Metadata
Release files for zwog 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zwog-1.1.0.tar.gz | 9.6 kB | Without provenance | Details for zwog-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zwog-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for zwog-1.1.0-py3-none-any.whl |
Total release size: 17.4 kB
Release files / zwog-1.1.0.tar.gz
| Download URL | zwog-1.1.0.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67ab1f341df98213320e0c70b7951b6baf5b7427967b066e6575859e527bcea4
|
|
BLAKE2b-256 checksum How to use checksums |
f6442e598049f3a341f5ee3dac7ebd257f4c654ca7b9b7587ab71ee5d5553b8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.8 Darwin/24.3.0
|
Release files / zwog-1.1.0-py3-none-any.whl
| Download URL | zwog-1.1.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e36ff52e7e0403f10fa7a502d18b7a4ce89d1f6458fe5848f8a35faaf9a8339
|
|
BLAKE2b-256 checksum How to use checksums |
6daf8061a1c1258836349a97f4a68c9dd502a248252f3d2751e30d551af9af4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.8 Darwin/24.3.0
|
Security for zwog 1.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.