Garmin iCAL Export
Garmin Connect currently only supports publishing a calendar of planned workouts for the next 30 days (source). Unfortunately, there is no native way to export or publish your past activities. This package provides a CLI tool designed to bridge that gap.
The tool exports your activity history into an iCalendar (.ics) file, which can be imported into any calendar application.
To keep your calendar synchronized with Garmin Connect, you will need to:
- Schedule a periodic job to run the CLI tool.
- Host the generated iCalendar file at a public or accessible URL.
- Subscribe to that URL from your preferred calendar client.
Installation
pip3 install garmin-ical-export
Usage
usage: garmin-ical-export [-h]
[--activity_type {running,cycling,swimming,multi_sport,fitness_equipment,hiking,walking,winter_sports,other,all}]
[--limit LIMIT]
[--measurement_system {metric,imperial}]
[--target_file TARGET_FILE]
[login_email] [password]
Exports Garmin Connect activities to iCalendar file.
positional arguments:
login_email your Garmin Connect login e-mail (falls back to the
GARMIN_ICAL_EXPORT_EMAIL env var, then an interactive
prompt)
password your Garmin Connect login password (falls back to
the GARMIN_ICAL_EXPORT_PASSWORD env var, then an
interactive, hidden prompt)
optional arguments:
-h, --help show this help message and exit
--activity_type {running,cycling,swimming,multi_sport,fitness_equipment,hiking,walking,winter_sports,other,all}
export only specific type of activity
--limit LIMIT max. number of activities to export
--measurement_system {metric,imperial}
which system to use to calculate activity properties
--target_file TARGET_FILE
target .ics file (prints to stdout if not passed)
Examples
Export all activities, print the result (password prompted interactively).
garmin-ical-export <GARMIN_CONNECT_EMAIL>
Export only running activities, save the result to garmin_activities.ics file inside home folder.
garmin-ical-export <GARMIN_CONNECT_EMAIL> <GARMIN_CONNECT_PASSWORD> --activity_type running --target_file ~/garmin_activities.ics
Run non-interactively, e.g. from a cron job, without exposing credentials as command-line arguments.
GARMIN_ICAL_EXPORT_EMAIL=<GARMIN_CONNECT_EMAIL> GARMIN_ICAL_EXPORT_PASSWORD=<GARMIN_CONNECT_PASSWORD> garmin-ical-export --target_file ~/garmin_activities.ics
Security note
login_email and password are optional. If omitted, they're read from the GARMIN_ICAL_EXPORT_EMAIL / GARMIN_ICAL_EXPORT_PASSWORD env vars, and if those aren't set either, you'll be prompted interactively (the password prompt is hidden). Passing credentials as plain command-line arguments still works, but is discouraged since they may end up in your shell history or be visible to other users on the machine via the process list (ps) — prefer the env vars for scheduled/non-interactive runs.
After a successful login, the tool caches your session (not your password) in a garmin-ical-export-session file in your system's temp directory, so you won't be prompted for MFA on every run. Delete that file to force a fresh login.
Development
See AGENTS.md for local setup and running tests.
License
Metadata
Release files for garmin-ical-export 1.2.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 | |
|---|---|---|---|
| garmin_ical_export-1.2.0.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| garmin_ical_export-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.0 kB
Release files / garmin_ical_export-1.2.0.tar.gz
| Download URL | garmin_ical_export-1.2.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
837d86a31f56a1b954f2351be44dc652667f1aceae4495a77f5947290514e093
|
|
BLAKE2b-256 checksum How to use checksums |
42092489db3c681f253e53b6ad8060a9f5df71085505ed900b91126461237e79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / garmin_ical_export-1.2.0-py3-none-any.whl
| Download URL | garmin_ical_export-1.2.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2163a839cc0017cb919cf23aab6c1080a5b7ca642b59e7126b33aed2eb2a0a60
|
|
BLAKE2b-256 checksum How to use checksums |
dab28d36f5c11787e4a6c744c6c7dfd423c874b6518bee682ed109a11c52210e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|