Model¶
Entity classes for representing the various Strava datatypes.
- class stravalib.model.BaseEntity(**kwargs)[source]¶
Bases:
objectA base class for all entities in the system, including objects that may not be first-class entities in Strava.
- to_dict()[source]¶
Create a dictionary based on the loaded attributes in this object (will not lazy load).
Note that the dictionary created by this method will most likely not match the dictionaries that are passed to the from_dict() method. This intended for serializing for local storage debug/etc.
- Return type
Dict[str, Any]
- class stravalib.model.ResourceStateEntity(**kwargs)[source]¶
Bases:
stravalib.model.BaseEntityMixin for entities that include the resource_state attribute.
- resource_state¶
The detail-level for this entity.
- class stravalib.model.IdentifiableEntity(**kwargs)[source]¶
Bases:
stravalib.model.ResourceStateEntityMixin for entities that include an ID attribute.
- id¶
The numeric ID for this entity.
- class stravalib.model.BoundEntity(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.BaseEntityBase class for entities that support lazy loading additional data using a bound client.
- bind_client = None¶
The
stravalib.client.Clientthat can be used to load related resources.
- class stravalib.model.LoadableEntity(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.BoundEntity,stravalib.model.IdentifiableEntityBase class for entities that are bound and have an ID associated with them.
In theory these entities can be “expaned” by additional Client queries. In practice this is not implemented, since usefulness is limited due to resource-state limitations, etc.
- class stravalib.model.Club(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityClass to represent a club.
Currently summary and detail resource states have the same attributes.
- name¶
Name of the club.
- profile_medium¶
URL to a 62x62 pixel club picture
- profile¶
URL to a 124x124 pixel club picture
- description¶
Description of the club
- club_type¶
Type of club (casual_club, racing_team, shop, company, other)
- sport_type¶
Sport of the club (cycling, running, triathlon, other)
- city¶
City the club is based in
- state¶
State the club is based in
- country¶
Country the club is based in
- private¶
Whether the club is private
- member_count¶
Number of members in the club
- verified¶
Base descriptor class for a Strava model attribute.
- url¶
vanity club URL slug
- featured¶
Base descriptor class for a Strava model attribute.
- cover_photo¶
URL to a ~1185x580 pixel cover photo
- cover_photo_small¶
URL to a ~360x176 pixel cover photo
- membership¶
Base descriptor class for a Strava model attribute.
- admin¶
Base descriptor class for a Strava model attribute.
- owner¶
Base descriptor class for a Strava model attribute.
- property members¶
An iterator of
stravalib.model.Athletemembers of this club.
- property activities¶
An iterator of reverse-chronological
stravalib.model.Activityactivities for this club.
- class stravalib.model.Gear(**kwargs)[source]¶
Bases:
stravalib.model.IdentifiableEntityInformation about Gear (bike or shoes) used during activity.
- id¶
Alpha-numeric gear ID.
- name¶
Name athlete entered for bike (does not apply to shoes)
- distance¶
Distance for this bike/shoes.
- primary¶
athlete’s default bike/shoes
- brand_name¶
Brand name of bike/shoes.
- model_name¶
Modelname of bike/shoes.
- description¶
Description of bike/shoe item.
- class stravalib.model.Bike(**kwargs)[source]¶
Bases:
stravalib.model.GearRepresents an athlete’s bike.
- frame_type¶
(detailed-only) Type of bike frame.
- class stravalib.model.Shoe(**kwargs)[source]¶
Bases:
stravalib.model.GearRepresents an athlete’s pair of shoes.
- nickname¶
Nickname for the shoe.
- converted_distance¶
Distance on the shoe (meters)
- retired¶
Is the shoe retired?
- class stravalib.model.ActivityTotals(**kwargs)[source]¶
Bases:
stravalib.model.BaseEntityRepresent ytd/recent/all run/ride totals.
- achievement_count¶
How many achievements
- count¶
How many activities
- distance¶
Total distance travelled
- elapsed_time¶
datetime.timedeltaof total elapsed time
- elevation_gain¶
Total elevation gain
- moving_time¶
datetime.timedeltaof total moving time
- class stravalib.model.AthleteStats(**kwargs)[source]¶
Bases:
stravalib.model.BaseEntityRepresents a combined set of an Athlete’s statistics.
- biggest_ride_distance¶
Longest ride for athlete.
- biggest_climb_elevation_gain¶
Greatest single elevation gain for athlete.
- recent_ride_totals¶
Recent totals for rides. (
stravalib.model.ActivityTotals)
- recent_run_totals¶
Recent totals for runs. (
stravalib.model.ActivityTotals)
- recent_swim_totals¶
Recent totals for swims. (
stravalib.model.ActivityTotals)
- ytd_ride_totals¶
Year-to-date totals for rides. (
stravalib.model.ActivityTotals)
- ytd_run_totals¶
Year-to-date totals for runs. (
stravalib.model.ActivityTotals)
- ytd_swim_totals¶
Year-to-date totals for swims. (
stravalib.model.ActivityTotals)
- all_ride_totals¶
All-time totals for rides. (
stravalib.model.ActivityTotals)
- all_run_totals¶
All-time totals for runs. (
stravalib.model.ActivityTotals)
- all_swim_totals¶
All-time totals for swims. (
stravalib.model.ActivityTotals)
- class stravalib.model.Athlete(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityRepresents a Strava athlete.
- firstname¶
Athlete’s first name.
- lastname¶
Athlete’s last name.
- profile_medium¶
URL to a 62x62 pixel profile picture
- profile¶
URL to a 124x124 pixel profile picture
- city¶
Athlete’s home city
- state¶
Athlete’s home state
- country¶
Athlete’s home country
- sex¶
Athlete’s sex (‘M’, ‘F’ or null)
- friend¶
‘pending’, ‘accepted’, ‘blocked’ or ‘null’ the authenticated athlete’s following status of this athlete
- follower¶
‘pending’, ‘accepted’, ‘blocked’ or ‘null’ this athlete’s following status of the authenticated athlete
Whether athlete is a premium member (true/false). Deprecated use summit.
- summit¶
Whether the athlete has any Summit subscription.
- created_at¶
datetime.datetimewhen athlete record was created.
- updated_at¶
datetime.datetimewhen athlete record was last updated.
- approve_followers¶
Whether athlete has elected to approve followers
- badge_type_id¶
(undocumented)
- follower_count¶
(detailed-only) How many people are following this athlete
- friend_count¶
(detailed-only) How many people is this athlete following
- mutual_friend_count¶
(detailed-only) How many people are both following and being followed by this athlete
- athlete_type¶
athlete’s default sport: 0 is cyclist, 1 is runner
- date_preference¶
(detailed-only) Athlete’s preferred date representation (e.g. “%m/%d/%Y”)
- measurement_preference¶
(detailed-only) How athlete prefers to see measurements (i.e. “feet” (or what “meters”?))
- email¶
(detailed-only) Athlete’s email address
- clubs¶
(detailed-only) Which clubs athlete belongs to. (
listofstravalib.model.Club)
- bikes¶
(detailed-only) Which bikes this athlete owns. (
listofstravalib.model.Bike)
- shoes¶
(detailed-only) Which shoes this athlete owns. (
listofstravalib.model.Shoe)
- super_user¶
(undocumented) Whether athlete is a super user (not
- email_language¶
The user’s preferred lang/locale (e.g. en-US)
- weight¶
(undocumented, detailed-only) Athlete’s configured weight.
- max_heartrate¶
(undocumented, detailed-only) Athlete’s configured max HR
- username¶
(undocumented, detailed-only) Athlete’s username.
- description¶
(undocumented, detailed-only) Athlete’s personal description
- instagram_username¶
(undocumented, detailed-only) Associated instagram username
- offer_in_app_payment¶
(undocumented, detailed-only)
- global_privacy¶
(undocumented, detailed-only) Whether athlete has global privacy enabled.
- receive_newsletter¶
(undocumented, detailed-only) Whether athlete has elected to receive newsletter
- email_kom_lost¶
(undocumented, detailed-only) Whether athlete has elected to receive emails when KOMs are lost.
- dateofbirth¶
(undocumented, detailed-only) Athlete’s date of birth
- facebook_sharing_enabled¶
(undocumented, detailed-only) Whether Athlete has enabled sharing on Facebook
- ftp¶
(undocumented, detailed-only)
- profile_original¶
(undocumented, detailed-only)
(undocumented, detailed-only) When does premium membership expire (
intunix epoch)
- email_send_follower_notices¶
(undocumented, detailed-only)
- plan¶
(undocumented, detailed-only)
- agreed_to_terms¶
(undocumented, detailed-only) Whether athlete has agreed to terms
- follower_request_count¶
(undocumented, detailed-only) How many people have requested to follow this athlete
- email_facebook_twitter_friend_joins¶
(undocumented, detailed-only) Whether athlete has elected to receve emails when a twitter or facebook friend joins Strava
- receive_kudos_emails¶
(undocumented, detailed-only) Whether athlete has elected to receive emails on kudos
- receive_follower_feed_emails¶
(undocumented, detailed-only) Whether athlete has elected to receive emails on new followers
- receive_comment_emails¶
(undocumented, detailed-only) Whether athlete has elected to receive emails on activity comments
- sample_race_distance¶
Base descriptor class for a Strava model attribute.
- sample_race_time¶
Base descriptor class for a Strava model attribute.
- membership¶
(undocumented, club members only) String indicating the membership type of club
- admin¶
(undocumented, club members only) Flag indicating whether member is an admin of club
- owner¶
(undocumented, club members only) Flag indicating whether member is owner of club
- subscription_permissions¶
(undocumented) Unsure what this holds exactly!
- is_authenticated_athlete()[source]¶
- Returns
Boolean as to whether the athlete is the authenticated athlete.
- property friends¶
- Returns
Iterator of
stravalib.model.Athletefriend objects for this athlete.
- property followers¶
- Returns
Iterator of
stravalib.model.Athletefollowers objects for this athlete.
- property stats¶
- Returns
Associated
stravalib.model.AthleteStats
- class stravalib.model.ActivityComment(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityComments attached to an activity.
- activity_id¶
ID of activity
- text¶
Text of comment
- created_at¶
datetime.datetimewhen was coment created
- athlete¶
Associated
stravalib.model.Athlete(summary-level representation)
- class stravalib.model.ActivityPhotoPrimary(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityA primary photo attached to an activity (different structure from full photo record)
- id¶
ID of photo, if external.
- unique_id¶
ID of photo, if internal.
- urls¶
Base descriptor class for a Strava model attribute.
- source¶
1=internal, 2=instagram
- use_primary_photo¶
(undocumented)
- class stravalib.model.ActivityPhotoMeta(**kwargs)[source]¶
Bases:
stravalib.model.BaseEntityThe photos structure returned with the activity, not to be confused with the full loaded photos for an activity.
- count¶
Base descriptor class for a Strava model attribute.
- primary¶
Attribute for another entity.
- use_primary_photo¶
Base descriptor class for a Strava model attribute.
- class stravalib.model.ActivityPhoto(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityA full photo record attached to an activity.
- athlete_id¶
ID of athlete
- activity_id¶
ID of activity
- activity_name¶
Name of activity.
- ref¶
- uid¶
unique id for instagram photo
- unique_id¶
unique id for strava photos
- caption¶
caption on photo
- type¶
type of photo (currently only InstagramPhoto)
- uploaded_at¶
datetime.datetimewhen was photo uploaded
- created_at¶
datetime.datetimewhen was photo created
- created_at_local¶
datetime.datetimewhen was photo created
- location¶
Start lat/lon of photo
- urls¶
Base descriptor class for a Strava model attribute.
- sizes¶
Base descriptor class for a Strava model attribute.
- post_id¶
Base descriptor class for a Strava model attribute.
- default_photo¶
Base descriptor class for a Strava model attribute.
- source¶
Base descriptor class for a Strava model attribute.
- class stravalib.model.ActivityKudos(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityActivity kudos are a subset of athlete properties.
- firstname¶
Athlete’s first name.
- lastname¶
Athlete’s last name.
- profile_medium¶
URL to a 62x62 pixel profile picture
- profile¶
URL to a 124x124 pixel profile picture
- city¶
Athlete’s home city
- state¶
Athlete’s home state
- country¶
Athlete’s home country
- sex¶
Athlete’s sex (‘M’, ‘F’ or null)
- friend¶
‘pending’, ‘accepted’, ‘blocked’ or ‘null’ the authenticated athlete’s following status of this athlete
- follower¶
‘pending’, ‘accepted’, ‘blocked’ or ‘null’ this athlete’s following status of the authenticated athlete
Whether athlete is a premium member (true/false)
- created_at¶
datetime.datetimewhen athlete record was created.
- updated_at¶
datetime.datetimewhen athlete record was last updated.
- approve_followers¶
Whether athlete has elected to approve followers
- class stravalib.model.ActivityLap(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntity- name¶
Name of lap
- activity¶
The associated
stravalib.model.Activity
- athlete¶
The associated
stravalib.model.Athlete
- elapsed_time¶
datetime.timedeltaof elapsed time for lap
- moving_time¶
datetime.timedeltaof moving time for lap
- start_date¶
datetime.datetimewhen lap was started in GMT
- start_date_local¶
datetime.datetimewhen lap was started local
- distance¶
The distance for this lap.
- start_index¶
- end_index¶
- total_elevation_gain¶
What is total elevation gain for lap
- average_speed¶
Average speed for lap
- max_speed¶
Max speed for lap
- average_cadence¶
Average cadence for lap
- average_watts¶
Average watts for lap
- average_heartrate¶
Average heartrate for lap
- max_heartrate¶
Max heartrate for lap
- lap_index¶
Index of lap
- device_watts¶
Base descriptor class for a Strava model attribute.
- pace_zone¶
(undocumented)
- split¶
Split number
- class stravalib.model.Map(**kwargs)[source]¶
Bases:
stravalib.model.IdentifiableEntity- id¶
Alpha-numeric identifier
- polyline¶
Google polyline encoding
- summary_polyline¶
Google polyline encoding for summary shape
- class stravalib.model.Split(**kwargs)[source]¶
Bases:
stravalib.model.BaseEntityA split – may be metric or standard units (which has no bearing on the units used in this object, just the binning of values).
- distance¶
Distance for this split
- elapsed_time¶
datetime.timedeltaof elapsed time for split
- elevation_difference¶
Elevation difference for split
- moving_time¶
datetime.timedeltaof moving time for split
- average_heartrate¶
Average HR for split
- split¶
Which split number
- pace_zone¶
(undocumented)
- average_speed¶
Base descriptor class for a Strava model attribute.
- average_grade_adjusted_speed¶
Base descriptor class for a Strava model attribute.
- class stravalib.model.SegmentExplorerResult(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityRepresents a segment result from the segment explorer feature.
(These are not full segment objects, but the segment object can be fetched via the ‘segment’ property of this object.)
- id¶
ID of the segment.
- name¶
Name of the segment
- climb_category¶
Climb category for the segment (0 is higher)
- climb_category_desc¶
Climb category text
- avg_grade¶
Average grade for segment.
- start_latlng¶
Start lat/lon for segment
- end_latlng¶
End lat/lon for segment
- elev_difference¶
Total elevation difference over segment.
- distance¶
Distance of segment.
- points¶
Encoded Google polyline of points in segment
- starred¶
Whether this segment is starred by authenticated athlete
- property segment¶
Associated (full)
stravalib.model.Segmentobject.
- class stravalib.model.AthleteSegmentStats(**kwargs)[source]¶
Bases:
stravalib.model.BaseEntityAn undocumented structure being returned for segment stats for current athlete.
- effort_count¶
(UNDOCUMENTED) Presumably how many efforts current athlete has on segment.
- pr_elapsed_time¶
(UNDOCUMENTED) Presumably PR elapsed time for segment.
- pr_date¶
(UNDOCUMENTED) Presumably date of PR :)
- class stravalib.model.AthletePrEffort(**kwargs)[source]¶
Bases:
stravalib.model.IdentifiableEntityAn undocumented structure being returned for segment Athlete Pr Effort.
- distance¶
Base descriptor class for a Strava model attribute.
- elapsed_time¶
Handles time durations, assumes upstream int value in seconds.
- start_date¶
- start_date_local¶
- is_kom¶
Base descriptor class for a Strava model attribute.
- class stravalib.model.Segment(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityRepresents a single Strava segment.
- name¶
Name of the segment.
- activity_type¶
Activity type of segment (‘Ride’ or ‘Run’)
- distance¶
Distance of segment
- average_grade¶
Average grade (%) for segment
- maximum_grade¶
Maximum grade (%) for segment
- elevation_high¶
The highest point of the segment.
- elevation_low¶
The lowest point of the segment.
- climb_category¶
Base descriptor class for a Strava model attribute.
- city¶
The city this segment is in.
- state¶
The state this segment is in.
- country¶
The country this segment is in.
- private¶
Whether this is a private segment.
- starred¶
Whether this segment is starred by authenticated athlete
- athlete_segment_stats¶
Undocumented attrib holding stats for current athlete.
- created_at¶
datetime.datetimewhen was segment created.
- updated_at¶
datetime.datetimewhen was segment last updated.
- total_elevation_gain¶
What is total elevation gain for segment.
- map¶
stravalib.model.Mapobject for segment.
- effort_count¶
How many times has this segment been ridden.
- athlete_count¶
How many athletes have ridden this segment
- hazardous¶
Whether this segment has been flagged as hazardous
- star_count¶
number of stars on this segment.
- pr_time¶
pr time for athlete
- starred_date¶
datetime when be starred
- athlete_pr_effort¶
Attribute for another entity.
- elevation_profile¶
Base descriptor class for a Strava model attribute.
- property leaderboard¶
The
stravalib.model.SegmentLeaderboardobject for this segment.
- class stravalib.model.SegmentEfforAchievement(**kwargs)[source]¶
Bases:
stravalib.model.BaseEntityAn undocumented structure being returned for segment efforts.
- rank¶
Rank in segment (either overall leaderboard, or pr rank)
- type¶
The type of achievement – e.g. ‘year_pr’ or ‘overall’
- type_id¶
Numeric ID for type of achievement? (6 = year_pr, 2 = overall ??? other?)
- class stravalib.model.BaseEffort(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityBase class for a best effort or segment effort.
- name¶
The name of the segment
- segment¶
The associated
stravalib.model.Segmentfor this effort
- activity¶
The associated
stravalib.model.Activity
- athlete¶
The associated
stravalib.model.Athlete
- kom_rank¶
1-10 segment KOM ranking for athlete at time of upload
- pr_rank¶
1-3 personal record ranking for athlete at time of upload
- moving_time¶
- elapsed_time¶
- start_date¶
datetime.datetimewhen effort was started in GMT
- start_date_local¶
datetime.datetimewhen effort was started in activity timezone for this effort
- distance¶
The distance for this effort.
- average_watts¶
Average power during effort
- device_watts¶
True if the watts are from a power meter, false if estimated
- average_heartrate¶
Average HR during effort
- max_heartrate¶
Max HR during effort
- average_cadence¶
Average cadence during effort
- start_index¶
The activity stream index of the start of this effort
- end_index¶
The activity stream index of the end of this effort
- achievements¶
Undocumented attribute includes list of achievements for this effort.
- class stravalib.model.BestEffort(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.BaseEffortClass representing a best effort (e.g. best time for 5k)
- class stravalib.model.SegmentEffort(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.BaseEffortClass representing a best effort on a particular segment.
Base descriptor class for a Strava model attribute.
- device_watts¶
True if the watts are from a power meter, false if estimated
- class stravalib.model.Activity(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityRepresents an activity (ride, run, etc.).
- ALPINESKI = 'AlpineSki'¶
- BACKCOUNTRYSKI = 'BackcountrySki'¶
- CANOEING = 'Canoeing'¶
- CROSSCOUNTRYSKIING = 'CrossCountrySkiing'¶
- CROSSFIT = 'Crossfit'¶
- EBIKERIDE = 'EBikeRide'¶
- ELLIPTICAL = 'Elliptical'¶
- GOLF = 'Golf'¶
- HANDCLYCLE = 'Handcycle'¶
- HIKE = 'Hike'¶
- ICESKATE = 'IceSkate'¶
- INLINESKATE = 'InlineSkate'¶
- KAYAKING = 'Kayaking'¶
- KITESURF = 'Kitesurf'¶
- NORDICSKI = 'NordicSki'¶
- RIDE = 'Ride'¶
- ROCKCLIMBING = 'RockClimbing'¶
- ROLLERSKI = 'RollerSki'¶
- ROWING = 'Rowing'¶
- RUN = 'Run'¶
- SAIL = 'Sail'¶
- SKATEBOARD = 'Skateboard'¶
- SNOWBOARD = 'Snowboard'¶
- SNOWSHOE = 'Snowshoe'¶
- SOCCER = 'Soccer'¶
- STAIRSTEPPER = 'StairStepper'¶
- STANDUPPADDLING = 'StandUpPaddling'¶
- SURFING = 'Surfing'¶
- SWIM = 'Swim'¶
- VELOMOBILE = 'Velomobile'¶
- VIRTUALRIDE = 'VirtualRide'¶
- VIRTUALRUN = 'VirtualRun'¶
- WALK = 'Walk'¶
- WEIGHTTRAINING = 'WeightTraining'¶
- WHEELCHAIR = 'Wheelchair'¶
- WINDSURF = 'Windsurf'¶
- WORKOUT = 'Workout'¶
- YOGA = 'Yoga'¶
- id¶
The unique identifier of the activity
- TYPES = ('AlpineSki', 'BackcountrySki', 'Canoeing', 'CrossCountrySkiing', 'Crossfit', 'EBikeRide', 'Elliptical', 'Golf', 'Handcycle', 'Hike', 'IceSkate', 'InlineSkate', 'Kayaking', 'Kitesurf', 'NordicSki', 'Ride', 'RockClimbing', 'RollerSki', 'Rowing', 'Run', 'Sail', 'Skateboard', 'Snowboard', 'Snowshoe', 'Soccer', 'StairStepper', 'StandUpPaddling', 'Surfing', 'Swim', 'Velomobile', 'VirtualRide', 'VirtualRun', 'Walk', 'WeightTraining', 'Wheelchair', 'Windsurf', 'Workout', 'Yoga')¶
- guid¶
(undocumented)
- external_id¶
An external ID for the activity (relevant when specified during upload).
- upload_id¶
The upload ID for an activit.
- athlete¶
The associated
stravalib.model.Athletethat performed this activity.
- name¶
The name of the activity.
- distance¶
The distance for the activity.
- moving_time¶
The moving time duration for this activity.
- elapsed_time¶
The total elapsed time (including stopped time) for this activity.
- total_elevation_gain¶
Total elevation gain for activity.
- elev_high¶
Base descriptor class for a Strava model attribute.
- elev_low¶
Base descriptor class for a Strava model attribute.
- type¶
The activity type.
- start_date¶
datetime.datetimewhen activity was started in GMT
- start_date_local¶
datetime.datetimewhen activity was started in activity timezone
- timezone¶
The timezone for activity.
- utc_offset¶
The UTC offset for activity
- location_city¶
The activity location city
- location_state¶
The activity location state
- location_country¶
The activity location state
- start_latitude¶
The start latitude
- start_longitude¶
The start longitude
- achievement_count¶
How many achievements earned for the activity
- pr_count¶
How many new personal records earned for the activity
- kudos_count¶
How many kudos received for activity
- comment_count¶
How many comments for activity.
- athlete_count¶
How many other athlete’s participated in activity
- photo_count¶
Number of Instagram photos
- total_photo_count¶
Total number of photos (Instagram and Strava)
- map¶
stravavlib.model.Mapof activity.
- trainer¶
Whether activity was performed on a stationary trainer.
- commute¶
Whether activity is a commute.
- manual¶
Whether activity was manually entered.
- private¶
Whether activity is private
- flagged¶
Whether activity was flagged.
- gear_id¶
Which bike/shoes were used on activity.
- gear¶
Attribute for another entity.
- average_speed¶
Average speed for activity.
- max_speed¶
Max speed for activity
- device_watts¶
True if the watts are from a power meter, false if estimated
- has_kudoed¶
If authenticated user has kudoed this activity
- best_efforts¶
listof metricstravalib.model.BestEffortsummaries
- segment_efforts¶
listofstravalib.model.SegmentEffortefforts for activity.
- splits_metric¶
listof metricstravalib.model.Splitsummaries (running activities only)
- splits_standard¶
listof standard/imperialstravalib.model.Splitsummaries (running activities only)
- average_watts¶
(undocumented) Average power during activity
- weighted_average_watts¶
Base descriptor class for a Strava model attribute.
- max_watts¶
rides with power meter data only
- suffer_score¶
a measure of heartrate intensity, available on premium users’ activities only
- has_heartrate¶
true if recorded with heartrate
- average_heartrate¶
only if recorded with heartrate average over moving portion
- max_heartrate¶
(undocumented) Max HR during activity
- average_cadence¶
(undocumented) Average cadence during activity
- kilojoules¶
(undocumented) Kilojoules of energy used during activity
- average_temp¶
(undocumented) Average temperature (when available from device) during activity.
- device_name¶
the name of the device used to record the activity.
- embed_token¶
the token used to embed a Strava activity in the form www.strava.com/activities/[activity_id]/embed/[embed_token]. Only included if requesting athlete is activity owner.
- calories¶
Calculation of how many calories burned on activity
- description¶
Description of activity.
- workout_type¶
The activity’s workout type
- photos¶
A new photo metadata structure.
- instagram_primary_photo¶
(undocumented) Appears to be the ref to first associated instagram photo
- partner_logo_url¶
(undocumented)
- partner_brand_tag¶
(undocumented)
- from_accepted_tag¶
(undocumented)
- segment_leaderboard_opt_out¶
(undocumented)
- highlighted_kudosers¶
(undocumented)
- laps¶
listofstravalib.model.ActivityLapobjects.
- property comments¶
Iterator of
stravalib.model.ActivityCommentobjects for this activity.
- property kudos¶
listofstravalib.model.ActivityKudosobjects for this activity.
- property full_photos¶
Gets a list of photos using default options.
listofstravalib.model.ActivityPhotoobjects for this activity.
Iterator of
stravalib.model.Activtyobjects for activities matched as with this activity.
- class stravalib.model.SegmentLeaderboardEntry(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.BoundEntityRepresents a single entry on a segment leaderboard.
The
stravalib.model.SegmentLeaderboardobject is essentially a collection of instances of this class.NOTE: This changed Jan 2018 to provide far less detail than before
- athlete_name¶
The public name of the athlete.
- elapsed_time¶
The elapsed time for this effort
- moving_time¶
The moving time for this effort
- start_date¶
datetime.datetimewhen this effot was started in GMT
- start_date_local¶
datetime.datetimewhen this effort was started in activity timezone
- rank¶
The rank on the leaderboard.
- class stravalib.model.SegmentLeaderboard(bind_client=None, **kwargs)[source]¶
Bases:
collections.abc.Sequence,stravalib.model.BoundEntityThe ranked leaderboard for a segment.
This class is effectively a collection of
stravalib.model.SegmentLeaderboardEntryobjects.- entry_count¶
Base descriptor class for a Strava model attribute.
- effort_count¶
Base descriptor class for a Strava model attribute.
- kom_type¶
Base descriptor class for a Strava model attribute.
- entries¶
- class stravalib.model.DistributionBucket(**kwargs)[source]¶
Bases:
stravalib.model.BaseEntityA single distribution bucket object, used for activity zones.
- max¶
Max datatpoint
- min¶
Min datapoint
- time¶
Time in seconds (not a
datetime.timedelta)
- class stravalib.model.BaseActivityZone(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityBase class for activity zones.
A collection of
stravalib.model.DistributionBucketobjects.- distribution_buckets¶
The collection of
stravalib.model.DistributionBucketobjects
- type¶
Type of activity zone (heartrate, power, pace).
- sensor_based¶
Whether zone data is sensor-based (as opposed to calculated)
- class stravalib.model.HeartrateActivityZone(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.BaseActivityZoneActivity zone for heart rate.
- score¶
The score (suffer score) for this HR zone.
- points¶
The points for this HR zone.
- custom_zones¶
Whether athlete has setup custom zones.
- max¶
The max heartrate
- class stravalib.model.PaceActivityZone(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.BaseActivityZoneActivity zone for pace.
- score¶
The score for this zone.
- sample_race_distance¶
(Not sure?)
- sample_race_time¶
(Not sure?)
- class stravalib.model.PowerActivityZone(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.BaseActivityZoneActivity zone for power.
- bike_weight¶
Weight of bike being used (factored into power calculations)
- athlete_weight¶
Weight of athlete (factored into power calculations)
- class stravalib.model.Stream(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityStream of readings from the activity, effort or segment.
- type¶
Base descriptor class for a Strava model attribute.
- data¶
array of values
- series_type¶
type of stream: time, latlng, distance, altitude, velocity_smooth, heartrate, cadence, watts, temp, moving, grade_smooth
- original_size¶
the size of the complete stream (when not reduced with resolution)
- resolution¶
(optional, default is ‘all’) the desired number of data points. ‘low’ (100), ‘medium’ (1000), ‘high’ (10000) or ‘all’
- class stravalib.model.RunningRace(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityRepresents a RunningRace.
- name¶
Name of the race.
- id¶
The unique identifier of this race.
- running_race_type¶
Type of race
- distance¶
Distance for race in meters.
- start_date_local¶
datetime.datetimewhen race was started local
- city¶
City the race is taking place in
- state¶
State the race is taking place in
- country¶
Country the race is taking place in
- description¶
Description of the route.
- route_ids¶
Set of routes that cover this race’s course
- measurement_preference¶
(detailed-only) How race prefers to see measurements (i.e. “feet” (or what “meters”?))
- url¶
vanity race URL slug
- website_url¶
race’s website
- status¶
(undocumented attribute)
- class stravalib.model.Route(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityRepresents a Route.
- name¶
Name of the route.
- description¶
Description of the route.
- athlete¶
The associated
stravalib.model.Athletethat performed this activity.
- distance¶
The distance for the route.
- elevation_gain¶
Total elevation gain for the route.
- map¶
stravalib.model.Mapobject for route.
- type¶
Activity type of route (1 for ride, 2 for run).
- sub_type¶
Activity sub-type of route (1 for road (ride and run), 2 for mtb, 3 for cx, 4 for trail, 5 for mixed).
- private¶
Whether the route is private.
- starred¶
Whether the route is starred.
- timestamp¶
Unix timestamp when route was last updated.
- class stravalib.model.Subscription(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityRepresents a Webhook Event Subscription.
https://developers.strava.com/docs/reference/#api-models-SummaryAthlete
- OBJECT_TYPE_ACTIVITY = 'activity'¶
- ASPECT_TYPE_CREATE = 'create'¶
- VERIFY_TOKEN_DEFAULT = 'STRAVA'¶
- application_id¶
Base descriptor class for a Strava model attribute.
- object_type¶
Base descriptor class for a Strava model attribute.
- aspect_type¶
Base descriptor class for a Strava model attribute.
- callback_url¶
Base descriptor class for a Strava model attribute.
- created_at¶
- updated_at¶
- class stravalib.model.SubscriptionCallback(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityRepresents a Webhook Event Subscription Callback.
- hub_mode¶
Base descriptor class for a Strava model attribute.
- hub_verify_token¶
Base descriptor class for a Strava model attribute.
- hub_challenge¶
Base descriptor class for a Strava model attribute.
- class stravalib.model.SubscriptionUpdate(bind_client=None, **kwargs)[source]¶
Bases:
stravalib.model.LoadableEntityRepresents a Webhook Event Subscription Update.
- subscription_id¶
Base descriptor class for a Strava model attribute.
- owner_id¶
Base descriptor class for a Strava model attribute.
- object_id¶
Base descriptor class for a Strava model attribute.
- object_type¶
Base descriptor class for a Strava model attribute.
- aspect_type¶
Base descriptor class for a Strava model attribute.
- event_time¶
- updates¶
Base descriptor class for a Strava model attribute.
More here on this module