Skip to main content

WorkOutDoors WKT Parser

An unofficial parser for the .wkt files created by WorkOutDoors App.

About

This library parses binary workout files from the WorkOutDoors app and provides structured access to workout data including GPS tracks, heart rate, cadence, laps, and more. It supports JSON export for further analysis or integration with other tools.

Note: This is an unofficial, reverse-engineered parser. The .wkt format is undocumented and may change without notice in future app releases.

Features

  • Parse Run, Walk, and Weightlifting workouts
  • GPS track extraction with coordinate conversion
  • Heart rate data including zones and samples
  • Cadence data with samples
  • Lap-by-lap analysis for multi-lap workouts
  • App and device version information
  • JSON export (to_dict(), to_json(), save_json())
  • Comprehensive error handling

Installation

pip install -e .

Usage

Basic Parsing

from pathlib import Path
from wkt_parser import WKTParser

parser = WKTParser()
workout = parser.parse(Path("path/to/workout.wkt"))

print(f"Type: {workout.workout_type_code}")
print(f"Distance: {workout.distance}m")
print(f"Duration: {workout.duration}s")
print(f"GPS points: {len(workout.gps_track)}")

JSON Export

# Export to JSON string
json_str = workout.to_json()

# Save to file
workout.save_json("workout.json")

# Get as dictionary
data = workout.to_dict()

Batch Export

See examples/export_to_json.py for a complete example of batch processing multiple workout files.

python examples/export_to_json.py ~/workouts/Workouts ~/workouts/json

Development

Setup

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # or `.venv\Scripts\activate` on Windows

# Install dependencies
pip install -e .

Testing

# Run tests
just test

# Or directly with pytest
pytest tests/

Linting

just check  # Run all checks (ruff, mypy)
just lint   # Ruff linting only

File Format

WorkOutDoors stores workout data in binary .wkt files with the following filename format:

YYMMDDHHMMSS_TYPE_DIST_DUR_F5_F6_STEPS_F8[_TITLE].wkt

Where:

  • YYMMDDHHMMSS - End timestamp
  • TYPE - Workout type code (37=Run, 52=Walk, 50=Weightlifting)
  • DIST - Distance in meters
  • DUR - Duration in seconds
  • STEPS - Step count
  • TITLE - Optional custom title

Contributing

This is primarily a personal project, but contributions are welcome. The .wkt format is undocumented and largely reverse-engineered, so discoveries about the binary structure are particularly valuable.

License

AGPL 3.0 - See LICENSE file for details

Release files for wkt_parser 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wkt_parser 1.0.1
File Size Uploaded
wkt_parser-1.0.1.tar.gz 21.8 kB Details

Built distribution (wheel)

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

Total release size:44.1 kB

Release files / wkt_parser-1.0.1.tar.gz

Download URL wkt_parser-1.0.1.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dedfd676af3b1d6f127f5718a1958250af8d0b0ce0e90ba84a22f82dbeb5eb66
BLAKE2b-256 checksum
How to use checksums
bc7f144b965b3d2ec96a27c88ad64da2f93af9a4e602c87779daec19d92c05e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.5 Linux/6.12.63+deb13-amd64

Release files / wkt_parser-1.0.1-py3-none-any.whl

Download URL wkt_parser-1.0.1-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c172c93e777571ef6f9de0ea89366dc13b8e560875ca09c3547ba9cefe477d1
BLAKE2b-256 checksum
How to use checksums
e228962f0f8d026ad05a3e02fb0787b8a5e2a4dce1a40dbefdc9c078291688b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.5 Linux/6.12.63+deb13-amd64

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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