stravalib
A Python package that makes it easy to access and download data from the Strava V3 REST API.
What it is and what it does
stravalib is a Python wrapper around the Strava V3 REST API that handles OAuth authentication, token management, and data retrieval for activities, athletes, and clubs. It abstracts away the HTTP details of talking to Strava's servers, letting you work with Strava data through a `Client` class that returns structured objects. The package also integrates pint for unit conversion (e.g., converting distances between miles and kilometers) and arrow for working with timestamps, so you can work with Strava's temporal and measurement data in your preferred units.
The library is actively maintained, supports modern Python versions (3.11–3.14), and has no known security vulnerabilities. Its four runtime dependencies are all well-established packages, keeping the install footprint small. It's aimed at developers and researchers who want to build tools around Strava data—whether that's personal activity analysis, training dashboards, or research on athlete behavior.
Use it for:
- Build a personal dashboard that fetches your recent activities and displays them with custom metrics or visualizations.
- Analyze your cycling or running performance over time by downloading historical activity data and computing statistics.
- Integrate Strava data into a fitness tracking application that combines data from multiple sources.
- Automate activity tagging or metadata updates on Strava by modifying activities through the API.
- Export athlete profile and club membership data for research or reporting purposes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
stravalib provides a Python client for authenticating with and querying the Strava V3 API to access activity, club, and athlete data, with built-in support for unit conversion and temporal handling.
Yes. stravalib is a mature, actively maintained library (first release 2013, latest 2026-06-01) with no security vulnerabilities, low install friction, and permissive licensing. It's the standard Python client for Strava API access and is well-suited for anyone building tools that need to read or modify Strava data. Install it if you're working with Strava activity data.
Install
stravalib on PyPI
pip
pip install stravalibuv
uv add stravalibpoetry
poetry add stravalibInstalling stravalib
Before you install
Low friction install with four lightweight runtime dependencies (pint, arrow, requests, pydantic). Active maintenance with a recent release 74 days ago and continued repository activity; requires Python 3.11 or later.
License in practice
Apache 2.0 License (permissive) allows free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install stravalib
from stravalib.client import Client
client = Client(access_token='your_token')
athlete = client.get_athlete()
Requires Python 3.11 or later; you must obtain a Strava API access token from a registered Strava app before authenticating.
Verify before relying
- Whether token refresh is automatic or requires manual intervention beyond what the description states.
- Rate limiting behavior and handling of Strava API quota constraints.
- Whether the package supports all Strava V3 API endpoints or a subset.
Package facts
| License | Apache 2.0 License (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — pint, arrow, requests, pydantic |
| Maintenance | actively maintained — 74 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 164,715/month — #10,540 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: stravalib-2.5.0-py3-none-any.whl
Keywords: strava, running, cycling, athletes
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
garminconnectPython wrapper for the Garmin Connect API that…
permissive · top 15,000 on PyPI
stream-pythonOfficial Python client library for Stream Feeds…
permissive · top 5,000 on PyPI
microsoft-teams-apiHTTP client library for Microsoft Teams Bot…
permissive · top 5,000 on PyPI
fit-toolReads and writes Garmin FIT files for Activity,…
permissive · top 15,000 on PyPI
ha-garminPython client for the Garmin Connect API with…
permissive · top 15,000 on PyPI
python-keystoneclientPython client library for authenticating with…
permissive · top 5,000 on PyPI
RachioPyRachioPy provides a Python interface to the…
permissive · top 15,000 on PyPI
django-activity-streamDjango Activity Stream generates and displays…
permissive · top 15,000 on PyPI
freebox-apiAsynchronous Python library for authenticating…
copyleft · top 15,000 on PyPI
veracode-api-pyProvides a Python wrapper for Veracode REST…
permissive · top 15,000 on PyPI