Skip to main content

Performance Velo Metrics Toolbox

Project description

VMPY is a toolbox for evaluating typical Cycling Performance Metrics from the ride data e.g. power, heart-rate, velocity, gradient, cadence streams.

All functions within the package do follow the convention, where input/output formats are either traditional Python built-in data structures or are the nd-arrays. This design choice favors easy integration into other projects, e.g.

To help you getting started VMPY also provides a very thin wrapper around the Strava API.


Official release:

pip install vmpy

The bleeding edge work in progress:

pip install git+git://


The VMPY package provides the following functionality: Streams shape preserving calculations e.g. masking, filtering, zone conversions Cycling Performance Metrics Python wrapper around the Strava API v3 for fetching Athletes, Activities and Stream data


>>> from vmpy import strava
>>> stream = strava.retrieve_streams(activity_id=1282167861, access_token=STRAVA_ACCESS_TOKEN)
>>> from vmpy import streams
>>> power_zones = streams.compute_zones(stream['watts'], ftp=270)
>>> hr_zones = streams.compute_zones(stream['heartrate'], lthr=160)
>>> watts_3sec = streams.rolling_mean(stream['watts'], window=3, mask=stream['moving'])
>>> gradient_wo_outliers = streams.median_filter(stream['grade_smooth'], window=31, threshold=1)
>>> from vmpy import metrics
>>> normalizes_power = metrics.normalized_power(stream['watts'])
>>> time_in_power_zones = metrics.time_in_zones(stream['watts'], ftp=260)

Quick Start

Register Strava App

In order to be able to use Strava API the user App must be registered at the link

Application Name: ex.: My Awesome App

Website: ex.: (can be anything, even your FB or Strava page will do)

Application Description ex.: Just fooling around with some Strava data

Authorization Callback Domain (unless you are building a serious App)

Access Token

The Access Token will be found at the users profile page It will look like this: 83ebeabdec09f6670863766f792ead24d61fe3f9

Access Token must be passed explicitly as an argument to the functions found in module

Contribution guidelines

This project is absolutely open for contributions. No strong guidelines yet, except for:

  1. Don’t push on master branch
  2. Test
  3. Write docstrings in NumPy style

Project details

Download files

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

Files for vmpy, version 0.1.6
Filename, size File type Python version Upload date Hashes
Filename, size vmpy-0.1.6-py2.py3-none-any.whl (11.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size vmpy-0.1.6.tar.gz (9.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page