Ancestors

Written by Kelsey Jordahl on 2025-01-02 at 02:03

My afternoon New Year's Day activity (after going for a family hike in the snow earlier) is playing with the Garmin and Strava APIs to download activities. They are both quirky but functional, and thanks to good Python clients for each, not too hard to get started and get data.

=> More informations about this toot | More toots from kajord@hachyderm.io

Written by Kelsey Jordahl on 2025-01-02 at 02:08

The Garmin library (https://github.com/cyberjunky/python-garminconnect) works great, but IIUC it is not using a public API, but basically reverse engineered the API that Garmin apps use. It broke between the time I first installed it a month or so ago and using it more today. Something had changed on the Garmin end without warning, and the Garth maintainer that python-garminconnect depends on updated pretty quickly. So maybe not the most reliable thing in the world.

=> More informations about this toot | More toots from kajord@hachyderm.io

Written by Kelsey Jordahl on 2025-01-02 at 02:14

The Strava client (https://github.com/stravalib/stravalib) is also well-maintained, and not too hard to use after jumping through some hoops for authentication. It uses a real public API which looks well documented. It seems that you can't download GPX files directly, though, so you need to parse and create GPX, which I haven't done yet. There is yet another Python library, stravaweblib, that adds web scraping to API access, and can download GPX (among other things) like you can on the web site. So I've still got a little work to do to get GPX files for Strava activities. Most of them are from Garmin activities anyway, so I will need to do some kind of deduplication if I'm going to do anything with them.

=> More informations about this toot | More toots from kajord@hachyderm.io

Written by Kelsey Jordahl on 2025-01-02 at 02:15

Each seems fragile enough that I wouldn't be eager to support something that depends on them. Either company could change on a whim. For my own uses, they will probably be fine, particularly thanks to active maintainers of the client libraries.

=> More informations about this toot | More toots from kajord@hachyderm.io

Written by Kelsey Jordahl on 2025-01-02 at 02:45

And of course someone has already made a library to dump GPX files from the Strava API: https://jamesephelps.com/2024/07/18/how-to-get-gpx-files-from-the-strava-api-strava2gpx-python/

=> More informations about this toot | More toots from kajord@hachyderm.io

Written by Kelsey Jordahl on 2025-01-02 at 05:32

This library does indeed work for me (with one small fix), and I'm able to get identical data for Strava activities that came from a Garmin one. Should work well enough for backup purposes for me for now, and I may play with it more later.

=> More informations about this toot | More toots from kajord@hachyderm.io

Toot

Written by Kelsey Jordahl on 2025-01-02 at 06:05

We have data

=> View attached media

=> More informations about this toot | More toots from kajord@hachyderm.io

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113757252283801128
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
306.457981 milliseconds
Gemini-to-HTML Time
1.259064 milliseconds

This content has been proxied by September (ba2dc).