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.
- Python 3.10+
- Setuptools for building stravalib
- Other Python libraries (installed automatically when using pip):
stravalib is available on PyPI and can be installed using pip
:
pip install 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
- How to create a Strava app.
- How to refresh and auto refresh your app token using stravalib.
- How to get activities using stravalib.
- Athlete data using stravalib
- Unit conversion and stravalib
We welcome contributions to our tutorials and get-started documentation if you are a stravalib user and want to contribute!
Ready to contribute? Here's how to set up Stravalib for local development.
- 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.
- Clone your fork locally
Use git clone
to get a local copy of your stravalib repository on your
local filesystem:
git clone [email protected]:your_name_here/stravalib.git
cd stravalib/
- Set up your fork for local development
Read through our development guide to learn how to:
To build the project locally and install in editable mode:
- access the project root directory
- run:
$ pip install -e .
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.
The published sphinx documentation provides much more.
Danny Cunningham 📖 🤔 |
Hugo van Kemenade 💻 👀 |
Jerome Lelong 🐛 |
Jonatan Samoocha 💻 👀 📖 🚧 |
Leah Wasser 💻 👀 📖 |
Robert Kosara 🐛 💬 |
Yotam 📖 |
Émile Nadeau 💻 👀 📖 🚧 |