Skip to content

geekodour/strava-to-sqlite

Repository files navigation

strava-to-sqlite

Get started

Install

pip install strava-to-sqlite

Auth and fetch

# - Allow auth via browser oauth flow
# - Saves credentials to database
strava-to-sqlite auth strava_dump.db

# - Fetches and stores strava activities since last sync for all users
strava-to-sqlite sync strava_dump.db

Explore

Strava API sends polylines which are transformed to GeoJSON LineString by strava-to-sqlite and can rendered on map with datasette-leaflet-geojson and datasette.

# assuming datasette is installed
datasette install datasette-leaflet-geojson
datasette strava_dump.db

Roadmap

  • [ ] Overall clean-up/refactor
  • [ ] Add tests
  • [ ] Client side rate-limiting and retries
  • [ ] Option to fetch for individual user (currently fetches for all authenticated users)

Links, Resources and Thanks