Zwift Mobile API client written in Python. Heavily inspired by zwift-mobile-api.
$ pip install zwift-client
>>> from zwift import Client
>>> username = 'your-username'
>>> password = 'your-password'
>>> player_id = your-player-id
>>> client = Client(username, password)
>>> 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 = 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 = 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.
This package was created with cookiecutter and the audreyr/cookiecutter-pypackage project template.