You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says, I wanted to ask if there would be interest in adding a cache feature to garminconnect.
In order to speed up mining my own Garmin data using the garminconnect API I've written a wrapper, which automatically stores response to disk (JSON) and serves them on subsequent calls, eliminating any redundant API requests. It handles date-range queries by splitting and caching per-day entries, allowing efficient offline access to historical data while respecting endpoints that shouldn't be cached.
Of note, it does not require any changes to code, e.g. you call "cache.get_stats()" instead of "garmin.get_stats() and get the performance benefit. It can also enable some ways of getting data more efficiently, e.g. you can call not only "cache.get_stats('2025-12-12')" but also "cache.get_stats('2025-12-12', '2025-12-15')" (which would not be inefficient with garmin.get_stats()).
Very nice for iterative analysis, development, or working offline.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Ron, hello all,
As the title says, I wanted to ask if there would be interest in adding a cache feature to garminconnect.
In order to speed up mining my own Garmin data using the garminconnect API I've written a wrapper, which automatically stores response to disk (JSON) and serves them on subsequent calls, eliminating any redundant API requests. It handles date-range queries by splitting and caching per-day entries, allowing efficient offline access to historical data while respecting endpoints that shouldn't be cached.
Of note, it does not require any changes to code, e.g. you call "cache.get_stats()" instead of "garmin.get_stats() and get the performance benefit. It can also enable some ways of getting data more efficiently, e.g. you can call not only "cache.get_stats('2025-12-12')" but also "cache.get_stats('2025-12-12', '2025-12-15')" (which would not be inefficient with garmin.get_stats()).
Very nice for iterative analysis, development, or working offline.
KR
Michael
Beta Was this translation helpful? Give feedback.
All reactions