Skip to main content

Zwift Mobile API client.

Project description

Zwift Mobile API client

https://img.shields.io/pypi/v/zwift-client.svg https://img.shields.io/travis/jsmits/zwift-client.svg Updates

Zwift Mobile API client written in Python. Heavily inspired by zwift-mobile-api.

Installation

$ pip install zwift-client

Usage

Client

>>> from zwift import Client
>>> username = 'your-username'
>>> password = 'your-password'
>>> player_id = your-player-id
>>> client = Client(username, password)

Profile

>>> profile = client.get_profile()
>>> profile.profile  # fetch your profile data
>>> profile.followers
>>> profile.followees
>>> profile.get_activities()  # metadata of your activities
>>> profile.latest_activity  # metadata of your latest activity

Activity

>>> activity = client.get_activity(player_id)
>>> activities = activity.list()  # your activities (default start is 0, default limit is 20)
>>> activities = activity.list(start=20, limit=50)
>>> latest_activity_id = activities[0]['id']
>>> activity.get_activity(latest_activity_id)  # metadata of your latest activity
>>> activity.get_data(latest_activity_id)  # processed FIT file data

World

>>> world = client.get_world(1)  # get world with id 1
>>> world.players  # players currently present in this world
>>> world.player_status(player_id) # current player status information like speed, cadence, power, etc.

Credits

This package was created with cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.2.0 (2018-03-02)

  • Add optional start and limit keyword arguments to Activity.list().

0.1.0 (2018-01-14)

  • Initial release.

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

zwift-client-0.2.0.tar.gz (19.6 kB view hashes)

Uploaded Source

Built Distribution

zwift_client-0.2.0-py2.py3-none-any.whl (13.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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