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.

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

📖
É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.4.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.4-py3-none-any.whl (125.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for stravalib-2.4.tar.gz
Algorithm Hash digest
SHA256 eb52a05f3a650a5afc57fc61ebd1936788b9b5b6f56e7e2b68fcdf198a57656f
MD5 d83f6ca5f2af44e6c45a6f43f23ae329
BLAKE2b-256 d39e34bf90a706bca86060c4390653fd446e0ced7b60a0b7c4a17edad38d8c03

See more details on using hashes here.

Provenance

The following attestation bundles were made for stravalib-2.4.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.4-py3-none-any.whl.

File metadata

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

File hashes

Hashes for stravalib-2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 04ea866eb06d0de144e30fa11effc225295e04f2dc9503fb9a361bbd274b5241
MD5 b73911bfd28fce1979093a3f99fead15
BLAKE2b-256 ec49d07a43c97e37b2c85c8ae2b049225ab89d49926be98540f2ade7977c1dbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for stravalib-2.4-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