Corosexport - Coros Activity Exporter
A Python library and command-line tool for downloading and backing up Coros activities to your local machine, similar to the popular garminexport for Garmin devices.
Features
- Incremental Backups - First run downloads all activities, subsequent runs only grab new ones
- Multiple Formats - Export activities as FIT, TCX, GPX, KML or CSV
- Library & CLI - Use as a standalone tool or import into your own Python projects
- Cross-Platform - Works on macOS, Linux, and Windows
- State Tracking - Automatically tracks which activities have been backed up
Quick Start
Installation
With uv (Recommended)
# Clone the repository
git clone https://github.com/rbettermann/corosexport.git
cd corosexport
# Install with uv
uv sync
# Run the CLI
uv run coros-backup
With pip
pip install corosexport
coros-backup --backup-dir=./coros_activities
First Backup
coros-backup --backup-dir=~/coros_activities
The tool will prompt for your Coros email and password, then:
- Authenticate with Coros Training Hub
- Fetch all activities
- Download files in your specified formats
- Save a state file for future incremental backups
Incremental Backups
Run the same command again - it will only download new activities:
coros-backup --backup-dir=~/coros_activities --format fit --format tcx
Development Setup
Prerequisites
- Python 3.9+
- uv (for fast package management)
Setup Development Environment
git clone https://github.com/yourusername/corosexport.git
cd corosexport
# Install all dependencies including dev tools
uv sync
# Run tests
uv run pytest -v
# Run with verbose logging
uv run coros-backup --verbose
# Format code
uv run black src/ tests/
# Lint code
uv run ruff check src/ tests/
# Type checking
uv run mypy src/
API Usage (as Library)
Use corosexport in your own Python projects:
from pathlib import Path
from corosexport import CorosClient, BackupManager
from corosexport.models import ExportFormat
# Create and authenticate client
client = CorosClient(email="user@example.com", password="your_password")
client.authenticate()
# Fetch activities
activities = client.get_activities(limit=50)
for activity in activities:
print(f"{activity.activity_name}: {activity.distance_meters}m")
# Setup backup manager
backup_manager = BackupManager(
client=client,
backup_dir=Path("./coros_activities"),
formats=[ExportFormat.FIT, ExportFormat.TCX],
)
# Run backup
stats = backup_manager.run_backup()
print(f"Downloaded {stats['activities_downloaded']} new activities")
Backup Directory Structure
After running backups, your directory looks like this:
coros_activities/
├── .corosexport_state.json # Internal state file (do not edit)
├── 2025-01-10_activity-001-metadata.json # Activity summary data
├── 2025-01-10_activity-001.fit # Raw FIT file
├── 2025-01-10_activity-001.tcx # TCX format
├── 2025-01-10_activity-001.gpx # GPX format
├── 2025-01-11_activity-002-metadata.json
├── 2025-01-11_activity-002.fit
├── 2025-01-11_activity-002.tcx
├── 2025-01-11_activity-002.gpx
├── ...
metadata.json contains:
- Activity ID, name, type
- Distance (meters)
- Start time, end time, workout duration, total duration
Command-Line Options
coros-backup --help
Options:
--backup-dir TEXT Directory to store activities (default: ./coros_activities)
--email TEXT Coros account email
--password TEXT Coros password (prompts if omitted for security)
--region [eu|us] Coros account region (default: eu)
--base-url TEXT Override the API host directly. Takes precedence over --region.
--format TEXT Export formats: fit, tcx, gpx, kml or csv
--verbose Enable debug logging
--help Show this message
Examples
# Backup to specific directory
coros-backup --backup-dir ~/fitness_backups
# Download only FIT files
coros-backup --format fit
# Download all formats
coros-backup --format fit --format tcx --format gpx
# Enable verbose output
coros-backup --backup-dir ~/coros --verbose
# Backup a US region account
coros-backup --region us
# Point at a custom API host (overrides --region)
coros-backup --base-url https://teamapi.coros.com
Architecture Notes
Reverse-Engineered APIs
This project uses reverse-engineered APIs from the Coros Training Hub web interface. The endpoints used are:
POST /account/login- AuthenticationGET /activity/query- List activitiesGET /activity/detail/download- Download activity files
These are not officially documented by Coros. This tool is for personal data backup only.
State Management
Backups are incremental using a .corosexport_state.json file that tracks:
- When the last backup completed
- Which activity IDs have been downloaded
- Total activities backed up
Testing
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=src/corosexport
# Run specific test file
uv run pytest tests/test_client.py -v
# Run with verbose output
uv run pytest -v -s
Disclaimer
This tool is for personal data backup only. While Coros has not explicitly prohibited API access via their Terms of Service, they have not published official APIs either. Use at your own discretion and respect Coros' services.
License
Apache License 2.0 - See LICENSE file for details
Related Projects
- garminexport - Similar tool for Garmin devices
- strava-offline - Strava activity backup
FAQ
Q: Is this tool affiliated with Coros? A: No, this is a community project created for personal data archival.
Q: Does this work with the Coros mobile app? A: No, this tool works with the Coros Training Hub web interface.
Q: Can I upload activities back to Coros? A: Not currently, but this could be added in future versions.
Q: What about my password security? A: Passwords are only used to authenticate and are never stored. They're passed directly to Coros' servers over HTTPS.
Metadata
Release files for corosexport 0.1.6
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 |
|---|---|---|---|---|
| corosexport-0.1.6.tar.gz | 107.4 kB | With provenance | Details for corosexport-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| corosexport-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for corosexport-0.1.6-py3-none-any.whl |
Total release size: 120.0 kB
Release files / corosexport-0.1.6.tar.gz
| Download URL | corosexport-0.1.6.tar.gz |
|---|---|
| Size | 107.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55bf4fbbe5d3136d14f099429b5267680cc6763b936afa9593faa8a412ed32da
|
|
BLAKE2b-256 checksum How to use checksums |
9efcc355286b98eb85064310332b2aeb97ba5d3a456517daa761f23899768405
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logRelease files / corosexport-0.1.6-py3-none-any.whl
| Download URL | corosexport-0.1.6-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec3e5affe13c47d57502a08b4fcfd741f7ab32789265ad148239980a64c0f0f4
|
|
BLAKE2b-256 checksum How to use checksums |
38851cd5bf624f9ec1341ae87da8ca40838442917ab30a4b0e5f1f5d7fdee526
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logSecurity for corosexport 0.1.6
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for corosexport-0.1.6.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logA 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.