Fast, all-in-one GPX/TCX/FIT toolkit
Project description
fitcxgp
Fast, all-in-one GPX/TCX/FIT toolkit.
Load, inspect, and convert GPX, TCX, and FIT files with one Python, Rust, or CLI API. Every supported input can be written to every supported output.
Why fitcxgp?
- All in one — GPX, TCX, and FIT read/write support.
- Fast — Rust-powered streaming parsers; GPX parsing is up to 31x faster
than
gpxpyon the real-data benchmark. - Useful model — points, segments, telemetry, device info, moving stats, elevation gain, bounds, and track simplification.
- Reliable — FIT CRC validation, property tests, and 8,280 conversion chains verified on 920 real GPX files.
- Easy to embed — Python 3.12+ ABI3 wheel, Rust library, and CLI.
Python
uv add fitcxgp
Load once, write any format:
import fitcxgp
activity_file = fitcxgp.load("run.gpx") # GPX, TCX, or FIT
gpx = activity_file.to_gpx()
tcx = activity_file.to_tcx()
fit = activity_file.to_fit()
Inspect an activity:
activity = activity_file.activities[0]
print(activity.point_count)
print(activity.distance_meters)
print(activity.duration_seconds)
print(activity.average_heart_rate_bpm)
print(activity.elevation_gain.uphill_meters)
Convert files directly:
fitcxgp.convert("run.gpx", "run.fit")
fitcxgp.convert("run.fit", "run.tcx")
Add device information when creating FIT output:
device = fitcxgp.DeviceInfo(
manufacturer_id=1,
product_id=3415,
serial_number=1234567890,
)
fit = activity_file.with_device_info(device).to_fit()
CLI
cargo run --release -- convert run.gpx run.fit
cargo run --release -- info run.fit
cargo run --release -- detect run.tcx
Rust
use fitcxgp_core::{convert, load};
let activity_file = load("run.fit").unwrap();
println!("{} points", activity_file.point_count());
convert("run.fit", "run.gpx").unwrap();
Development
uv sync --python 3.12
uv run pytest
cargo test --workspace
Conversions preserve the shared activity model, not format-specific data such as FIT developer fields or GPX routes and waypoints.
See testing, benchmarks, and the real-data report for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fitcxgp-0.1.0.tar.gz.
File metadata
- Download URL: fitcxgp-0.1.0.tar.gz
- Upload date:
- Size: 41.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0036314ae08214b376789dc1dd92b61fa3584ec0c3e5c6950a114535bef75fe7
|
|
| MD5 |
a9779975be37aefb6b0aee205945755e
|
|
| BLAKE2b-256 |
5ac533f10f76300ea6d6cad35c2d16b7f0c8627b23fc14d0caf10ab708e71757
|
File details
Details for the file fitcxgp-0.1.0-cp312-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: fitcxgp-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 696.1 kB
- Tags: CPython 3.12+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d632717f64431817d92b4296b9c912f0ce35f6db2d1372bf44c293759310985e
|
|
| MD5 |
39d53b1f93e3f2848f79efd7c32d44e3
|
|
| BLAKE2b-256 |
6e795d4ed1da8cd85d777ad5e6ff0281cacb3a14d488311428afe937797c5c44
|