skillfed

stravalib

A Python package that makes it easy to access and download data from the Strava V3 REST API.

stravalib v2.5.0 164.7K downloads/30d#10,540 on PyPI995
Permissive license Apache 2.0 License Active released

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 stravalib

uv

uv add stravalib

poetry

poetry add stravalib

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Software Development :: Libraries

Tags

strava api client pythondownload strava activitiesstrava data access librarystrava authentication pythoncycling running activity datastrava athlete profile apistrava rest api wrapper
strava-integrationrest-api-clientfitness-data

More Libraries packages