Skip to main content

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

Project description

Welcome to stravalib

All Contributors DOI PyPI PyPI - Python Version Documentation Status Package Tests Status PyPI - Downloads codecov

The stravalib Python package provides easy-to-use tools for accessing and downloading Strava data from the Strava V3 API. Stravalib provides a Client class that supports:

  • Authenticating with stravalib
  • Managing your authentication to ensure it's current (if you have your environment setup)
  • Accessing and downloading Strava activity, club, and profile data
  • Making changes to account activities

It also provides support for working with date/time/temporal attributes and quantities through the Python Pint library.

Dependencies

Installation

stravalib is available on PyPI and can be installed using pip:

pip install stravalib

Get started using Stravalib

Most of the methods you will use with stravalib are in the stravalib.client.Client class.

You may be interested in the following tutorials to get started

  1. How to create a Strava app.
  2. How to refresh and auto refresh your app token using stravalib.
  3. How to get activities using stravalib.
  4. Athlete data using stravalib
  5. Unit conversion and stravalib

We welcome contributions to our tutorials and get-started documentation if you are a stravalib user and want to contribute!

How to Contribute to Stravalib

Contributing quickstart

Ready to contribute? Here's how to set up Stravalib for local development.

  1. Fork the repository on GitHub

To create your own copy of the repository on GitHub, navigate to the stravalib/stravalib <https://github.com/stravalib/stravalib> repository and click the Fork button in the top-right corner of the page.

  1. Clone your fork locally

Use git clone to get a local copy of your stravalib repository on your local filesystem:

git clone git@github.com:your_name_here/stravalib.git
cd stravalib/
  1. Set up your fork for local development

Read through our development guide to learn how to:

Building from source

To build the project locally and install in editable mode:

  1. access the project root directory
  2. run:
$ pip install -e .

Pull Requests and tests

Please add tests that cover any changes that you make to stravalib. Adding tests will greatly reduce the effort of reviewing and merging your Pull Request. Read more about our test suite here.. We developed a mock fixture that ensures that when tests are run, they are not hitting the Strava API.

Still reading?

The published sphinx documentation provides much more.

BPR
BPR

💻
Danny Cunningham
Danny Cunningham

📖 🤔
Hugo van Kemenade
Hugo van Kemenade

💻 👀
Jerome Lelong
Jerome Lelong

🐛
Jonatan Samoocha
Jonatan Samoocha

💻 👀 📖 🚧
Leah Wasser
Leah Wasser

💻 👀 📖
Mike Fiedler
Mike Fiedler

💻 👀 🛡️
Reno Viana
Reno Viana

💻 🐛 👀
Robert Kosara
Robert Kosara

🐛 💬
Yotam
Yotam

📖
yihong
yihong

🐛
Émile Nadeau
Émile Nadeau

💻 👀 📖 🚧

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stravalib-2.5.0.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stravalib-2.5.0-py3-none-any.whl (128.2 kB view details)

Uploaded Python 3

File details

Details for the file stravalib-2.5.0.tar.gz.

File metadata

  • Download URL: stravalib-2.5.0.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for stravalib-2.5.0.tar.gz
Algorithm Hash digest
SHA256 d97a845a30c861bc65a854423b201497f0ea56ba5a763294b8d886269bbe6fe3
MD5 206e3b8c16a173d417b0b2ca57800412
BLAKE2b-256 e861a3c43433e06dd2edfb249a99e7740802d2c64b2f8d5126a64118263cb75c

See more details on using hashes here.

Provenance

The following attestation bundles were made for stravalib-2.5.0.tar.gz:

Publisher: publish-pypi.yml on stravalib/stravalib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stravalib-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: stravalib-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 128.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for stravalib-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 723422a3f06fd7f213b9b4b813f730a481fd0869b5b5e6a350f4823a1063d092
MD5 e8836d8609da55a991de6fc695a74625
BLAKE2b-256 f40a9c510377cca40b6bebe915d451126db413391664db88ff50fe02a7be7709

See more details on using hashes here.

Provenance

The following attestation bundles were made for stravalib-2.5.0-py3-none-any.whl:

Publisher: publish-pypi.yml on stravalib/stravalib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page