Model Functions and Classes#
This module contains entity classes for representing the various Strava datatypes, such as Activity, Gear, and more. These entities inherit fields from superclasses in strava_model.py, which is generated from the official Strava API specification. The classes in this module add behavior such as type enrichment, unit conversion, and lazy loading related entities from the API.
- stravalib.model.lazy_property(fn)[source]#
Should be used to decorate the functions that return a lazily loaded entity (collection), e.g., the members of a club.
Assumes that fn (like a regular getter property) has as single argument a reference to self, and uses one of the (bound) client methods to retrieve an entity (collection) by self.id.
- stravalib.model.check_valid_location(location: Optional[Union[List[float], str]]) Optional[List[float]][source]#
- Parameters:
location (list of float) โ Either a list of x,y floating point values or strings or None (The legacy serialized format is str)
- Returns:
Either returns a list of floating point values representing location x,y data or None if empty list is returned from the API.
- Return type:
list or None
- Raises:
AttributeError โ If empty list is returned, raises AttributeError
- pydantic model stravalib.model.DeprecatedSerializableMixin[source]#
Provides backward compatibility with legacy BaseEntity
Show JSON schema
{ "title": "DeprecatedSerializableMixin", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": {} }
- classmethod deserialize(attribute_value_mapping: Dict)[source]#
Creates and returns a new object based on serialized (dict) struct.
- class stravalib.model.BackwardCompatibilityMixin[source]#
Mixin that intercepts attribute lookup and raises warnings or modifies return values based on what is defined in the following class attributes:
_field_conversions
_deprecated_fields (TODO)
_unsupported_fields (TODO)
- pydantic model stravalib.model.LatLon[source]#
Enables backward compatibility for legacy namedtuple
Show JSON schema
{ "title": "LatLon", "description": "Enables backward compatibility for legacy namedtuple", "minItems": 2, "maxItems": 2, "type": "array", "items": { "type": "number" } }
- Fields:
__root__ (List[float])
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- property lat#
- property lon#
- pydantic model stravalib.model.Club[source]#
Show JSON schema
{ "title": "Club", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "activity_types": { "title": "Activity Types", "type": "array", "items": { "$ref": "#/definitions/ActivityType" } }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "cover_photo": { "title": "Cover Photo", "type": "string" }, "cover_photo_small": { "title": "Cover Photo Small", "type": "string" }, "featured": { "title": "Featured", "type": "boolean" }, "member_count": { "title": "Member Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "sport_type": { "title": "Sport Type", "enum": [ "cycling", "running", "triathlon", "other" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "url": { "title": "Url", "type": "string" }, "verified": { "title": "Verified", "type": "boolean" }, "admin": { "title": "Admin", "type": "boolean" }, "following_count": { "title": "Following Count", "type": "integer" }, "membership": { "title": "Membership", "enum": [ "member", "pending" ], "type": "string" }, "owner": { "title": "Owner", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "description": { "title": "Description", "type": "string" }, "club_type": { "title": "Club Type", "type": "string" } }, "definitions": { "ActivityType": { "title": "ActivityType", "enum": [ "AlpineSki", "BackcountrySki", "Canoeing", "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" ], "type": "string" } } }
- Fields:
- field activity_types: Optional[List[ActivityType]] = None#
The activity types that count for a club. This takes precedence over sport_type.
- field admin: Optional[bool] = None#
Whether the currently logged-in athlete is an administrator of this club.
- field bound_client: Optional[Any] = None#
- field city: Optional[str] = None#
The clubโs city.
- field club_type: Optional[str] = None#
- field country: Optional[str] = None#
The clubโs country.
- field cover_photo: Optional[str] = None#
URL to a ~1185x580 pixel cover photo.
- field cover_photo_small: Optional[str] = None#
URL to a ~360x176 pixel cover photo.
- field description: Optional[str] = None#
- field featured: Optional[bool] = None#
Whether the club is featured or not.
- field following_count: Optional[int] = None#
The number of athletes in the club that the logged-in athlete follows.
- field id: Optional[int] = None#
The clubโs unique identifier.
- field member_count: Optional[int] = None#
The clubโs member count.
- field membership: Optional[Literal['member', 'pending']] = None#
The membership status of the logged-in athlete.
- field name: Optional[str] = None#
The clubโs name.
- field owner: Optional[bool] = None#
Whether the currently logged-in athlete is the owner of this club.
- field private: Optional[bool] = None#
Whether the club is private.
- field profile: Optional[str] = None#
- field profile_medium: Optional[str] = None#
URL to a 60x60 pixel profile picture.
- field resource_state: Optional[int] = None#
Resource state, indicates level of detail. Possible values: 1 -> โmetaโ, 2 -> โsummaryโ, 3 -> โdetailโ
- field sport_type: Optional[Literal['cycling', 'running', 'triathlon', 'other']] = None#
Deprecated. Prefer to use activity_types.
- field state: Optional[str] = None#
The clubโs state or geographical region.
- field url: Optional[str] = None#
The clubโs vanity URL.
- field verified: Optional[bool] = None#
Whether the club is verified or not.
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- property activities#
- property members#
- pydantic model stravalib.model.Gear[source]#
Show JSON schema
{ "title": "Gear", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }
- Fields:
- field brand_name: Optional[str] = None#
The gearโs brand name.
- field description: Optional[str] = None#
The gearโs description.
- field distance: Optional[float] = None#
The distance logged with this gear.
- field frame_type: Optional[int] = None#
The gearโs frame type (bike only).
- field id: Optional[str] = None#
The gearโs unique identifier.
- field model_name: Optional[str] = None#
The gearโs model name.
- field name: Optional[str] = None#
The gearโs name.
- field primary: Optional[bool] = None#
Whether this gearโs is the ownerโs default one.
- field resource_state: Optional[int] = None#
Resource state, indicates level of detail. Possible values: 2 -> โsummaryโ, 3 -> โdetailโ
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.Bike[source]#
Show JSON schema
{ "title": "Bike", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }
- Fields:
- field brand_name: Optional[str] = None#
The gearโs brand name.
- field description: Optional[str] = None#
The gearโs description.
- field distance: Optional[float] = None#
The distance logged with this gear.
- field frame_type: Optional[int] = None#
The gearโs frame type (bike only).
- field id: Optional[str] = None#
The gearโs unique identifier.
- field model_name: Optional[str] = None#
The gearโs model name.
- field name: Optional[str] = None#
The gearโs name.
- field primary: Optional[bool] = None#
Whether this gearโs is the ownerโs default one.
- field resource_state: Optional[int] = None#
Resource state, indicates level of detail. Possible values: 2 -> โsummaryโ, 3 -> โdetailโ
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.Shoe[source]#
Show JSON schema
{ "title": "Shoe", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }
- Fields:
- field brand_name: Optional[str] = None#
The gearโs brand name.
- field description: Optional[str] = None#
The gearโs description.
- field distance: Optional[float] = None#
The distance logged with this gear.
- field frame_type: Optional[int] = None#
The gearโs frame type (bike only).
- field id: Optional[str] = None#
The gearโs unique identifier.
- field model_name: Optional[str] = None#
The gearโs model name.
- field name: Optional[str] = None#
The gearโs name.
- field primary: Optional[bool] = None#
Whether this gearโs is the ownerโs default one.
- field resource_state: Optional[int] = None#
Resource state, indicates level of detail. Possible values: 2 -> โsummaryโ, 3 -> โdetailโ
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.ActivityTotals[source]#
Show JSON schema
{ "title": "ActivityTotals", "description": "A roll-up of metrics pertaining to a set of activities. Values are in seconds and meters.", "type": "object", "properties": { "achievement_count": { "title": "Achievement Count", "type": "integer" }, "count": { "title": "Count", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elevation_gain": { "title": "Elevation Gain", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" } } }
- Fields:
- field achievement_count: Optional[int] = None#
The total number of achievements of the considered activities.
- field count: Optional[int] = None#
The number of activities considered in this total.
- field distance: Optional[float] = None#
The total distance covered by the considered activities.
- field elapsed_time: Optional[int] = None#
The total elapsed time of the considered activities.
- field elevation_gain: Optional[float] = None#
The total elevation gain of the considered activities.
- field moving_time: Optional[int] = None#
The total moving time of the considered activities.
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.AthleteStats[source]#
Rolled-up totals for rides, runs and swims, as shown in an athleteโs public profile. Non-public activities are not counted for these totals.
Show JSON schema
{ "title": "AthleteStats", "description": "Rolled-up totals for rides, runs and swims, as shown in an athlete's public\nprofile. Non-public activities are not counted for these totals.", "type": "object", "properties": { "all_ride_totals": { "$ref": "#/definitions/ActivityTotals" }, "all_run_totals": { "$ref": "#/definitions/ActivityTotals" }, "all_swim_totals": { "$ref": "#/definitions/ActivityTotals" }, "biggest_climb_elevation_gain": { "title": "Biggest Climb Elevation Gain", "type": "number" }, "biggest_ride_distance": { "title": "Biggest Ride Distance", "type": "number" }, "recent_ride_totals": { "$ref": "#/definitions/ActivityTotals" }, "recent_run_totals": { "$ref": "#/definitions/ActivityTotals" }, "recent_swim_totals": { "$ref": "#/definitions/ActivityTotals" }, "ytd_ride_totals": { "$ref": "#/definitions/ActivityTotals" }, "ytd_run_totals": { "$ref": "#/definitions/ActivityTotals" }, "ytd_swim_totals": { "$ref": "#/definitions/ActivityTotals" } }, "definitions": { "ActivityTotals": { "title": "ActivityTotals", "description": "A roll-up of metrics pertaining to a set of activities. Values are in seconds and meters.", "type": "object", "properties": { "achievement_count": { "title": "Achievement Count", "type": "integer" }, "count": { "title": "Count", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elevation_gain": { "title": "Elevation Gain", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" } } } } }
- Fields:
- field all_ride_totals: Optional[ActivityTotals] = None#
The all time ride stats for the athlete.
- field all_run_totals: Optional[ActivityTotals] = None#
The all time run stats for the athlete.
- field all_swim_totals: Optional[ActivityTotals] = None#
The all time swim stats for the athlete.
- field biggest_climb_elevation_gain: Optional[float] = None#
The highest climb ridden by the athlete.
- field biggest_ride_distance: Optional[float] = None#
The longest distance ridden by the athlete.
- field recent_ride_totals: Optional[ActivityTotals] = None#
The recent (last 4 weeks) ride stats for the athlete.
- field recent_run_totals: Optional[ActivityTotals] = None#
The recent (last 4 weeks) run stats for the athlete.
- field recent_swim_totals: Optional[ActivityTotals] = None#
The recent (last 4 weeks) swim stats for the athlete.
- field ytd_ride_totals: Optional[ActivityTotals] = None#
The year to date ride stats for the athlete.
- field ytd_run_totals: Optional[ActivityTotals] = None#
The year to date run stats for the athlete.
- field ytd_swim_totals: Optional[ActivityTotals] = None#
The year to date swim stats for the athlete.
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.Athlete[source]#
Show JSON schema
{ "title": "Athlete", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "firstname": { "title": "Firstname", "type": "string" }, "lastname": { "title": "Lastname", "type": "string" }, "premium": { "title": "Premium", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "sex": { "title": "Sex", "enum": [ "M", "F" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "summit": { "title": "Summit", "type": "boolean" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "bikes": { "title": "Bikes", "type": "array", "items": { "$ref": "#/definitions/Bike" } }, "clubs": { "title": "Clubs", "type": "array", "items": { "$ref": "#/definitions/Club" } }, "follower_count": { "title": "Follower Count", "type": "integer" }, "friend_count": { "title": "Friend Count", "type": "integer" }, "ftp": { "title": "Ftp", "type": "integer" }, "measurement_preference": { "title": "Measurement Preference", "enum": [ "feet", "meters" ], "type": "string" }, "shoes": { "title": "Shoes", "type": "array", "items": { "$ref": "#/definitions/Shoe" } }, "weight": { "title": "Weight", "type": "number" }, "is_authenticated": { "title": "Is Authenticated", "type": "boolean" }, "athlete_type": { "title": "Athlete Type", "type": "integer" }, "friend": { "title": "Friend", "type": "string" }, "follower": { "title": "Follower", "type": "string" }, "approve_followers": { "title": "Approve Followers", "type": "boolean" }, "badge_type_id": { "title": "Badge Type Id", "type": "integer" }, "mutual_friend_count": { "title": "Mutual Friend Count", "type": "integer" }, "date_preference": { "title": "Date Preference", "type": "string" }, "email": { "title": "Email", "type": "string" }, "super_user": { "title": "Super User", "type": "boolean" }, "email_language": { "title": "Email Language", "type": "string" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "username": { "title": "Username", "type": "string" }, "description": { "title": "Description", "type": "string" }, "instagram_username": { "title": "Instagram Username", "type": "string" }, "offer_in_app_payment": { "title": "Offer In App Payment", "type": "boolean" }, "global_privacy": { "title": "Global Privacy", "type": "boolean" }, "receive_newsletter": { "title": "Receive Newsletter", "type": "boolean" }, "email_kom_lost": { "title": "Email Kom Lost", "type": "boolean" }, "dateofbirth": { "title": "Dateofbirth", "type": "string", "format": "date" }, "facebook_sharing_enabled": { "title": "Facebook Sharing Enabled", "type": "boolean" }, "profile_original": { "title": "Profile Original", "type": "string" }, "premium_expiration_date": { "title": "Premium Expiration Date", "type": "integer" }, "email_send_follower_notices": { "title": "Email Send Follower Notices", "type": "boolean" }, "plan": { "title": "Plan", "type": "string" }, "agreed_to_terms": { "title": "Agreed To Terms", "type": "string" }, "follower_request_count": { "title": "Follower Request Count", "type": "integer" }, "email_facebook_twitter_friend_joins": { "title": "Email Facebook Twitter Friend Joins", "type": "boolean" }, "receive_kudos_emails": { "title": "Receive Kudos Emails", "type": "boolean" }, "receive_follower_feed_emails": { "title": "Receive Follower Feed Emails", "type": "boolean" }, "receive_comment_emails": { "title": "Receive Comment Emails", "type": "boolean" }, "sample_race_distance": { "title": "Sample Race Distance", "type": "integer" }, "sample_race_time": { "title": "Sample Race Time", "type": "integer" }, "membership": { "title": "Membership", "type": "string" }, "admin": { "title": "Admin", "type": "boolean" }, "owner": { "title": "Owner", "type": "boolean" }, "subscription_permissions": { "title": "Subscription Permissions", "type": "array", "items": {} } }, "definitions": { "Bike": { "title": "Bike", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityType": { "title": "ActivityType", "enum": [ "AlpineSki", "BackcountrySki", "Canoeing", "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" ], "type": "string" }, "Club": { "title": "Club", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "activity_types": { "title": "Activity Types", "type": "array", "items": { "$ref": "#/definitions/ActivityType" } }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "cover_photo": { "title": "Cover Photo", "type": "string" }, "cover_photo_small": { "title": "Cover Photo Small", "type": "string" }, "featured": { "title": "Featured", "type": "boolean" }, "member_count": { "title": "Member Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "sport_type": { "title": "Sport Type", "enum": [ "cycling", "running", "triathlon", "other" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "url": { "title": "Url", "type": "string" }, "verified": { "title": "Verified", "type": "boolean" }, "admin": { "title": "Admin", "type": "boolean" }, "following_count": { "title": "Following Count", "type": "integer" }, "membership": { "title": "Membership", "enum": [ "member", "pending" ], "type": "string" }, "owner": { "title": "Owner", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "description": { "title": "Description", "type": "string" }, "club_type": { "title": "Club Type", "type": "string" } } }, "Shoe": { "title": "Shoe", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } } } }
- Fields:
- Validators:
- field admin: Optional[bool] = None#
- field agreed_to_terms: Optional[str] = None#
- field approve_followers: Optional[bool] = None#
- field athlete_type: Optional[int] = None#
- Validated by:
- field badge_type_id: Optional[int] = None#
- field bound_client: Optional[Any] = None#
- field city: Optional[str] = None#
The athleteโs city.
- field country: Optional[str] = None#
The athleteโs country.
- field created_at: Optional[datetime] = None#
The time at which the athlete was created.
- field date_preference: Optional[str] = None#
- field dateofbirth: Optional[date] = None#
- field description: Optional[str] = None#
- field email: Optional[str] = None#
- field email_facebook_twitter_friend_joins: Optional[bool] = None#
- field email_kom_lost: Optional[bool] = None#
- field email_language: Optional[str] = None#
- field email_send_follower_notices: Optional[bool] = None#
- field facebook_sharing_enabled: Optional[bool] = None#
- field firstname: Optional[str] = None#
The athleteโs first name.
- field follower: Optional[str] = None#
- field follower_count: Optional[int] = None#
The athleteโs follower count.
- field follower_request_count: Optional[int] = None#
- field friend: Optional[str] = None#
- field friend_count: Optional[int] = None#
The athleteโs friend count.
- field ftp: Optional[int] = None#
The athleteโs FTP (Functional Threshold Power).
- field global_privacy: Optional[bool] = None#
- field id: Optional[int] = None#
The unique identifier of the athlete
- field instagram_username: Optional[str] = None#
- field is_authenticated: Optional[bool] = None#
- field lastname: Optional[str] = None#
The athleteโs last name.
- field max_heartrate: Optional[float] = None#
- field measurement_preference: Optional[Literal['feet', 'meters']] = None#
The athleteโs preferred unit system.
- field membership: Optional[str] = None#
- field mutual_friend_count: Optional[int] = None#
- field offer_in_app_payment: Optional[bool] = None#
- field owner: Optional[bool] = None#
- field plan: Optional[str] = None#
Deprecated. Use summit field instead. Whether the athlete has any Summit subscription.
- field profile: Optional[str] = None#
URL to a 124x124 pixel profile picture.
- field profile_medium: Optional[str] = None#
URL to a 62x62 pixel profile picture.
- field profile_original: Optional[str] = None#
- field receive_comment_emails: Optional[bool] = None#
- field receive_follower_feed_emails: Optional[bool] = None#
- field receive_kudos_emails: Optional[bool] = None#
- field receive_newsletter: Optional[bool] = None#
- field resource_state: Optional[int] = None#
Resource state, indicates level of detail. Possible values: 1 -> โmetaโ, 2 -> โsummaryโ, 3 -> โdetailโ
- field sample_race_distance: Optional[int] = None#
- field sample_race_time: Optional[int] = None#
- field sex: Optional[Literal['M', 'F']] = None#
The athleteโs sex.
- field state: Optional[str] = None#
The athleteโs state or geographical region.
- field subscription_permissions: Optional[list] = None#
- field summit: Optional[bool] = None#
Whether the athlete has any Summit subscription.
- field super_user: Optional[bool] = None#
- field updated_at: Optional[datetime] = None#
The time at which the athlete was last updated.
- field username: Optional[str] = None#
- field weight: Optional[float] = None#
The athleteโs weight.
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- is_authenticated_athlete()[source]#
- Returns:
Whether the athlete is the authenticated athlete (or not).
- Return type:
bool
- to_dict()#
Returns a dict representation of self
- validator to_str_representation ยป athlete_type[source]#
- property authenticated_athlete#
- property stats#
rtype: Associated
stravalib.model.AthleteStats
- pydantic model stravalib.model.ActivityPhotoMeta[source]#
The photos structure returned with the activity, not to be confused with the full loaded photos for an activity.
Show JSON schema
{ "title": "ActivityPhotoMeta", "description": "The photos structure returned with the activity, not to be confused with\nthe full loaded photos for an activity.", "type": "object", "properties": { "count": { "title": "Count", "type": "integer" }, "primary": { "$ref": "#/definitions/ActivityPhotoPrimary" }, "use_primary_photo": { "title": "Use Primary Photo", "type": "boolean" } }, "definitions": { "ActivityPhotoPrimary": { "title": "ActivityPhotoPrimary", "type": "object", "properties": { "id": { "title": "Id", "type": "integer" }, "source": { "title": "Source", "type": "integer" }, "unique_id": { "title": "Unique Id", "type": "string" }, "urls": { "title": "Urls", "type": "object", "additionalProperties": { "type": "string" } }, "use_primary_photo": { "title": "Use Primary Photo", "type": "boolean" } } } } }
- Fields:
- field count: Optional[int] = None#
The number of photos
- field primary: Optional[ActivityPhotoPrimary] = None#
- field use_primary_photo: Optional[bool] = None#
- pydantic model stravalib.model.ActivityPhoto[source]#
A full photo record attached to an activity. Warning: this entity is undocumented by Strava and there is no official endpoint to retrieve it
Show JSON schema
{ "title": "ActivityPhoto", "description": "A full photo record attached to an activity.\nWarning: this entity is undocumented by Strava and there is no official\nendpoint to retrieve it", "type": "object", "properties": { "athlete_id": { "title": "Athlete Id", "type": "integer" }, "activity_id": { "title": "Activity Id", "type": "integer" }, "activity_name": { "title": "Activity Name", "type": "string" }, "ref": { "title": "Ref", "type": "string" }, "uid": { "title": "Uid", "type": "string" }, "unique_id": { "title": "Unique Id", "type": "string" }, "caption": { "title": "Caption", "type": "string" }, "type": { "title": "Type", "type": "string" }, "uploaded_at": { "title": "Uploaded At", "type": "string", "format": "date-time" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "created_at_local": { "title": "Created At Local", "type": "string", "format": "date-time" }, "location": { "$ref": "#/definitions/LatLon" }, "urls": { "title": "Urls", "type": "object" }, "sizes": { "title": "Sizes", "type": "object" }, "post_id": { "title": "Post Id", "type": "integer" }, "default_photo": { "title": "Default Photo", "type": "boolean" }, "source": { "title": "Source", "type": "integer" } }, "definitions": { "LatLon": { "title": "LatLon", "description": "Enables backward compatibility for legacy namedtuple", "minItems": 2, "maxItems": 2, "type": "array", "items": { "type": "number" } } } }
- Fields:
- Validators:
naive_datetimeยปcreated_at_local
- field activity_id: Optional[int] = None#
- field activity_name: Optional[str] = None#
- field athlete_id: Optional[int] = None#
- field caption: Optional[str] = None#
- field created_at: Optional[datetime] = None#
- field created_at_local: Optional[datetime] = None#
- Validated by:
naive_datetime
- field default_photo: Optional[bool] = None#
- field post_id: Optional[int] = None#
- field ref: Optional[str] = None#
- field sizes: Optional[Dict] = None#
- field source: Optional[int] = None#
- field type: Optional[str] = None#
- field uid: Optional[str] = None#
- field unique_id: Optional[str] = None#
- field uploaded_at: Optional[datetime] = None#
- field urls: Optional[Dict] = None#
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.ActivityKudos[source]#
Activity kudos are a subset of athlete properties.
Show JSON schema
{ "title": "ActivityKudos", "description": "Activity kudos are a subset of athlete properties.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "firstname": { "title": "Firstname", "type": "string" }, "lastname": { "title": "Lastname", "type": "string" }, "premium": { "title": "Premium", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "sex": { "title": "Sex", "enum": [ "M", "F" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "summit": { "title": "Summit", "type": "boolean" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "bikes": { "title": "Bikes", "type": "array", "items": { "$ref": "#/definitions/Bike" } }, "clubs": { "title": "Clubs", "type": "array", "items": { "$ref": "#/definitions/Club" } }, "follower_count": { "title": "Follower Count", "type": "integer" }, "friend_count": { "title": "Friend Count", "type": "integer" }, "ftp": { "title": "Ftp", "type": "integer" }, "measurement_preference": { "title": "Measurement Preference", "enum": [ "feet", "meters" ], "type": "string" }, "shoes": { "title": "Shoes", "type": "array", "items": { "$ref": "#/definitions/Shoe" } }, "weight": { "title": "Weight", "type": "number" }, "is_authenticated": { "title": "Is Authenticated", "type": "boolean" }, "athlete_type": { "title": "Athlete Type", "type": "integer" }, "friend": { "title": "Friend", "type": "string" }, "follower": { "title": "Follower", "type": "string" }, "approve_followers": { "title": "Approve Followers", "type": "boolean" }, "badge_type_id": { "title": "Badge Type Id", "type": "integer" }, "mutual_friend_count": { "title": "Mutual Friend Count", "type": "integer" }, "date_preference": { "title": "Date Preference", "type": "string" }, "email": { "title": "Email", "type": "string" }, "super_user": { "title": "Super User", "type": "boolean" }, "email_language": { "title": "Email Language", "type": "string" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "username": { "title": "Username", "type": "string" }, "description": { "title": "Description", "type": "string" }, "instagram_username": { "title": "Instagram Username", "type": "string" }, "offer_in_app_payment": { "title": "Offer In App Payment", "type": "boolean" }, "global_privacy": { "title": "Global Privacy", "type": "boolean" }, "receive_newsletter": { "title": "Receive Newsletter", "type": "boolean" }, "email_kom_lost": { "title": "Email Kom Lost", "type": "boolean" }, "dateofbirth": { "title": "Dateofbirth", "type": "string", "format": "date" }, "facebook_sharing_enabled": { "title": "Facebook Sharing Enabled", "type": "boolean" }, "profile_original": { "title": "Profile Original", "type": "string" }, "premium_expiration_date": { "title": "Premium Expiration Date", "type": "integer" }, "email_send_follower_notices": { "title": "Email Send Follower Notices", "type": "boolean" }, "plan": { "title": "Plan", "type": "string" }, "agreed_to_terms": { "title": "Agreed To Terms", "type": "string" }, "follower_request_count": { "title": "Follower Request Count", "type": "integer" }, "email_facebook_twitter_friend_joins": { "title": "Email Facebook Twitter Friend Joins", "type": "boolean" }, "receive_kudos_emails": { "title": "Receive Kudos Emails", "type": "boolean" }, "receive_follower_feed_emails": { "title": "Receive Follower Feed Emails", "type": "boolean" }, "receive_comment_emails": { "title": "Receive Comment Emails", "type": "boolean" }, "sample_race_distance": { "title": "Sample Race Distance", "type": "integer" }, "sample_race_time": { "title": "Sample Race Time", "type": "integer" }, "membership": { "title": "Membership", "type": "string" }, "admin": { "title": "Admin", "type": "boolean" }, "owner": { "title": "Owner", "type": "boolean" }, "subscription_permissions": { "title": "Subscription Permissions", "type": "array", "items": {} } }, "definitions": { "Bike": { "title": "Bike", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityType": { "title": "ActivityType", "enum": [ "AlpineSki", "BackcountrySki", "Canoeing", "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" ], "type": "string" }, "Club": { "title": "Club", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "activity_types": { "title": "Activity Types", "type": "array", "items": { "$ref": "#/definitions/ActivityType" } }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "cover_photo": { "title": "Cover Photo", "type": "string" }, "cover_photo_small": { "title": "Cover Photo Small", "type": "string" }, "featured": { "title": "Featured", "type": "boolean" }, "member_count": { "title": "Member Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "sport_type": { "title": "Sport Type", "enum": [ "cycling", "running", "triathlon", "other" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "url": { "title": "Url", "type": "string" }, "verified": { "title": "Verified", "type": "boolean" }, "admin": { "title": "Admin", "type": "boolean" }, "following_count": { "title": "Following Count", "type": "integer" }, "membership": { "title": "Membership", "enum": [ "member", "pending" ], "type": "string" }, "owner": { "title": "Owner", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "description": { "title": "Description", "type": "string" }, "club_type": { "title": "Club Type", "type": "string" } } }, "Shoe": { "title": "Shoe", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } } } }
- Fields:
- Validators:
- field admin: Optional[bool] = None#
- field agreed_to_terms: Optional[str] = None#
- field approve_followers: Optional[bool] = None#
- field athlete_type: Optional[int] = None#
- Validated by:
- field badge_type_id: Optional[int] = None#
- field bound_client: Optional[Any] = None#
- field city: Optional[str] = None#
The athleteโs city.
- field country: Optional[str] = None#
The athleteโs country.
- field created_at: Optional[datetime] = None#
The time at which the athlete was created.
- field date_preference: Optional[str] = None#
- field dateofbirth: Optional[date] = None#
- field description: Optional[str] = None#
- field email: Optional[str] = None#
- field email_facebook_twitter_friend_joins: Optional[bool] = None#
- field email_kom_lost: Optional[bool] = None#
- field email_language: Optional[str] = None#
- field email_send_follower_notices: Optional[bool] = None#
- field facebook_sharing_enabled: Optional[bool] = None#
- field firstname: Optional[str] = None#
The athleteโs first name.
- field follower: Optional[str] = None#
- field follower_count: Optional[int] = None#
The athleteโs follower count.
- field follower_request_count: Optional[int] = None#
- field friend: Optional[str] = None#
- field friend_count: Optional[int] = None#
The athleteโs friend count.
- field ftp: Optional[int] = None#
The athleteโs FTP (Functional Threshold Power).
- field global_privacy: Optional[bool] = None#
- field id: Optional[int] = None#
The unique identifier of the athlete
- field instagram_username: Optional[str] = None#
- field is_authenticated: Optional[bool] = None#
- field lastname: Optional[str] = None#
The athleteโs last name.
- field max_heartrate: Optional[float] = None#
- field measurement_preference: Optional[Literal['feet', 'meters']] = None#
The athleteโs preferred unit system.
- field membership: Optional[str] = None#
- field mutual_friend_count: Optional[int] = None#
- field offer_in_app_payment: Optional[bool] = None#
- field owner: Optional[bool] = None#
- field plan: Optional[str] = None#
Deprecated. Use summit field instead. Whether the athlete has any Summit subscription.
- field profile: Optional[str] = None#
URL to a 124x124 pixel profile picture.
- field profile_medium: Optional[str] = None#
URL to a 62x62 pixel profile picture.
- field profile_original: Optional[str] = None#
- field receive_comment_emails: Optional[bool] = None#
- field receive_follower_feed_emails: Optional[bool] = None#
- field receive_kudos_emails: Optional[bool] = None#
- field receive_newsletter: Optional[bool] = None#
- field resource_state: Optional[int] = None#
Resource state, indicates level of detail. Possible values: 1 -> โmetaโ, 2 -> โsummaryโ, 3 -> โdetailโ
- field sample_race_distance: Optional[int] = None#
- field sample_race_time: Optional[int] = None#
- field sex: Optional[Literal['M', 'F']] = None#
The athleteโs sex.
- field state: Optional[str] = None#
The athleteโs state or geographical region.
- field subscription_permissions: Optional[list] = None#
- field summit: Optional[bool] = None#
Whether the athlete has any Summit subscription.
- field super_user: Optional[bool] = None#
- field updated_at: Optional[datetime] = None#
The time at which the athlete was last updated.
- field username: Optional[str] = None#
- field weight: Optional[float] = None#
The athleteโs weight.
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- is_authenticated_athlete()#
- Returns:
Whether the athlete is the authenticated athlete (or not).
- Return type:
bool
- to_dict()#
Returns a dict representation of self
- validator to_str_representation ยป athlete_type#
- property authenticated_athlete#
- property stats#
rtype: Associated
stravalib.model.AthleteStats
- pydantic model stravalib.model.ActivityLap[source]#
Show JSON schema
{ "$ref": "#/definitions/ActivityLap", "definitions": { "Bike": { "title": "Bike", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityType": { "title": "ActivityType", "enum": [ "AlpineSki", "BackcountrySki", "Canoeing", "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" ], "type": "string" }, "Club": { "title": "Club", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "activity_types": { "title": "Activity Types", "type": "array", "items": { "$ref": "#/definitions/ActivityType" } }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "cover_photo": { "title": "Cover Photo", "type": "string" }, "cover_photo_small": { "title": "Cover Photo Small", "type": "string" }, "featured": { "title": "Featured", "type": "boolean" }, "member_count": { "title": "Member Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "sport_type": { "title": "Sport Type", "enum": [ "cycling", "running", "triathlon", "other" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "url": { "title": "Url", "type": "string" }, "verified": { "title": "Verified", "type": "boolean" }, "admin": { "title": "Admin", "type": "boolean" }, "following_count": { "title": "Following Count", "type": "integer" }, "membership": { "title": "Membership", "enum": [ "member", "pending" ], "type": "string" }, "owner": { "title": "Owner", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "description": { "title": "Description", "type": "string" }, "club_type": { "title": "Club Type", "type": "string" } } }, "Shoe": { "title": "Shoe", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "Athlete": { "title": "Athlete", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "firstname": { "title": "Firstname", "type": "string" }, "lastname": { "title": "Lastname", "type": "string" }, "premium": { "title": "Premium", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "sex": { "title": "Sex", "enum": [ "M", "F" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "summit": { "title": "Summit", "type": "boolean" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "bikes": { "title": "Bikes", "type": "array", "items": { "$ref": "#/definitions/Bike" } }, "clubs": { "title": "Clubs", "type": "array", "items": { "$ref": "#/definitions/Club" } }, "follower_count": { "title": "Follower Count", "type": "integer" }, "friend_count": { "title": "Friend Count", "type": "integer" }, "ftp": { "title": "Ftp", "type": "integer" }, "measurement_preference": { "title": "Measurement Preference", "enum": [ "feet", "meters" ], "type": "string" }, "shoes": { "title": "Shoes", "type": "array", "items": { "$ref": "#/definitions/Shoe" } }, "weight": { "title": "Weight", "type": "number" }, "is_authenticated": { "title": "Is Authenticated", "type": "boolean" }, "athlete_type": { "title": "Athlete Type", "type": "integer" }, "friend": { "title": "Friend", "type": "string" }, "follower": { "title": "Follower", "type": "string" }, "approve_followers": { "title": "Approve Followers", "type": "boolean" }, "badge_type_id": { "title": "Badge Type Id", "type": "integer" }, "mutual_friend_count": { "title": "Mutual Friend Count", "type": "integer" }, "date_preference": { "title": "Date Preference", "type": "string" }, "email": { "title": "Email", "type": "string" }, "super_user": { "title": "Super User", "type": "boolean" }, "email_language": { "title": "Email Language", "type": "string" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "username": { "title": "Username", "type": "string" }, "description": { "title": "Description", "type": "string" }, "instagram_username": { "title": "Instagram Username", "type": "string" }, "offer_in_app_payment": { "title": "Offer In App Payment", "type": "boolean" }, "global_privacy": { "title": "Global Privacy", "type": "boolean" }, "receive_newsletter": { "title": "Receive Newsletter", "type": "boolean" }, "email_kom_lost": { "title": "Email Kom Lost", "type": "boolean" }, "dateofbirth": { "title": "Dateofbirth", "type": "string", "format": "date" }, "facebook_sharing_enabled": { "title": "Facebook Sharing Enabled", "type": "boolean" }, "profile_original": { "title": "Profile Original", "type": "string" }, "premium_expiration_date": { "title": "Premium Expiration Date", "type": "integer" }, "email_send_follower_notices": { "title": "Email Send Follower Notices", "type": "boolean" }, "plan": { "title": "Plan", "type": "string" }, "agreed_to_terms": { "title": "Agreed To Terms", "type": "string" }, "follower_request_count": { "title": "Follower Request Count", "type": "integer" }, "email_facebook_twitter_friend_joins": { "title": "Email Facebook Twitter Friend Joins", "type": "boolean" }, "receive_kudos_emails": { "title": "Receive Kudos Emails", "type": "boolean" }, "receive_follower_feed_emails": { "title": "Receive Follower Feed Emails", "type": "boolean" }, "receive_comment_emails": { "title": "Receive Comment Emails", "type": "boolean" }, "sample_race_distance": { "title": "Sample Race Distance", "type": "integer" }, "sample_race_time": { "title": "Sample Race Time", "type": "integer" }, "membership": { "title": "Membership", "type": "string" }, "admin": { "title": "Admin", "type": "boolean" }, "owner": { "title": "Owner", "type": "boolean" }, "subscription_permissions": { "title": "Subscription Permissions", "type": "array", "items": {} } } }, "LatLon": { "title": "LatLon", "description": "Enables backward compatibility for legacy namedtuple", "minItems": 2, "maxItems": 2, "type": "array", "items": { "type": "number" } }, "Map": { "title": "Map", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "polyline": { "title": "Polyline", "type": "string" }, "summary_polyline": { "title": "Summary Polyline", "type": "string" } } }, "SportType": { "title": "SportType", "enum": [ "AlpineSki", "BackcountrySki", "Badminton", "Canoeing", "Crossfit", "EBikeRide", "Elliptical", "EMountainBikeRide", "Golf", "GravelRide", "Handcycle", "HighIntensityIntervalTraining", "Hike", "IceSkate", "InlineSkate", "Kayaking", "Kitesurf", "MountainBikeRide", "NordicSki", "Pickleball", "Pilates", "Racquetball", "Ride", "RockClimbing", "RollerSki", "Rowing", "Run", "Sail", "Skateboard", "Snowboard", "Snowshoe", "Soccer", "Squash", "StairStepper", "StandUpPaddling", "Surfing", "Swim", "TableTennis", "Tennis", "TrailRun", "Velomobile", "VirtualRide", "VirtualRow", "VirtualRun", "Walk", "WeightTraining", "Wheelchair", "Windsurf", "Workout", "Yoga" ], "type": "string" }, "AthletePrEffort": { "title": "AthletePrEffort", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_activity_id": { "title": "Pr Activity Id", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date-time" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "is_kom": { "title": "Is Kom", "type": "boolean" } } }, "AthleteSegmentStats": { "title": "AthleteSegmentStats", "description": "A structure being returned for segment stats for current athlete.", "type": "object", "properties": { "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date" } } }, "Segment": { "title": "Segment", "description": "Represents a single Strava segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_type": { "$ref": "#/definitions/ActivityType" }, "athlete_pr_effort": { "$ref": "#/definitions/AthletePrEffort" }, "athlete_segment_stats": { "$ref": "#/definitions/AthleteSegmentStats" }, "average_grade": { "title": "Average Grade", "type": "number" }, "city": { "title": "City", "type": "string" }, "climb_category": { "title": "Climb Category", "type": "integer" }, "country": { "title": "Country", "type": "string" }, "distance": { "title": "Distance", "type": "number" }, "elevation_high": { "title": "Elevation High", "type": "number" }, "elevation_low": { "title": "Elevation Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "id": { "title": "Id", "type": "integer" }, "maximum_grade": { "title": "Maximum Grade", "type": "number" }, "name": { "title": "Name", "type": "string" }, "private": { "title": "Private", "type": "boolean" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "state": { "title": "State", "type": "string" }, "athlete_count": { "title": "Athlete Count", "type": "integer" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "hazardous": { "title": "Hazardous", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "star_count": { "title": "Star Count", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "end_latitude": { "title": "End Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "end_longitude": { "title": "End Longitude", "type": "number" }, "starred": { "title": "Starred", "type": "boolean" }, "pr_time": { "title": "Pr Time", "type": "integer" }, "starred_date": { "title": "Starred Date", "type": "string", "format": "date-time" }, "elevation_profile": { "title": "Elevation Profile", "type": "string" } } }, "BestEffort": { "title": "BestEffort", "description": "Class representing a best effort (e.g. best time for 5k)", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "end_index": { "title": "End Index", "type": "integer" }, "hidden": { "title": "Hidden", "type": "boolean" }, "kom_rank": { "title": "Kom Rank", "minimum": 1, "maximum": 10, "type": "integer" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pr_rank": { "title": "Pr Rank", "minimum": 1, "maximum": 3, "type": "integer" }, "segment": { "$ref": "#/definitions/Segment" }, "start_index": { "title": "Start Index", "type": "integer" } } }, "Gear": { "title": "Gear", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityPhotoPrimary": { "title": "ActivityPhotoPrimary", "type": "object", "properties": { "id": { "title": "Id", "type": "integer" }, "source": { "title": "Source", "type": "integer" }, "unique_id": { "title": "Unique Id", "type": "string" }, "urls": { "title": "Urls", "type": "object", "additionalProperties": { "type": "string" } }, "use_primary_photo": { "title": "Use Primary Photo", "type": "boolean" } } }, "ActivityPhotoMeta": { "title": "ActivityPhotoMeta", "description": "The photos structure returned with the activity, not to be confused with\nthe full loaded photos for an activity.", "type": "object", "properties": { "count": { "title": "Count", "type": "integer" }, "primary": { "$ref": "#/definitions/ActivityPhotoPrimary" }, "use_primary_photo": { "title": "Use Primary Photo", "type": "boolean" } } }, "SegmentEffortAchievement": { "title": "SegmentEffortAchievement", "description": "An undocumented structure being returned for segment efforts.", "type": "object", "properties": { "rank": { "title": "Rank", "type": "integer" }, "type": { "title": "Type", "type": "string" }, "type_id": { "title": "Type Id", "type": "integer" }, "effort_count": { "title": "Effort Count", "type": "integer" } } }, "SegmentEffort": { "title": "SegmentEffort", "description": "Class representing a best effort on a particular segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "end_index": { "title": "End Index", "type": "integer" }, "hidden": { "title": "Hidden", "type": "boolean" }, "kom_rank": { "title": "Kom Rank", "minimum": 1, "maximum": 10, "type": "integer" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pr_rank": { "title": "Pr Rank", "minimum": 1, "maximum": 3, "type": "integer" }, "segment": { "$ref": "#/definitions/Segment" }, "start_index": { "title": "Start Index", "type": "integer" }, "achievements": { "title": "Achievements", "type": "array", "items": { "$ref": "#/definitions/SegmentEffortAchievement" } } } }, "Split": { "title": "Split", "description": "A split -- may be metric or standard units (which has no bearing\non the units used in this object, just the binning of values).", "type": "object", "properties": { "average_speed": { "title": "Average Speed", "type": "number" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elevation_difference": { "title": "Elevation Difference", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "pace_zone": { "title": "Pace Zone", "type": "integer" }, "split": { "title": "Split", "type": "integer" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_grade_adjusted_speed": { "title": "Average Grade Adjusted Speed", "type": "number" } } }, "Activity": { "title": "Activity", "description": "Represents an activity (ride, run, etc.).", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "achievement_count": { "title": "Achievement Count", "type": "integer" }, "athlete": { "$ref": "#/definitions/Athlete" }, "athlete_count": { "title": "Athlete Count", "minimum": 1, "type": "integer" }, "average_speed": { "title": "Average Speed", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "comment_count": { "title": "Comment Count", "type": "integer" }, "commute": { "title": "Commute", "type": "boolean" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elev_high": { "title": "Elev High", "type": "number" }, "elev_low": { "title": "Elev Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "external_id": { "title": "External Id", "type": "string" }, "flagged": { "title": "Flagged", "type": "boolean" }, "gear_id": { "title": "Gear Id", "type": "string" }, "has_kudoed": { "title": "Has Kudoed", "type": "boolean" }, "hide_from_home": { "title": "Hide From Home", "type": "boolean" }, "kilojoules": { "title": "Kilojoules", "type": "number" }, "kudos_count": { "title": "Kudos Count", "type": "integer" }, "manual": { "title": "Manual", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "max_speed": { "title": "Max Speed", "type": "number" }, "max_watts": { "title": "Max Watts", "type": "integer" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "photo_count": { "title": "Photo Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "sport_type": { "$ref": "#/definitions/SportType" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "timezone": { "title": "Timezone", "type": "string" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "total_photo_count": { "title": "Total Photo Count", "type": "integer" }, "trainer": { "title": "Trainer", "type": "boolean" }, "type": { "$ref": "#/definitions/ActivityType" }, "upload_id": { "title": "Upload Id", "type": "integer" }, "upload_id_str": { "title": "Upload Id Str", "type": "string" }, "weighted_average_watts": { "title": "Weighted Average Watts", "type": "integer" }, "workout_type": { "title": "Workout Type", "type": "integer" }, "best_efforts": { "title": "Best Efforts", "type": "array", "items": { "$ref": "#/definitions/BestEffort" } }, "calories": { "title": "Calories", "type": "number" }, "description": { "title": "Description", "type": "string" }, "device_name": { "title": "Device Name", "type": "string" }, "embed_token": { "title": "Embed Token", "type": "string" }, "gear": { "$ref": "#/definitions/Gear" }, "laps": { "title": "Laps", "type": "array", "items": { "$ref": "#/definitions/ActivityLap" } }, "photos": { "$ref": "#/definitions/ActivityPhotoMeta" }, "segment_efforts": { "title": "Segment Efforts", "type": "array", "items": { "$ref": "#/definitions/SegmentEffort" } }, "splits_metric": { "title": "Splits Metric", "type": "array", "items": { "$ref": "#/definitions/Split" } }, "splits_standard": { "title": "Splits Standard", "type": "array", "items": { "$ref": "#/definitions/Split" } }, "guid": { "title": "Guid", "type": "string" }, "utc_offset": { "title": "Utc Offset", "type": "number" }, "location_city": { "title": "Location City", "type": "string" }, "location_state": { "title": "Location State", "type": "string" }, "location_country": { "title": "Location Country", "type": "string" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "pr_count": { "title": "Pr Count", "type": "integer" }, "suffer_score": { "title": "Suffer Score", "type": "integer" }, "has_heartrate": { "title": "Has Heartrate", "type": "boolean" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "max_heartrate": { "title": "Max Heartrate", "type": "integer" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_temp": { "title": "Average Temp", "type": "integer" }, "instagram_primary_photo": { "title": "Instagram Primary Photo", "type": "string" }, "partner_logo_url": { "title": "Partner Logo Url", "type": "string" }, "partner_brand_tag": { "title": "Partner Brand Tag", "type": "string" }, "from_accepted_tag": { "title": "From Accepted Tag", "type": "boolean" }, "segment_leaderboard_opt_out": { "title": "Segment Leaderboard Opt Out", "type": "boolean" }, "perceived_exertion": { "title": "Perceived Exertion", "type": "integer" } } }, "ActivityLap": { "title": "ActivityLap", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_speed": { "title": "Average Speed", "type": "number" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "end_index": { "title": "End Index", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "lap_index": { "title": "Lap Index", "type": "integer" }, "max_speed": { "title": "Max Speed", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pace_zone": { "title": "Pace Zone", "type": "integer" }, "split": { "title": "Split", "type": "integer" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "start_index": { "title": "Start Index", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" } } } } }
- Fields:
- Validators:
naive_datetimeยปstart_date_local
- field average_cadence: Optional[float] = None#
The lapโs average cadence
- field average_heartrate: Optional[float] = None#
- field average_speed: Optional[float] = None#
The lapโs average speed
- field average_watts: Optional[float] = None#
- field bound_client: Optional[Any] = None#
- field device_watts: Optional[bool] = None#
- field distance: Optional[float] = None#
The lapโs distance, in meters
- field elapsed_time: Optional[int] = None#
The lapโs elapsed time, in seconds
- field end_index: Optional[int] = None#
The end index of this effort in its activityโs stream
- field id: Optional[int] = None#
The unique identifier of this lap
- field lap_index: Optional[int] = None#
The index of this lap in the activity it belongs to
- field max_heartrate: Optional[float] = None#
- field max_speed: Optional[float] = None#
The maximum speed of this lat, in meters per second
- field moving_time: Optional[int] = None#
The lapโs moving time, in seconds
- field name: Optional[str] = None#
The name of the lap
- field pace_zone: Optional[int] = None#
The athleteโs pace zone during this lap
- field split: Optional[int] = None#
- field start_date: Optional[datetime] = None#
The time at which the lap was started.
- field start_date_local: Optional[datetime] = None#
The time at which the lap was started in the local timezone.
- Validated by:
naive_datetime
- field start_index: Optional[int] = None#
The start index of this effort in its activityโs stream
- field total_elevation_gain: Optional[float] = None#
The elevation gain of this lap, in meters
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.Split[source]#
A split โ may be metric or standard units (which has no bearing on the units used in this object, just the binning of values).
Show JSON schema
{ "title": "Split", "description": "A split -- may be metric or standard units (which has no bearing\non the units used in this object, just the binning of values).", "type": "object", "properties": { "average_speed": { "title": "Average Speed", "type": "number" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elevation_difference": { "title": "Elevation Difference", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "pace_zone": { "title": "Pace Zone", "type": "integer" }, "split": { "title": "Split", "type": "integer" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_grade_adjusted_speed": { "title": "Average Grade Adjusted Speed", "type": "number" } } }
- Fields:
- field average_grade_adjusted_speed: Optional[float] = None#
- field average_heartrate: Optional[float] = None#
- field average_speed: Optional[float] = None#
The average speed of this split, in meters per second
- field distance: Optional[float] = None#
The distance of this split, in meters
- field elapsed_time: Optional[int] = None#
The elapsed time of this split, in seconds
- field elevation_difference: Optional[float] = None#
The elevation difference of this split, in meters
- field moving_time: Optional[int] = None#
The moving time of this split, in seconds
- field pace_zone: Optional[int] = None#
The pacing zone of this split
- field split: Optional[int] = None#
N/A
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.SegmentExplorerResult[source]#
Represents 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.)
Show JSON schema
{ "title": "SegmentExplorerResult", "description": "Represents a segment result from the segment explorer feature.\n\n(These are not full segment objects, but the segment object can be fetched\nvia the 'segment' property of this object.)", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "avg_grade": { "title": "Avg Grade", "type": "number" }, "climb_category": { "title": "Climb Category", "minimum": 0, "maximum": 5, "type": "integer" }, "climb_category_desc": { "title": "Climb Category Desc", "enum": [ "NC", "4", "3", "2", "1", "HC" ], "type": "string" }, "distance": { "title": "Distance", "type": "number" }, "elev_difference": { "title": "Elev Difference", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "points": { "title": "Points", "type": "string" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "starred": { "title": "Starred", "type": "boolean" } }, "definitions": { "LatLon": { "title": "LatLon", "description": "Enables backward compatibility for legacy namedtuple", "minItems": 2, "maxItems": 2, "type": "array", "items": { "type": "number" } } } }
- Fields:
- Validators:
- field avg_grade: Optional[float] = None#
The segmentโs average grade, in percents
- field bound_client: Optional[Any] = None#
- field climb_category: Optional[conint(ge=0, le=5)] = None#
The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catรฉgorie, 0 is uncategorized in climb_category. If climb_category = 5, climb_category_desc = HC. If climb_category = 2, climb_category_desc = 3.
- Constraints:
minimum = 0
maximum = 5
- field climb_category_desc: Optional[Literal['NC', '4', '3', '2', '1', 'HC']] = None#
The description for the category of the climb
- field distance: Optional[float] = None#
The segmentโs distance, in meters
- field elev_difference: Optional[float] = None#
The segmentsโs evelation difference, in meters
- field id: Optional[int] = None#
The unique identifier of this segment
- field name: Optional[str] = None#
The name of this segment
- field points: Optional[str] = None#
The polyline of the segment
- field starred: Optional[bool] = None#
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- property segment#
Associated (full)
stravalib.model.Segmentobject.
- pydantic model stravalib.model.AthleteSegmentStats[source]#
A structure being returned for segment stats for current athlete.
Show JSON schema
{ "title": "AthleteSegmentStats", "description": "A structure being returned for segment stats for current athlete.", "type": "object", "properties": { "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date" } } }
- Fields:
- Validators:
naive_datetimeยปstart_date_local
- field activity_id: Optional[int] = None#
The unique identifier of the activity related to this effort
- field distance: Optional[float] = None#
The effortโs distance in meters
- field effort_count: Optional[int] = None#
- field elapsed_time: Optional[int] = None#
The effortโs elapsed time
- field id: Optional[int] = None#
The unique identifier of this effort
- field is_kom: Optional[bool] = None#
Whether this effort is the current best on the leaderboard
- field pr_date: Optional[date] = None#
- field pr_elapsed_time: Optional[int] = None#
- field start_date: Optional[datetime] = None#
The time at which the effort was started.
- field start_date_local: Optional[datetime] = None#
The time at which the effort was started in the local timezone.
- Validated by:
naive_datetime
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.AthletePrEffort[source]#
Show JSON schema
{ "title": "AthletePrEffort", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_activity_id": { "title": "Pr Activity Id", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date-time" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "is_kom": { "title": "Is Kom", "type": "boolean" } } }
- Fields:
- Validators:
naive_datetimeยปstart_date_local
- field distance: Optional[float] = None#
- field effort_count: Optional[int] = None#
Number of efforts by the authenticated athlete on this segment.
- field is_kom: Optional[bool] = None#
- field pr_activity_id: Optional[int] = None#
The unique identifier of the activity related to the PR effort.
- field pr_date: Optional[datetime] = None#
The time at which the PR effort was started.
- field pr_elapsed_time: Optional[int] = None#
The elapsed time ot the PR effort.
- field start_date: Optional[datetime] = None#
- field start_date_local: Optional[datetime] = None#
- Validated by:
naive_datetime
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- property elapsed_time#
- pydantic model stravalib.model.Segment[source]#
Represents a single Strava segment.
Show JSON schema
{ "title": "Segment", "description": "Represents a single Strava segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_type": { "$ref": "#/definitions/ActivityType" }, "athlete_pr_effort": { "$ref": "#/definitions/AthletePrEffort" }, "athlete_segment_stats": { "$ref": "#/definitions/AthleteSegmentStats" }, "average_grade": { "title": "Average Grade", "type": "number" }, "city": { "title": "City", "type": "string" }, "climb_category": { "title": "Climb Category", "type": "integer" }, "country": { "title": "Country", "type": "string" }, "distance": { "title": "Distance", "type": "number" }, "elevation_high": { "title": "Elevation High", "type": "number" }, "elevation_low": { "title": "Elevation Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "id": { "title": "Id", "type": "integer" }, "maximum_grade": { "title": "Maximum Grade", "type": "number" }, "name": { "title": "Name", "type": "string" }, "private": { "title": "Private", "type": "boolean" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "state": { "title": "State", "type": "string" }, "athlete_count": { "title": "Athlete Count", "type": "integer" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "hazardous": { "title": "Hazardous", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "star_count": { "title": "Star Count", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "end_latitude": { "title": "End Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "end_longitude": { "title": "End Longitude", "type": "number" }, "starred": { "title": "Starred", "type": "boolean" }, "pr_time": { "title": "Pr Time", "type": "integer" }, "starred_date": { "title": "Starred Date", "type": "string", "format": "date-time" }, "elevation_profile": { "title": "Elevation Profile", "type": "string" } }, "definitions": { "ActivityType": { "title": "ActivityType", "enum": [ "AlpineSki", "BackcountrySki", "Canoeing", "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" ], "type": "string" }, "AthletePrEffort": { "title": "AthletePrEffort", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_activity_id": { "title": "Pr Activity Id", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date-time" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "is_kom": { "title": "Is Kom", "type": "boolean" } } }, "AthleteSegmentStats": { "title": "AthleteSegmentStats", "description": "A structure being returned for segment stats for current athlete.", "type": "object", "properties": { "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date" } } }, "LatLon": { "title": "LatLon", "description": "Enables backward compatibility for legacy namedtuple", "minItems": 2, "maxItems": 2, "type": "array", "items": { "type": "number" } }, "Map": { "title": "Map", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "polyline": { "title": "Polyline", "type": "string" }, "summary_polyline": { "title": "Summary Polyline", "type": "string" } } } } }
- Fields:
- Validators:
- field activity_type: Optional[ActivityType] = None#
- field athlete_count: Optional[int] = None#
The number of unique athletes who have an effort for this segment
- field athlete_pr_effort: Optional[AthletePrEffort] = None#
- field athlete_segment_stats: Optional[AthleteSegmentStats] = None#
- field average_grade: Optional[float] = None#
The segmentโs average grade, in percents
- field bound_client: Optional[Any] = None#
- field city: Optional[str] = None#
The segmentsโs city.
- field climb_category: Optional[int] = None#
The category of the climb [0, 5]. Higher is harder ie. 5 is Hors catรฉgorie, 0 is uncategorized in climb_category.
- field country: Optional[str] = None#
The segmentโs country.
- field created_at: Optional[datetime] = None#
The time at which the segment was created.
- field distance: Optional[float] = None#
The segmentโs distance, in meters
- field effort_count: Optional[int] = None#
The total number of efforts for this segment
- field elevation_high: Optional[float] = None#
The segmentsโs highest elevation, in meters
- field elevation_low: Optional[float] = None#
The segmentsโs lowest elevation, in meters
- field elevation_profile: Optional[str] = None#
- field end_latitude: Optional[float] = None#
- field end_longitude: Optional[float] = None#
- field hazardous: Optional[bool] = None#
Whether this segment is considered hazardous
- field id: Optional[int] = None#
The unique identifier of this segment
- field map: Optional[Map] = None#
- field maximum_grade: Optional[float] = None#
The segmentsโs maximum grade, in percents
- field name: Optional[str] = None#
The name of this segment
- field pr_time: Optional[int] = None#
- field private: Optional[bool] = None#
Whether this segment is private.
- field star_count: Optional[int] = None#
The number of stars for this segment
- field starred: Optional[bool] = None#
- field starred_date: Optional[datetime] = None#
- field start_latitude: Optional[float] = None#
- field start_longitude: Optional[float] = None#
- field state: Optional[str] = None#
The segmentsโs state or geographical region.
- field total_elevation_gain: Optional[float] = None#
The segmentโs total elevation gain.
- field updated_at: Optional[datetime] = None#
The time at which the segment was last updated.
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.SegmentEffortAchievement[source]#
An undocumented structure being returned for segment efforts.
Show JSON schema
{ "title": "SegmentEffortAchievement", "description": "An undocumented structure being returned for segment efforts.", "type": "object", "properties": { "rank": { "title": "Rank", "type": "integer" }, "type": { "title": "Type", "type": "string" }, "type_id": { "title": "Type Id", "type": "integer" }, "effort_count": { "title": "Effort Count", "type": "integer" } } }
- Fields:
- field effort_count: Optional[int] = None#
- field rank: Optional[int] = None#
Rank in segment (either overall leaderboard, or pr rank)
- field type: Optional[str] = None#
The type of achievement โ e.g. โyear_prโ or โoverallโ
- field type_id: Optional[int] = None#
Numeric ID for type of achievement? (6 = year_pr, 2 = overall ??? other?)
- pydantic model stravalib.model.BaseEffort[source]#
Base class for a best effort or segment effort.
Show JSON schema
{ "title": "BaseEffort", "description": "Base class for a best effort or segment effort.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "activity": { "title": "Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "end_index": { "title": "End Index", "type": "integer" }, "hidden": { "title": "Hidden", "type": "boolean" }, "kom_rank": { "title": "Kom Rank", "minimum": 1, "maximum": 10, "type": "integer" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pr_rank": { "title": "Pr Rank", "minimum": 1, "maximum": 3, "type": "integer" }, "segment": { "$ref": "#/definitions/Segment" }, "start_index": { "title": "Start Index", "type": "integer" } }, "definitions": { "Bike": { "title": "Bike", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityType": { "title": "ActivityType", "enum": [ "AlpineSki", "BackcountrySki", "Canoeing", "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" ], "type": "string" }, "Club": { "title": "Club", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "activity_types": { "title": "Activity Types", "type": "array", "items": { "$ref": "#/definitions/ActivityType" } }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "cover_photo": { "title": "Cover Photo", "type": "string" }, "cover_photo_small": { "title": "Cover Photo Small", "type": "string" }, "featured": { "title": "Featured", "type": "boolean" }, "member_count": { "title": "Member Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "sport_type": { "title": "Sport Type", "enum": [ "cycling", "running", "triathlon", "other" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "url": { "title": "Url", "type": "string" }, "verified": { "title": "Verified", "type": "boolean" }, "admin": { "title": "Admin", "type": "boolean" }, "following_count": { "title": "Following Count", "type": "integer" }, "membership": { "title": "Membership", "enum": [ "member", "pending" ], "type": "string" }, "owner": { "title": "Owner", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "description": { "title": "Description", "type": "string" }, "club_type": { "title": "Club Type", "type": "string" } } }, "Shoe": { "title": "Shoe", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "Athlete": { "title": "Athlete", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "firstname": { "title": "Firstname", "type": "string" }, "lastname": { "title": "Lastname", "type": "string" }, "premium": { "title": "Premium", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "sex": { "title": "Sex", "enum": [ "M", "F" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "summit": { "title": "Summit", "type": "boolean" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "bikes": { "title": "Bikes", "type": "array", "items": { "$ref": "#/definitions/Bike" } }, "clubs": { "title": "Clubs", "type": "array", "items": { "$ref": "#/definitions/Club" } }, "follower_count": { "title": "Follower Count", "type": "integer" }, "friend_count": { "title": "Friend Count", "type": "integer" }, "ftp": { "title": "Ftp", "type": "integer" }, "measurement_preference": { "title": "Measurement Preference", "enum": [ "feet", "meters" ], "type": "string" }, "shoes": { "title": "Shoes", "type": "array", "items": { "$ref": "#/definitions/Shoe" } }, "weight": { "title": "Weight", "type": "number" }, "is_authenticated": { "title": "Is Authenticated", "type": "boolean" }, "athlete_type": { "title": "Athlete Type", "type": "integer" }, "friend": { "title": "Friend", "type": "string" }, "follower": { "title": "Follower", "type": "string" }, "approve_followers": { "title": "Approve Followers", "type": "boolean" }, "badge_type_id": { "title": "Badge Type Id", "type": "integer" }, "mutual_friend_count": { "title": "Mutual Friend Count", "type": "integer" }, "date_preference": { "title": "Date Preference", "type": "string" }, "email": { "title": "Email", "type": "string" }, "super_user": { "title": "Super User", "type": "boolean" }, "email_language": { "title": "Email Language", "type": "string" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "username": { "title": "Username", "type": "string" }, "description": { "title": "Description", "type": "string" }, "instagram_username": { "title": "Instagram Username", "type": "string" }, "offer_in_app_payment": { "title": "Offer In App Payment", "type": "boolean" }, "global_privacy": { "title": "Global Privacy", "type": "boolean" }, "receive_newsletter": { "title": "Receive Newsletter", "type": "boolean" }, "email_kom_lost": { "title": "Email Kom Lost", "type": "boolean" }, "dateofbirth": { "title": "Dateofbirth", "type": "string", "format": "date" }, "facebook_sharing_enabled": { "title": "Facebook Sharing Enabled", "type": "boolean" }, "profile_original": { "title": "Profile Original", "type": "string" }, "premium_expiration_date": { "title": "Premium Expiration Date", "type": "integer" }, "email_send_follower_notices": { "title": "Email Send Follower Notices", "type": "boolean" }, "plan": { "title": "Plan", "type": "string" }, "agreed_to_terms": { "title": "Agreed To Terms", "type": "string" }, "follower_request_count": { "title": "Follower Request Count", "type": "integer" }, "email_facebook_twitter_friend_joins": { "title": "Email Facebook Twitter Friend Joins", "type": "boolean" }, "receive_kudos_emails": { "title": "Receive Kudos Emails", "type": "boolean" }, "receive_follower_feed_emails": { "title": "Receive Follower Feed Emails", "type": "boolean" }, "receive_comment_emails": { "title": "Receive Comment Emails", "type": "boolean" }, "sample_race_distance": { "title": "Sample Race Distance", "type": "integer" }, "sample_race_time": { "title": "Sample Race Time", "type": "integer" }, "membership": { "title": "Membership", "type": "string" }, "admin": { "title": "Admin", "type": "boolean" }, "owner": { "title": "Owner", "type": "boolean" }, "subscription_permissions": { "title": "Subscription Permissions", "type": "array", "items": {} } } }, "AthletePrEffort": { "title": "AthletePrEffort", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_activity_id": { "title": "Pr Activity Id", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date-time" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "is_kom": { "title": "Is Kom", "type": "boolean" } } }, "AthleteSegmentStats": { "title": "AthleteSegmentStats", "description": "A structure being returned for segment stats for current athlete.", "type": "object", "properties": { "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date" } } }, "LatLon": { "title": "LatLon", "description": "Enables backward compatibility for legacy namedtuple", "minItems": 2, "maxItems": 2, "type": "array", "items": { "type": "number" } }, "Map": { "title": "Map", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "polyline": { "title": "Polyline", "type": "string" }, "summary_polyline": { "title": "Summary Polyline", "type": "string" } } }, "Segment": { "title": "Segment", "description": "Represents a single Strava segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_type": { "$ref": "#/definitions/ActivityType" }, "athlete_pr_effort": { "$ref": "#/definitions/AthletePrEffort" }, "athlete_segment_stats": { "$ref": "#/definitions/AthleteSegmentStats" }, "average_grade": { "title": "Average Grade", "type": "number" }, "city": { "title": "City", "type": "string" }, "climb_category": { "title": "Climb Category", "type": "integer" }, "country": { "title": "Country", "type": "string" }, "distance": { "title": "Distance", "type": "number" }, "elevation_high": { "title": "Elevation High", "type": "number" }, "elevation_low": { "title": "Elevation Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "id": { "title": "Id", "type": "integer" }, "maximum_grade": { "title": "Maximum Grade", "type": "number" }, "name": { "title": "Name", "type": "string" }, "private": { "title": "Private", "type": "boolean" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "state": { "title": "State", "type": "string" }, "athlete_count": { "title": "Athlete Count", "type": "integer" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "hazardous": { "title": "Hazardous", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "star_count": { "title": "Star Count", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "end_latitude": { "title": "End Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "end_longitude": { "title": "End Longitude", "type": "number" }, "starred": { "title": "Starred", "type": "boolean" }, "pr_time": { "title": "Pr Time", "type": "integer" }, "starred_date": { "title": "Starred Date", "type": "string", "format": "date-time" }, "elevation_profile": { "title": "Elevation Profile", "type": "string" } } } } }
- Fields:
- Validators:
naive_datetimeยปstart_date_local
- field activity_id: Optional[int] = None#
The unique identifier of the activity related to this effort
- field average_cadence: Optional[float] = None#
The effortโs average cadence
- field average_heartrate: Optional[float] = None#
The heart heart rate of the athlete during this effort
- field average_watts: Optional[float] = None#
The average wattage of this effort
- field bound_client: Optional[Any] = None#
- field device_watts: Optional[bool] = None#
For riding efforts, whether the wattage was reported by a dedicated recording device
- field distance: Optional[float] = None#
The effortโs distance in meters
- field elapsed_time: Optional[int] = None#
The effortโs elapsed time
- field end_index: Optional[int] = None#
The end index of this effort in its activityโs stream
Whether this effort should be hidden when viewed within an activity
- field id: Optional[int] = None#
The unique identifier of this effort
- field is_kom: Optional[bool] = None#
Whether this effort is the current best on the leaderboard
- field kom_rank: Optional[conint(ge=1, le=10)] = None#
The rank of the effort on the global leaderboard if it belongs in the top 10 at the time of upload
- Constraints:
minimum = 1
maximum = 10
- field max_heartrate: Optional[float] = None#
The maximum heart rate of the athlete during this effort
- field moving_time: Optional[int] = None#
The effortโs moving time
- field name: Optional[str] = None#
The name of the segment on which this effort was performed
- field pr_rank: Optional[conint(ge=1, le=3)] = None#
The rank of the effort on the athleteโs leaderboard if it belongs in the top 3 at the time of upload
- Constraints:
minimum = 1
maximum = 3
- field start_date: Optional[datetime] = None#
The time at which the effort was started.
- field start_date_local: Optional[datetime] = None#
The time at which the effort was started in the local timezone.
- Validated by:
naive_datetime
- field start_index: Optional[int] = None#
The start index of this effort in its activityโs stream
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.BestEffort[source]#
Class representing a best effort (e.g. best time for 5k)
Show JSON schema
{ "$ref": "#/definitions/BestEffort", "definitions": { "Bike": { "title": "Bike", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityType": { "title": "ActivityType", "enum": [ "AlpineSki", "BackcountrySki", "Canoeing", "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" ], "type": "string" }, "Club": { "title": "Club", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "activity_types": { "title": "Activity Types", "type": "array", "items": { "$ref": "#/definitions/ActivityType" } }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "cover_photo": { "title": "Cover Photo", "type": "string" }, "cover_photo_small": { "title": "Cover Photo Small", "type": "string" }, "featured": { "title": "Featured", "type": "boolean" }, "member_count": { "title": "Member Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "sport_type": { "title": "Sport Type", "enum": [ "cycling", "running", "triathlon", "other" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "url": { "title": "Url", "type": "string" }, "verified": { "title": "Verified", "type": "boolean" }, "admin": { "title": "Admin", "type": "boolean" }, "following_count": { "title": "Following Count", "type": "integer" }, "membership": { "title": "Membership", "enum": [ "member", "pending" ], "type": "string" }, "owner": { "title": "Owner", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "description": { "title": "Description", "type": "string" }, "club_type": { "title": "Club Type", "type": "string" } } }, "Shoe": { "title": "Shoe", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "Athlete": { "title": "Athlete", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "firstname": { "title": "Firstname", "type": "string" }, "lastname": { "title": "Lastname", "type": "string" }, "premium": { "title": "Premium", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "sex": { "title": "Sex", "enum": [ "M", "F" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "summit": { "title": "Summit", "type": "boolean" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "bikes": { "title": "Bikes", "type": "array", "items": { "$ref": "#/definitions/Bike" } }, "clubs": { "title": "Clubs", "type": "array", "items": { "$ref": "#/definitions/Club" } }, "follower_count": { "title": "Follower Count", "type": "integer" }, "friend_count": { "title": "Friend Count", "type": "integer" }, "ftp": { "title": "Ftp", "type": "integer" }, "measurement_preference": { "title": "Measurement Preference", "enum": [ "feet", "meters" ], "type": "string" }, "shoes": { "title": "Shoes", "type": "array", "items": { "$ref": "#/definitions/Shoe" } }, "weight": { "title": "Weight", "type": "number" }, "is_authenticated": { "title": "Is Authenticated", "type": "boolean" }, "athlete_type": { "title": "Athlete Type", "type": "integer" }, "friend": { "title": "Friend", "type": "string" }, "follower": { "title": "Follower", "type": "string" }, "approve_followers": { "title": "Approve Followers", "type": "boolean" }, "badge_type_id": { "title": "Badge Type Id", "type": "integer" }, "mutual_friend_count": { "title": "Mutual Friend Count", "type": "integer" }, "date_preference": { "title": "Date Preference", "type": "string" }, "email": { "title": "Email", "type": "string" }, "super_user": { "title": "Super User", "type": "boolean" }, "email_language": { "title": "Email Language", "type": "string" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "username": { "title": "Username", "type": "string" }, "description": { "title": "Description", "type": "string" }, "instagram_username": { "title": "Instagram Username", "type": "string" }, "offer_in_app_payment": { "title": "Offer In App Payment", "type": "boolean" }, "global_privacy": { "title": "Global Privacy", "type": "boolean" }, "receive_newsletter": { "title": "Receive Newsletter", "type": "boolean" }, "email_kom_lost": { "title": "Email Kom Lost", "type": "boolean" }, "dateofbirth": { "title": "Dateofbirth", "type": "string", "format": "date" }, "facebook_sharing_enabled": { "title": "Facebook Sharing Enabled", "type": "boolean" }, "profile_original": { "title": "Profile Original", "type": "string" }, "premium_expiration_date": { "title": "Premium Expiration Date", "type": "integer" }, "email_send_follower_notices": { "title": "Email Send Follower Notices", "type": "boolean" }, "plan": { "title": "Plan", "type": "string" }, "agreed_to_terms": { "title": "Agreed To Terms", "type": "string" }, "follower_request_count": { "title": "Follower Request Count", "type": "integer" }, "email_facebook_twitter_friend_joins": { "title": "Email Facebook Twitter Friend Joins", "type": "boolean" }, "receive_kudos_emails": { "title": "Receive Kudos Emails", "type": "boolean" }, "receive_follower_feed_emails": { "title": "Receive Follower Feed Emails", "type": "boolean" }, "receive_comment_emails": { "title": "Receive Comment Emails", "type": "boolean" }, "sample_race_distance": { "title": "Sample Race Distance", "type": "integer" }, "sample_race_time": { "title": "Sample Race Time", "type": "integer" }, "membership": { "title": "Membership", "type": "string" }, "admin": { "title": "Admin", "type": "boolean" }, "owner": { "title": "Owner", "type": "boolean" }, "subscription_permissions": { "title": "Subscription Permissions", "type": "array", "items": {} } } }, "LatLon": { "title": "LatLon", "description": "Enables backward compatibility for legacy namedtuple", "minItems": 2, "maxItems": 2, "type": "array", "items": { "type": "number" } }, "Map": { "title": "Map", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "polyline": { "title": "Polyline", "type": "string" }, "summary_polyline": { "title": "Summary Polyline", "type": "string" } } }, "SportType": { "title": "SportType", "enum": [ "AlpineSki", "BackcountrySki", "Badminton", "Canoeing", "Crossfit", "EBikeRide", "Elliptical", "EMountainBikeRide", "Golf", "GravelRide", "Handcycle", "HighIntensityIntervalTraining", "Hike", "IceSkate", "InlineSkate", "Kayaking", "Kitesurf", "MountainBikeRide", "NordicSki", "Pickleball", "Pilates", "Racquetball", "Ride", "RockClimbing", "RollerSki", "Rowing", "Run", "Sail", "Skateboard", "Snowboard", "Snowshoe", "Soccer", "Squash", "StairStepper", "StandUpPaddling", "Surfing", "Swim", "TableTennis", "Tennis", "TrailRun", "Velomobile", "VirtualRide", "VirtualRow", "VirtualRun", "Walk", "WeightTraining", "Wheelchair", "Windsurf", "Workout", "Yoga" ], "type": "string" }, "Gear": { "title": "Gear", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityLap": { "title": "ActivityLap", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_speed": { "title": "Average Speed", "type": "number" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "end_index": { "title": "End Index", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "lap_index": { "title": "Lap Index", "type": "integer" }, "max_speed": { "title": "Max Speed", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pace_zone": { "title": "Pace Zone", "type": "integer" }, "split": { "title": "Split", "type": "integer" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "start_index": { "title": "Start Index", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" } } }, "ActivityPhotoPrimary": { "title": "ActivityPhotoPrimary", "type": "object", "properties": { "id": { "title": "Id", "type": "integer" }, "source": { "title": "Source", "type": "integer" }, "unique_id": { "title": "Unique Id", "type": "string" }, "urls": { "title": "Urls", "type": "object", "additionalProperties": { "type": "string" } }, "use_primary_photo": { "title": "Use Primary Photo", "type": "boolean" } } }, "ActivityPhotoMeta": { "title": "ActivityPhotoMeta", "description": "The photos structure returned with the activity, not to be confused with\nthe full loaded photos for an activity.", "type": "object", "properties": { "count": { "title": "Count", "type": "integer" }, "primary": { "$ref": "#/definitions/ActivityPhotoPrimary" }, "use_primary_photo": { "title": "Use Primary Photo", "type": "boolean" } } }, "AthletePrEffort": { "title": "AthletePrEffort", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_activity_id": { "title": "Pr Activity Id", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date-time" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "is_kom": { "title": "Is Kom", "type": "boolean" } } }, "AthleteSegmentStats": { "title": "AthleteSegmentStats", "description": "A structure being returned for segment stats for current athlete.", "type": "object", "properties": { "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date" } } }, "Segment": { "title": "Segment", "description": "Represents a single Strava segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_type": { "$ref": "#/definitions/ActivityType" }, "athlete_pr_effort": { "$ref": "#/definitions/AthletePrEffort" }, "athlete_segment_stats": { "$ref": "#/definitions/AthleteSegmentStats" }, "average_grade": { "title": "Average Grade", "type": "number" }, "city": { "title": "City", "type": "string" }, "climb_category": { "title": "Climb Category", "type": "integer" }, "country": { "title": "Country", "type": "string" }, "distance": { "title": "Distance", "type": "number" }, "elevation_high": { "title": "Elevation High", "type": "number" }, "elevation_low": { "title": "Elevation Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "id": { "title": "Id", "type": "integer" }, "maximum_grade": { "title": "Maximum Grade", "type": "number" }, "name": { "title": "Name", "type": "string" }, "private": { "title": "Private", "type": "boolean" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "state": { "title": "State", "type": "string" }, "athlete_count": { "title": "Athlete Count", "type": "integer" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "hazardous": { "title": "Hazardous", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "star_count": { "title": "Star Count", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "end_latitude": { "title": "End Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "end_longitude": { "title": "End Longitude", "type": "number" }, "starred": { "title": "Starred", "type": "boolean" }, "pr_time": { "title": "Pr Time", "type": "integer" }, "starred_date": { "title": "Starred Date", "type": "string", "format": "date-time" }, "elevation_profile": { "title": "Elevation Profile", "type": "string" } } }, "SegmentEffortAchievement": { "title": "SegmentEffortAchievement", "description": "An undocumented structure being returned for segment efforts.", "type": "object", "properties": { "rank": { "title": "Rank", "type": "integer" }, "type": { "title": "Type", "type": "string" }, "type_id": { "title": "Type Id", "type": "integer" }, "effort_count": { "title": "Effort Count", "type": "integer" } } }, "SegmentEffort": { "title": "SegmentEffort", "description": "Class representing a best effort on a particular segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "end_index": { "title": "End Index", "type": "integer" }, "hidden": { "title": "Hidden", "type": "boolean" }, "kom_rank": { "title": "Kom Rank", "minimum": 1, "maximum": 10, "type": "integer" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pr_rank": { "title": "Pr Rank", "minimum": 1, "maximum": 3, "type": "integer" }, "segment": { "$ref": "#/definitions/Segment" }, "start_index": { "title": "Start Index", "type": "integer" }, "achievements": { "title": "Achievements", "type": "array", "items": { "$ref": "#/definitions/SegmentEffortAchievement" } } } }, "Split": { "title": "Split", "description": "A split -- may be metric or standard units (which has no bearing\non the units used in this object, just the binning of values).", "type": "object", "properties": { "average_speed": { "title": "Average Speed", "type": "number" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elevation_difference": { "title": "Elevation Difference", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "pace_zone": { "title": "Pace Zone", "type": "integer" }, "split": { "title": "Split", "type": "integer" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_grade_adjusted_speed": { "title": "Average Grade Adjusted Speed", "type": "number" } } }, "Activity": { "title": "Activity", "description": "Represents an activity (ride, run, etc.).", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "achievement_count": { "title": "Achievement Count", "type": "integer" }, "athlete": { "$ref": "#/definitions/Athlete" }, "athlete_count": { "title": "Athlete Count", "minimum": 1, "type": "integer" }, "average_speed": { "title": "Average Speed", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "comment_count": { "title": "Comment Count", "type": "integer" }, "commute": { "title": "Commute", "type": "boolean" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elev_high": { "title": "Elev High", "type": "number" }, "elev_low": { "title": "Elev Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "external_id": { "title": "External Id", "type": "string" }, "flagged": { "title": "Flagged", "type": "boolean" }, "gear_id": { "title": "Gear Id", "type": "string" }, "has_kudoed": { "title": "Has Kudoed", "type": "boolean" }, "hide_from_home": { "title": "Hide From Home", "type": "boolean" }, "kilojoules": { "title": "Kilojoules", "type": "number" }, "kudos_count": { "title": "Kudos Count", "type": "integer" }, "manual": { "title": "Manual", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "max_speed": { "title": "Max Speed", "type": "number" }, "max_watts": { "title": "Max Watts", "type": "integer" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "photo_count": { "title": "Photo Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "sport_type": { "$ref": "#/definitions/SportType" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "timezone": { "title": "Timezone", "type": "string" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "total_photo_count": { "title": "Total Photo Count", "type": "integer" }, "trainer": { "title": "Trainer", "type": "boolean" }, "type": { "$ref": "#/definitions/ActivityType" }, "upload_id": { "title": "Upload Id", "type": "integer" }, "upload_id_str": { "title": "Upload Id Str", "type": "string" }, "weighted_average_watts": { "title": "Weighted Average Watts", "type": "integer" }, "workout_type": { "title": "Workout Type", "type": "integer" }, "best_efforts": { "title": "Best Efforts", "type": "array", "items": { "$ref": "#/definitions/BestEffort" } }, "calories": { "title": "Calories", "type": "number" }, "description": { "title": "Description", "type": "string" }, "device_name": { "title": "Device Name", "type": "string" }, "embed_token": { "title": "Embed Token", "type": "string" }, "gear": { "$ref": "#/definitions/Gear" }, "laps": { "title": "Laps", "type": "array", "items": { "$ref": "#/definitions/ActivityLap" } }, "photos": { "$ref": "#/definitions/ActivityPhotoMeta" }, "segment_efforts": { "title": "Segment Efforts", "type": "array", "items": { "$ref": "#/definitions/SegmentEffort" } }, "splits_metric": { "title": "Splits Metric", "type": "array", "items": { "$ref": "#/definitions/Split" } }, "splits_standard": { "title": "Splits Standard", "type": "array", "items": { "$ref": "#/definitions/Split" } }, "guid": { "title": "Guid", "type": "string" }, "utc_offset": { "title": "Utc Offset", "type": "number" }, "location_city": { "title": "Location City", "type": "string" }, "location_state": { "title": "Location State", "type": "string" }, "location_country": { "title": "Location Country", "type": "string" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "pr_count": { "title": "Pr Count", "type": "integer" }, "suffer_score": { "title": "Suffer Score", "type": "integer" }, "has_heartrate": { "title": "Has Heartrate", "type": "boolean" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "max_heartrate": { "title": "Max Heartrate", "type": "integer" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_temp": { "title": "Average Temp", "type": "integer" }, "instagram_primary_photo": { "title": "Instagram Primary Photo", "type": "string" }, "partner_logo_url": { "title": "Partner Logo Url", "type": "string" }, "partner_brand_tag": { "title": "Partner Brand Tag", "type": "string" }, "from_accepted_tag": { "title": "From Accepted Tag", "type": "boolean" }, "segment_leaderboard_opt_out": { "title": "Segment Leaderboard Opt Out", "type": "boolean" }, "perceived_exertion": { "title": "Perceived Exertion", "type": "integer" } } }, "BestEffort": { "title": "BestEffort", "description": "Class representing a best effort (e.g. best time for 5k)", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "end_index": { "title": "End Index", "type": "integer" }, "hidden": { "title": "Hidden", "type": "boolean" }, "kom_rank": { "title": "Kom Rank", "minimum": 1, "maximum": 10, "type": "integer" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pr_rank": { "title": "Pr Rank", "minimum": 1, "maximum": 3, "type": "integer" }, "segment": { "$ref": "#/definitions/Segment" }, "start_index": { "title": "Start Index", "type": "integer" } } } } }
- Fields:
- Validators:
naive_datetimeยปstart_date_local
- field activity_id: Optional[int] = None#
The unique identifier of the activity related to this effort
- field average_cadence: Optional[float] = None#
The effortโs average cadence
- field average_heartrate: Optional[float] = None#
The heart heart rate of the athlete during this effort
- field average_watts: Optional[float] = None#
The average wattage of this effort
- field bound_client: Optional[Any] = None#
- field device_watts: Optional[bool] = None#
For riding efforts, whether the wattage was reported by a dedicated recording device
- field distance: Optional[float] = None#
The effortโs distance in meters
- field elapsed_time: Optional[int] = None#
The effortโs elapsed time
- field end_index: Optional[int] = None#
The end index of this effort in its activityโs stream
Whether this effort should be hidden when viewed within an activity
- field id: Optional[int] = None#
The unique identifier of this effort
- field is_kom: Optional[bool] = None#
Whether this effort is the current best on the leaderboard
- field kom_rank: Optional[conint(ge=1, le=10)] = None#
The rank of the effort on the global leaderboard if it belongs in the top 10 at the time of upload
- Constraints:
minimum = 1
maximum = 10
- field max_heartrate: Optional[float] = None#
The maximum heart rate of the athlete during this effort
- field moving_time: Optional[int] = None#
The effortโs moving time
- field name: Optional[str] = None#
The name of the segment on which this effort was performed
- field pr_rank: Optional[conint(ge=1, le=3)] = None#
The rank of the effort on the athleteโs leaderboard if it belongs in the top 3 at the time of upload
- Constraints:
minimum = 1
maximum = 3
- field start_date: Optional[datetime] = None#
The time at which the effort was started.
- field start_date_local: Optional[datetime] = None#
The time at which the effort was started in the local timezone.
- Validated by:
naive_datetime
- field start_index: Optional[int] = None#
The start index of this effort in its activityโs stream
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.SegmentEffort[source]#
Class representing a best effort on a particular segment.
Show JSON schema
{ "$ref": "#/definitions/SegmentEffort", "definitions": { "Bike": { "title": "Bike", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityType": { "title": "ActivityType", "enum": [ "AlpineSki", "BackcountrySki", "Canoeing", "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" ], "type": "string" }, "Club": { "title": "Club", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "activity_types": { "title": "Activity Types", "type": "array", "items": { "$ref": "#/definitions/ActivityType" } }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "cover_photo": { "title": "Cover Photo", "type": "string" }, "cover_photo_small": { "title": "Cover Photo Small", "type": "string" }, "featured": { "title": "Featured", "type": "boolean" }, "member_count": { "title": "Member Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "sport_type": { "title": "Sport Type", "enum": [ "cycling", "running", "triathlon", "other" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "url": { "title": "Url", "type": "string" }, "verified": { "title": "Verified", "type": "boolean" }, "admin": { "title": "Admin", "type": "boolean" }, "following_count": { "title": "Following Count", "type": "integer" }, "membership": { "title": "Membership", "enum": [ "member", "pending" ], "type": "string" }, "owner": { "title": "Owner", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "description": { "title": "Description", "type": "string" }, "club_type": { "title": "Club Type", "type": "string" } } }, "Shoe": { "title": "Shoe", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "Athlete": { "title": "Athlete", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "firstname": { "title": "Firstname", "type": "string" }, "lastname": { "title": "Lastname", "type": "string" }, "premium": { "title": "Premium", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "sex": { "title": "Sex", "enum": [ "M", "F" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "summit": { "title": "Summit", "type": "boolean" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "bikes": { "title": "Bikes", "type": "array", "items": { "$ref": "#/definitions/Bike" } }, "clubs": { "title": "Clubs", "type": "array", "items": { "$ref": "#/definitions/Club" } }, "follower_count": { "title": "Follower Count", "type": "integer" }, "friend_count": { "title": "Friend Count", "type": "integer" }, "ftp": { "title": "Ftp", "type": "integer" }, "measurement_preference": { "title": "Measurement Preference", "enum": [ "feet", "meters" ], "type": "string" }, "shoes": { "title": "Shoes", "type": "array", "items": { "$ref": "#/definitions/Shoe" } }, "weight": { "title": "Weight", "type": "number" }, "is_authenticated": { "title": "Is Authenticated", "type": "boolean" }, "athlete_type": { "title": "Athlete Type", "type": "integer" }, "friend": { "title": "Friend", "type": "string" }, "follower": { "title": "Follower", "type": "string" }, "approve_followers": { "title": "Approve Followers", "type": "boolean" }, "badge_type_id": { "title": "Badge Type Id", "type": "integer" }, "mutual_friend_count": { "title": "Mutual Friend Count", "type": "integer" }, "date_preference": { "title": "Date Preference", "type": "string" }, "email": { "title": "Email", "type": "string" }, "super_user": { "title": "Super User", "type": "boolean" }, "email_language": { "title": "Email Language", "type": "string" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "username": { "title": "Username", "type": "string" }, "description": { "title": "Description", "type": "string" }, "instagram_username": { "title": "Instagram Username", "type": "string" }, "offer_in_app_payment": { "title": "Offer In App Payment", "type": "boolean" }, "global_privacy": { "title": "Global Privacy", "type": "boolean" }, "receive_newsletter": { "title": "Receive Newsletter", "type": "boolean" }, "email_kom_lost": { "title": "Email Kom Lost", "type": "boolean" }, "dateofbirth": { "title": "Dateofbirth", "type": "string", "format": "date" }, "facebook_sharing_enabled": { "title": "Facebook Sharing Enabled", "type": "boolean" }, "profile_original": { "title": "Profile Original", "type": "string" }, "premium_expiration_date": { "title": "Premium Expiration Date", "type": "integer" }, "email_send_follower_notices": { "title": "Email Send Follower Notices", "type": "boolean" }, "plan": { "title": "Plan", "type": "string" }, "agreed_to_terms": { "title": "Agreed To Terms", "type": "string" }, "follower_request_count": { "title": "Follower Request Count", "type": "integer" }, "email_facebook_twitter_friend_joins": { "title": "Email Facebook Twitter Friend Joins", "type": "boolean" }, "receive_kudos_emails": { "title": "Receive Kudos Emails", "type": "boolean" }, "receive_follower_feed_emails": { "title": "Receive Follower Feed Emails", "type": "boolean" }, "receive_comment_emails": { "title": "Receive Comment Emails", "type": "boolean" }, "sample_race_distance": { "title": "Sample Race Distance", "type": "integer" }, "sample_race_time": { "title": "Sample Race Time", "type": "integer" }, "membership": { "title": "Membership", "type": "string" }, "admin": { "title": "Admin", "type": "boolean" }, "owner": { "title": "Owner", "type": "boolean" }, "subscription_permissions": { "title": "Subscription Permissions", "type": "array", "items": {} } } }, "LatLon": { "title": "LatLon", "description": "Enables backward compatibility for legacy namedtuple", "minItems": 2, "maxItems": 2, "type": "array", "items": { "type": "number" } }, "Map": { "title": "Map", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "polyline": { "title": "Polyline", "type": "string" }, "summary_polyline": { "title": "Summary Polyline", "type": "string" } } }, "SportType": { "title": "SportType", "enum": [ "AlpineSki", "BackcountrySki", "Badminton", "Canoeing", "Crossfit", "EBikeRide", "Elliptical", "EMountainBikeRide", "Golf", "GravelRide", "Handcycle", "HighIntensityIntervalTraining", "Hike", "IceSkate", "InlineSkate", "Kayaking", "Kitesurf", "MountainBikeRide", "NordicSki", "Pickleball", "Pilates", "Racquetball", "Ride", "RockClimbing", "RollerSki", "Rowing", "Run", "Sail", "Skateboard", "Snowboard", "Snowshoe", "Soccer", "Squash", "StairStepper", "StandUpPaddling", "Surfing", "Swim", "TableTennis", "Tennis", "TrailRun", "Velomobile", "VirtualRide", "VirtualRow", "VirtualRun", "Walk", "WeightTraining", "Wheelchair", "Windsurf", "Workout", "Yoga" ], "type": "string" }, "AthletePrEffort": { "title": "AthletePrEffort", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_activity_id": { "title": "Pr Activity Id", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date-time" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "is_kom": { "title": "Is Kom", "type": "boolean" } } }, "AthleteSegmentStats": { "title": "AthleteSegmentStats", "description": "A structure being returned for segment stats for current athlete.", "type": "object", "properties": { "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date" } } }, "Segment": { "title": "Segment", "description": "Represents a single Strava segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_type": { "$ref": "#/definitions/ActivityType" }, "athlete_pr_effort": { "$ref": "#/definitions/AthletePrEffort" }, "athlete_segment_stats": { "$ref": "#/definitions/AthleteSegmentStats" }, "average_grade": { "title": "Average Grade", "type": "number" }, "city": { "title": "City", "type": "string" }, "climb_category": { "title": "Climb Category", "type": "integer" }, "country": { "title": "Country", "type": "string" }, "distance": { "title": "Distance", "type": "number" }, "elevation_high": { "title": "Elevation High", "type": "number" }, "elevation_low": { "title": "Elevation Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "id": { "title": "Id", "type": "integer" }, "maximum_grade": { "title": "Maximum Grade", "type": "number" }, "name": { "title": "Name", "type": "string" }, "private": { "title": "Private", "type": "boolean" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "state": { "title": "State", "type": "string" }, "athlete_count": { "title": "Athlete Count", "type": "integer" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "hazardous": { "title": "Hazardous", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "star_count": { "title": "Star Count", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "end_latitude": { "title": "End Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "end_longitude": { "title": "End Longitude", "type": "number" }, "starred": { "title": "Starred", "type": "boolean" }, "pr_time": { "title": "Pr Time", "type": "integer" }, "starred_date": { "title": "Starred Date", "type": "string", "format": "date-time" }, "elevation_profile": { "title": "Elevation Profile", "type": "string" } } }, "BestEffort": { "title": "BestEffort", "description": "Class representing a best effort (e.g. best time for 5k)", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "end_index": { "title": "End Index", "type": "integer" }, "hidden": { "title": "Hidden", "type": "boolean" }, "kom_rank": { "title": "Kom Rank", "minimum": 1, "maximum": 10, "type": "integer" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pr_rank": { "title": "Pr Rank", "minimum": 1, "maximum": 3, "type": "integer" }, "segment": { "$ref": "#/definitions/Segment" }, "start_index": { "title": "Start Index", "type": "integer" } } }, "Gear": { "title": "Gear", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityLap": { "title": "ActivityLap", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_speed": { "title": "Average Speed", "type": "number" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "end_index": { "title": "End Index", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "lap_index": { "title": "Lap Index", "type": "integer" }, "max_speed": { "title": "Max Speed", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pace_zone": { "title": "Pace Zone", "type": "integer" }, "split": { "title": "Split", "type": "integer" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "start_index": { "title": "Start Index", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" } } }, "ActivityPhotoPrimary": { "title": "ActivityPhotoPrimary", "type": "object", "properties": { "id": { "title": "Id", "type": "integer" }, "source": { "title": "Source", "type": "integer" }, "unique_id": { "title": "Unique Id", "type": "string" }, "urls": { "title": "Urls", "type": "object", "additionalProperties": { "type": "string" } }, "use_primary_photo": { "title": "Use Primary Photo", "type": "boolean" } } }, "ActivityPhotoMeta": { "title": "ActivityPhotoMeta", "description": "The photos structure returned with the activity, not to be confused with\nthe full loaded photos for an activity.", "type": "object", "properties": { "count": { "title": "Count", "type": "integer" }, "primary": { "$ref": "#/definitions/ActivityPhotoPrimary" }, "use_primary_photo": { "title": "Use Primary Photo", "type": "boolean" } } }, "Split": { "title": "Split", "description": "A split -- may be metric or standard units (which has no bearing\non the units used in this object, just the binning of values).", "type": "object", "properties": { "average_speed": { "title": "Average Speed", "type": "number" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elevation_difference": { "title": "Elevation Difference", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "pace_zone": { "title": "Pace Zone", "type": "integer" }, "split": { "title": "Split", "type": "integer" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_grade_adjusted_speed": { "title": "Average Grade Adjusted Speed", "type": "number" } } }, "Activity": { "title": "Activity", "description": "Represents an activity (ride, run, etc.).", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "achievement_count": { "title": "Achievement Count", "type": "integer" }, "athlete": { "$ref": "#/definitions/Athlete" }, "athlete_count": { "title": "Athlete Count", "minimum": 1, "type": "integer" }, "average_speed": { "title": "Average Speed", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "comment_count": { "title": "Comment Count", "type": "integer" }, "commute": { "title": "Commute", "type": "boolean" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elev_high": { "title": "Elev High", "type": "number" }, "elev_low": { "title": "Elev Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "external_id": { "title": "External Id", "type": "string" }, "flagged": { "title": "Flagged", "type": "boolean" }, "gear_id": { "title": "Gear Id", "type": "string" }, "has_kudoed": { "title": "Has Kudoed", "type": "boolean" }, "hide_from_home": { "title": "Hide From Home", "type": "boolean" }, "kilojoules": { "title": "Kilojoules", "type": "number" }, "kudos_count": { "title": "Kudos Count", "type": "integer" }, "manual": { "title": "Manual", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "max_speed": { "title": "Max Speed", "type": "number" }, "max_watts": { "title": "Max Watts", "type": "integer" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "photo_count": { "title": "Photo Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "sport_type": { "$ref": "#/definitions/SportType" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "timezone": { "title": "Timezone", "type": "string" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "total_photo_count": { "title": "Total Photo Count", "type": "integer" }, "trainer": { "title": "Trainer", "type": "boolean" }, "type": { "$ref": "#/definitions/ActivityType" }, "upload_id": { "title": "Upload Id", "type": "integer" }, "upload_id_str": { "title": "Upload Id Str", "type": "string" }, "weighted_average_watts": { "title": "Weighted Average Watts", "type": "integer" }, "workout_type": { "title": "Workout Type", "type": "integer" }, "best_efforts": { "title": "Best Efforts", "type": "array", "items": { "$ref": "#/definitions/BestEffort" } }, "calories": { "title": "Calories", "type": "number" }, "description": { "title": "Description", "type": "string" }, "device_name": { "title": "Device Name", "type": "string" }, "embed_token": { "title": "Embed Token", "type": "string" }, "gear": { "$ref": "#/definitions/Gear" }, "laps": { "title": "Laps", "type": "array", "items": { "$ref": "#/definitions/ActivityLap" } }, "photos": { "$ref": "#/definitions/ActivityPhotoMeta" }, "segment_efforts": { "title": "Segment Efforts", "type": "array", "items": { "$ref": "#/definitions/SegmentEffort" } }, "splits_metric": { "title": "Splits Metric", "type": "array", "items": { "$ref": "#/definitions/Split" } }, "splits_standard": { "title": "Splits Standard", "type": "array", "items": { "$ref": "#/definitions/Split" } }, "guid": { "title": "Guid", "type": "string" }, "utc_offset": { "title": "Utc Offset", "type": "number" }, "location_city": { "title": "Location City", "type": "string" }, "location_state": { "title": "Location State", "type": "string" }, "location_country": { "title": "Location Country", "type": "string" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "pr_count": { "title": "Pr Count", "type": "integer" }, "suffer_score": { "title": "Suffer Score", "type": "integer" }, "has_heartrate": { "title": "Has Heartrate", "type": "boolean" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "max_heartrate": { "title": "Max Heartrate", "type": "integer" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_temp": { "title": "Average Temp", "type": "integer" }, "instagram_primary_photo": { "title": "Instagram Primary Photo", "type": "string" }, "partner_logo_url": { "title": "Partner Logo Url", "type": "string" }, "partner_brand_tag": { "title": "Partner Brand Tag", "type": "string" }, "from_accepted_tag": { "title": "From Accepted Tag", "type": "boolean" }, "segment_leaderboard_opt_out": { "title": "Segment Leaderboard Opt Out", "type": "boolean" }, "perceived_exertion": { "title": "Perceived Exertion", "type": "integer" } } }, "SegmentEffortAchievement": { "title": "SegmentEffortAchievement", "description": "An undocumented structure being returned for segment efforts.", "type": "object", "properties": { "rank": { "title": "Rank", "type": "integer" }, "type": { "title": "Type", "type": "string" }, "type_id": { "title": "Type Id", "type": "integer" }, "effort_count": { "title": "Effort Count", "type": "integer" } } }, "SegmentEffort": { "title": "SegmentEffort", "description": "Class representing a best effort on a particular segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "end_index": { "title": "End Index", "type": "integer" }, "hidden": { "title": "Hidden", "type": "boolean" }, "kom_rank": { "title": "Kom Rank", "minimum": 1, "maximum": 10, "type": "integer" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pr_rank": { "title": "Pr Rank", "minimum": 1, "maximum": 3, "type": "integer" }, "segment": { "$ref": "#/definitions/Segment" }, "start_index": { "title": "Start Index", "type": "integer" }, "achievements": { "title": "Achievements", "type": "array", "items": { "$ref": "#/definitions/SegmentEffortAchievement" } } } } } }
- Fields:
- Validators:
naive_datetimeยปstart_date_local
- field achievements: Optional[List[SegmentEffortAchievement]] = None#
- field activity_id: Optional[int] = None#
The unique identifier of the activity related to this effort
- field average_cadence: Optional[float] = None#
The effortโs average cadence
- field average_heartrate: Optional[float] = None#
The heart heart rate of the athlete during this effort
- field average_watts: Optional[float] = None#
The average wattage of this effort
- field bound_client: Optional[Any] = None#
- field device_watts: Optional[bool] = None#
For riding efforts, whether the wattage was reported by a dedicated recording device
- field distance: Optional[float] = None#
The effortโs distance in meters
- field elapsed_time: Optional[int] = None#
The effortโs elapsed time
- field end_index: Optional[int] = None#
The end index of this effort in its activityโs stream
Whether this effort should be hidden when viewed within an activity
- field id: Optional[int] = None#
The unique identifier of this effort
- field is_kom: Optional[bool] = None#
Whether this effort is the current best on the leaderboard
- field kom_rank: Optional[conint(ge=1, le=10)] = None#
The rank of the effort on the global leaderboard if it belongs in the top 10 at the time of upload
- Constraints:
minimum = 1
maximum = 10
- field max_heartrate: Optional[float] = None#
The maximum heart rate of the athlete during this effort
- field moving_time: Optional[int] = None#
The effortโs moving time
- field name: Optional[str] = None#
The name of the segment on which this effort was performed
- field pr_rank: Optional[conint(ge=1, le=3)] = None#
The rank of the effort on the athleteโs leaderboard if it belongs in the top 3 at the time of upload
- Constraints:
minimum = 1
maximum = 3
- field start_date: Optional[datetime] = None#
The time at which the effort was started.
- field start_date_local: Optional[datetime] = None#
The time at which the effort was started in the local timezone.
- Validated by:
naive_datetime
- field start_index: Optional[int] = None#
The start index of this effort in its activityโs stream
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.Activity[source]#
Represents an activity (ride, run, etc.).
Show JSON schema
{ "$ref": "#/definitions/Activity", "definitions": { "Bike": { "title": "Bike", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityType": { "title": "ActivityType", "enum": [ "AlpineSki", "BackcountrySki", "Canoeing", "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" ], "type": "string" }, "Club": { "title": "Club", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "activity_types": { "title": "Activity Types", "type": "array", "items": { "$ref": "#/definitions/ActivityType" } }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "cover_photo": { "title": "Cover Photo", "type": "string" }, "cover_photo_small": { "title": "Cover Photo Small", "type": "string" }, "featured": { "title": "Featured", "type": "boolean" }, "member_count": { "title": "Member Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "sport_type": { "title": "Sport Type", "enum": [ "cycling", "running", "triathlon", "other" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "url": { "title": "Url", "type": "string" }, "verified": { "title": "Verified", "type": "boolean" }, "admin": { "title": "Admin", "type": "boolean" }, "following_count": { "title": "Following Count", "type": "integer" }, "membership": { "title": "Membership", "enum": [ "member", "pending" ], "type": "string" }, "owner": { "title": "Owner", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "description": { "title": "Description", "type": "string" }, "club_type": { "title": "Club Type", "type": "string" } } }, "Shoe": { "title": "Shoe", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "Athlete": { "title": "Athlete", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "firstname": { "title": "Firstname", "type": "string" }, "lastname": { "title": "Lastname", "type": "string" }, "premium": { "title": "Premium", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "sex": { "title": "Sex", "enum": [ "M", "F" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "summit": { "title": "Summit", "type": "boolean" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "bikes": { "title": "Bikes", "type": "array", "items": { "$ref": "#/definitions/Bike" } }, "clubs": { "title": "Clubs", "type": "array", "items": { "$ref": "#/definitions/Club" } }, "follower_count": { "title": "Follower Count", "type": "integer" }, "friend_count": { "title": "Friend Count", "type": "integer" }, "ftp": { "title": "Ftp", "type": "integer" }, "measurement_preference": { "title": "Measurement Preference", "enum": [ "feet", "meters" ], "type": "string" }, "shoes": { "title": "Shoes", "type": "array", "items": { "$ref": "#/definitions/Shoe" } }, "weight": { "title": "Weight", "type": "number" }, "is_authenticated": { "title": "Is Authenticated", "type": "boolean" }, "athlete_type": { "title": "Athlete Type", "type": "integer" }, "friend": { "title": "Friend", "type": "string" }, "follower": { "title": "Follower", "type": "string" }, "approve_followers": { "title": "Approve Followers", "type": "boolean" }, "badge_type_id": { "title": "Badge Type Id", "type": "integer" }, "mutual_friend_count": { "title": "Mutual Friend Count", "type": "integer" }, "date_preference": { "title": "Date Preference", "type": "string" }, "email": { "title": "Email", "type": "string" }, "super_user": { "title": "Super User", "type": "boolean" }, "email_language": { "title": "Email Language", "type": "string" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "username": { "title": "Username", "type": "string" }, "description": { "title": "Description", "type": "string" }, "instagram_username": { "title": "Instagram Username", "type": "string" }, "offer_in_app_payment": { "title": "Offer In App Payment", "type": "boolean" }, "global_privacy": { "title": "Global Privacy", "type": "boolean" }, "receive_newsletter": { "title": "Receive Newsletter", "type": "boolean" }, "email_kom_lost": { "title": "Email Kom Lost", "type": "boolean" }, "dateofbirth": { "title": "Dateofbirth", "type": "string", "format": "date" }, "facebook_sharing_enabled": { "title": "Facebook Sharing Enabled", "type": "boolean" }, "profile_original": { "title": "Profile Original", "type": "string" }, "premium_expiration_date": { "title": "Premium Expiration Date", "type": "integer" }, "email_send_follower_notices": { "title": "Email Send Follower Notices", "type": "boolean" }, "plan": { "title": "Plan", "type": "string" }, "agreed_to_terms": { "title": "Agreed To Terms", "type": "string" }, "follower_request_count": { "title": "Follower Request Count", "type": "integer" }, "email_facebook_twitter_friend_joins": { "title": "Email Facebook Twitter Friend Joins", "type": "boolean" }, "receive_kudos_emails": { "title": "Receive Kudos Emails", "type": "boolean" }, "receive_follower_feed_emails": { "title": "Receive Follower Feed Emails", "type": "boolean" }, "receive_comment_emails": { "title": "Receive Comment Emails", "type": "boolean" }, "sample_race_distance": { "title": "Sample Race Distance", "type": "integer" }, "sample_race_time": { "title": "Sample Race Time", "type": "integer" }, "membership": { "title": "Membership", "type": "string" }, "admin": { "title": "Admin", "type": "boolean" }, "owner": { "title": "Owner", "type": "boolean" }, "subscription_permissions": { "title": "Subscription Permissions", "type": "array", "items": {} } } }, "LatLon": { "title": "LatLon", "description": "Enables backward compatibility for legacy namedtuple", "minItems": 2, "maxItems": 2, "type": "array", "items": { "type": "number" } }, "Map": { "title": "Map", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "polyline": { "title": "Polyline", "type": "string" }, "summary_polyline": { "title": "Summary Polyline", "type": "string" } } }, "SportType": { "title": "SportType", "enum": [ "AlpineSki", "BackcountrySki", "Badminton", "Canoeing", "Crossfit", "EBikeRide", "Elliptical", "EMountainBikeRide", "Golf", "GravelRide", "Handcycle", "HighIntensityIntervalTraining", "Hike", "IceSkate", "InlineSkate", "Kayaking", "Kitesurf", "MountainBikeRide", "NordicSki", "Pickleball", "Pilates", "Racquetball", "Ride", "RockClimbing", "RollerSki", "Rowing", "Run", "Sail", "Skateboard", "Snowboard", "Snowshoe", "Soccer", "Squash", "StairStepper", "StandUpPaddling", "Surfing", "Swim", "TableTennis", "Tennis", "TrailRun", "Velomobile", "VirtualRide", "VirtualRow", "VirtualRun", "Walk", "WeightTraining", "Wheelchair", "Windsurf", "Workout", "Yoga" ], "type": "string" }, "AthletePrEffort": { "title": "AthletePrEffort", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_activity_id": { "title": "Pr Activity Id", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date-time" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "is_kom": { "title": "Is Kom", "type": "boolean" } } }, "AthleteSegmentStats": { "title": "AthleteSegmentStats", "description": "A structure being returned for segment stats for current athlete.", "type": "object", "properties": { "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date" } } }, "Segment": { "title": "Segment", "description": "Represents a single Strava segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_type": { "$ref": "#/definitions/ActivityType" }, "athlete_pr_effort": { "$ref": "#/definitions/AthletePrEffort" }, "athlete_segment_stats": { "$ref": "#/definitions/AthleteSegmentStats" }, "average_grade": { "title": "Average Grade", "type": "number" }, "city": { "title": "City", "type": "string" }, "climb_category": { "title": "Climb Category", "type": "integer" }, "country": { "title": "Country", "type": "string" }, "distance": { "title": "Distance", "type": "number" }, "elevation_high": { "title": "Elevation High", "type": "number" }, "elevation_low": { "title": "Elevation Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "id": { "title": "Id", "type": "integer" }, "maximum_grade": { "title": "Maximum Grade", "type": "number" }, "name": { "title": "Name", "type": "string" }, "private": { "title": "Private", "type": "boolean" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "state": { "title": "State", "type": "string" }, "athlete_count": { "title": "Athlete Count", "type": "integer" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "hazardous": { "title": "Hazardous", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "star_count": { "title": "Star Count", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "end_latitude": { "title": "End Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "end_longitude": { "title": "End Longitude", "type": "number" }, "starred": { "title": "Starred", "type": "boolean" }, "pr_time": { "title": "Pr Time", "type": "integer" }, "starred_date": { "title": "Starred Date", "type": "string", "format": "date-time" }, "elevation_profile": { "title": "Elevation Profile", "type": "string" } } }, "BestEffort": { "title": "BestEffort", "description": "Class representing a best effort (e.g. best time for 5k)", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "end_index": { "title": "End Index", "type": "integer" }, "hidden": { "title": "Hidden", "type": "boolean" }, "kom_rank": { "title": "Kom Rank", "minimum": 1, "maximum": 10, "type": "integer" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pr_rank": { "title": "Pr Rank", "minimum": 1, "maximum": 3, "type": "integer" }, "segment": { "$ref": "#/definitions/Segment" }, "start_index": { "title": "Start Index", "type": "integer" } } }, "Gear": { "title": "Gear", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityLap": { "title": "ActivityLap", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_speed": { "title": "Average Speed", "type": "number" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "end_index": { "title": "End Index", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "lap_index": { "title": "Lap Index", "type": "integer" }, "max_speed": { "title": "Max Speed", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pace_zone": { "title": "Pace Zone", "type": "integer" }, "split": { "title": "Split", "type": "integer" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "start_index": { "title": "Start Index", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" } } }, "ActivityPhotoPrimary": { "title": "ActivityPhotoPrimary", "type": "object", "properties": { "id": { "title": "Id", "type": "integer" }, "source": { "title": "Source", "type": "integer" }, "unique_id": { "title": "Unique Id", "type": "string" }, "urls": { "title": "Urls", "type": "object", "additionalProperties": { "type": "string" } }, "use_primary_photo": { "title": "Use Primary Photo", "type": "boolean" } } }, "ActivityPhotoMeta": { "title": "ActivityPhotoMeta", "description": "The photos structure returned with the activity, not to be confused with\nthe full loaded photos for an activity.", "type": "object", "properties": { "count": { "title": "Count", "type": "integer" }, "primary": { "$ref": "#/definitions/ActivityPhotoPrimary" }, "use_primary_photo": { "title": "Use Primary Photo", "type": "boolean" } } }, "SegmentEffortAchievement": { "title": "SegmentEffortAchievement", "description": "An undocumented structure being returned for segment efforts.", "type": "object", "properties": { "rank": { "title": "Rank", "type": "integer" }, "type": { "title": "Type", "type": "string" }, "type_id": { "title": "Type Id", "type": "integer" }, "effort_count": { "title": "Effort Count", "type": "integer" } } }, "SegmentEffort": { "title": "SegmentEffort", "description": "Class representing a best effort on a particular segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "activity": { "$ref": "#/definitions/Activity" }, "athlete": { "$ref": "#/definitions/Athlete" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "end_index": { "title": "End Index", "type": "integer" }, "hidden": { "title": "Hidden", "type": "boolean" }, "kom_rank": { "title": "Kom Rank", "minimum": 1, "maximum": 10, "type": "integer" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "pr_rank": { "title": "Pr Rank", "minimum": 1, "maximum": 3, "type": "integer" }, "segment": { "$ref": "#/definitions/Segment" }, "start_index": { "title": "Start Index", "type": "integer" }, "achievements": { "title": "Achievements", "type": "array", "items": { "$ref": "#/definitions/SegmentEffortAchievement" } } } }, "Split": { "title": "Split", "description": "A split -- may be metric or standard units (which has no bearing\non the units used in this object, just the binning of values).", "type": "object", "properties": { "average_speed": { "title": "Average Speed", "type": "number" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elevation_difference": { "title": "Elevation Difference", "type": "number" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "pace_zone": { "title": "Pace Zone", "type": "integer" }, "split": { "title": "Split", "type": "integer" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "average_grade_adjusted_speed": { "title": "Average Grade Adjusted Speed", "type": "number" } } }, "Activity": { "title": "Activity", "description": "Represents an activity (ride, run, etc.).", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "achievement_count": { "title": "Achievement Count", "type": "integer" }, "athlete": { "$ref": "#/definitions/Athlete" }, "athlete_count": { "title": "Athlete Count", "minimum": 1, "type": "integer" }, "average_speed": { "title": "Average Speed", "type": "number" }, "average_watts": { "title": "Average Watts", "type": "number" }, "comment_count": { "title": "Comment Count", "type": "integer" }, "commute": { "title": "Commute", "type": "boolean" }, "device_watts": { "title": "Device Watts", "type": "boolean" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "elev_high": { "title": "Elev High", "type": "number" }, "elev_low": { "title": "Elev Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "external_id": { "title": "External Id", "type": "string" }, "flagged": { "title": "Flagged", "type": "boolean" }, "gear_id": { "title": "Gear Id", "type": "string" }, "has_kudoed": { "title": "Has Kudoed", "type": "boolean" }, "hide_from_home": { "title": "Hide From Home", "type": "boolean" }, "kilojoules": { "title": "Kilojoules", "type": "number" }, "kudos_count": { "title": "Kudos Count", "type": "integer" }, "manual": { "title": "Manual", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "max_speed": { "title": "Max Speed", "type": "number" }, "max_watts": { "title": "Max Watts", "type": "integer" }, "moving_time": { "title": "Moving Time", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "photo_count": { "title": "Photo Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "sport_type": { "$ref": "#/definitions/SportType" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "timezone": { "title": "Timezone", "type": "string" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "total_photo_count": { "title": "Total Photo Count", "type": "integer" }, "trainer": { "title": "Trainer", "type": "boolean" }, "type": { "$ref": "#/definitions/ActivityType" }, "upload_id": { "title": "Upload Id", "type": "integer" }, "upload_id_str": { "title": "Upload Id Str", "type": "string" }, "weighted_average_watts": { "title": "Weighted Average Watts", "type": "integer" }, "workout_type": { "title": "Workout Type", "type": "integer" }, "best_efforts": { "title": "Best Efforts", "type": "array", "items": { "$ref": "#/definitions/BestEffort" } }, "calories": { "title": "Calories", "type": "number" }, "description": { "title": "Description", "type": "string" }, "device_name": { "title": "Device Name", "type": "string" }, "embed_token": { "title": "Embed Token", "type": "string" }, "gear": { "$ref": "#/definitions/Gear" }, "laps": { "title": "Laps", "type": "array", "items": { "$ref": "#/definitions/ActivityLap" } }, "photos": { "$ref": "#/definitions/ActivityPhotoMeta" }, "segment_efforts": { "title": "Segment Efforts", "type": "array", "items": { "$ref": "#/definitions/SegmentEffort" } }, "splits_metric": { "title": "Splits Metric", "type": "array", "items": { "$ref": "#/definitions/Split" } }, "splits_standard": { "title": "Splits Standard", "type": "array", "items": { "$ref": "#/definitions/Split" } }, "guid": { "title": "Guid", "type": "string" }, "utc_offset": { "title": "Utc Offset", "type": "number" }, "location_city": { "title": "Location City", "type": "string" }, "location_state": { "title": "Location State", "type": "string" }, "location_country": { "title": "Location Country", "type": "string" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "pr_count": { "title": "Pr Count", "type": "integer" }, "suffer_score": { "title": "Suffer Score", "type": "integer" }, "has_heartrate": { "title": "Has Heartrate", "type": "boolean" }, "average_heartrate": { "title": "Average Heartrate", "type": "number" }, "max_heartrate": { "title": "Max Heartrate", "type": "integer" }, "average_cadence": { "title": "Average Cadence", "type": "number" }, "average_temp": { "title": "Average Temp", "type": "integer" }, "instagram_primary_photo": { "title": "Instagram Primary Photo", "type": "string" }, "partner_logo_url": { "title": "Partner Logo Url", "type": "string" }, "partner_brand_tag": { "title": "Partner Brand Tag", "type": "string" }, "from_accepted_tag": { "title": "From Accepted Tag", "type": "boolean" }, "segment_leaderboard_opt_out": { "title": "Segment Leaderboard Opt Out", "type": "boolean" }, "perceived_exertion": { "title": "Perceived Exertion", "type": "integer" } } } } }
- Fields:
- Validators:
naive_datetimeยปstart_date_local
- field achievement_count: Optional[int] = None#
The number of achievements gained during this activity
- field athlete_count: Optional[conint(ge=1)] = None#
The number of athletes for taking part in a group activity
- Constraints:
minimum = 1
- field average_cadence: Optional[float] = None#
- field average_heartrate: Optional[float] = None#
- field average_speed: Optional[float] = None#
The activityโs average speed, in meters per second
- field average_temp: Optional[int] = None#
- field average_watts: Optional[float] = None#
Average power output in watts during this activity. Rides only
- field best_efforts: Optional[List[BestEffort]] = None#
- field bound_client: Optional[Any] = None#
- field calories: Optional[float] = None#
The number of kilocalories consumed during this activity
- field comment_count: Optional[int] = None#
The number of comments for this activity
- field commute: Optional[bool] = None#
Whether this activity is a commute
- field description: Optional[str] = None#
The description of the activity
- field device_name: Optional[str] = None#
The name of the device used to record the activity
- field device_watts: Optional[bool] = None#
Whether the watts are from a power meter, false if estimated
- field distance: Optional[float] = None#
The activityโs distance, in meters
- field elapsed_time: Optional[int] = None#
The activityโs elapsed time, in seconds
- field elev_high: Optional[float] = None#
The activityโs highest elevation, in meters
- field elev_low: Optional[float] = None#
The activityโs lowest elevation, in meters
- field embed_token: Optional[str] = None#
The token used to embed a Strava activity
- field external_id: Optional[str] = None#
The identifier provided at upload time
- field flagged: Optional[bool] = None#
Whether this activity is flagged
- field from_accepted_tag: Optional[bool] = None#
- field gear_id: Optional[str] = None#
The id of the gear for the activity
- field guid: Optional[str] = None#
- field has_heartrate: Optional[bool] = None#
- field has_kudoed: Optional[bool] = None#
Whether the logged-in athlete has kudoed this activity
- field hide_from_home: Optional[bool] = None#
Whether the activity is muted
- field id: Optional[int] = None#
The unique identifier of the activity
- field instagram_primary_photo: Optional[str] = None#
- field kilojoules: Optional[float] = None#
The total work done in kilojoules during this activity. Rides only
- field kudos_count: Optional[int] = None#
The number of kudos given for this activity
- field laps: Optional[List[ActivityLap]] = None#
- field location_city: Optional[str] = None#
- field location_country: Optional[str] = None#
- field location_state: Optional[str] = None#
- field manual: Optional[bool] = None#
Whether this activity was created manually
- field map: Optional[Map] = None#
- field max_heartrate: Optional[int] = None#
- field max_speed: Optional[float] = None#
The activityโs max speed, in meters per second
- field max_watts: Optional[int] = None#
Rides with power meter data only
- field moving_time: Optional[int] = None#
The activityโs moving time, in seconds
- field name: Optional[str] = None#
The name of the activity
- field partner_brand_tag: Optional[str] = None#
- field partner_logo_url: Optional[str] = None#
- field perceived_exertion: Optional[int] = None#
- field photo_count: Optional[int] = None#
The number of Instagram photos for this activity
- field photos: Optional[ActivityPhotoMeta] = None#
- field pr_count: Optional[int] = None#
- field private: Optional[bool] = None#
Whether this activity is private
- field segment_efforts: Optional[List[SegmentEffort]] = None#
- field segment_leaderboard_opt_out: Optional[bool] = None#
- field splits_metric: Optional[List[Split]] = None#
The splits of this activity in metric units (for runs)
- field splits_standard: Optional[List[Split]] = None#
The splits of this activity in imperial units (for runs)
- field start_date: Optional[datetime] = None#
The time at which the activity was started.
- field start_date_local: Optional[datetime] = None#
The time at which the activity was started in the local timezone.
- Validated by:
naive_datetime
- field start_latitude: Optional[float] = None#
- field start_longitude: Optional[float] = None#
- field suffer_score: Optional[int] = None#
- field timezone: Optional[str] = None#
The timezone of the activity
- field total_elevation_gain: Optional[float] = None#
The activityโs total elevation gain.
- field total_photo_count: Optional[int] = None#
The number of Instagram and Strava photos for this activity
- field trainer: Optional[bool] = None#
Whether this activity was recorded on a training machine
- field type: Optional[ActivityType] = None#
Deprecated. Prefer to use sport_type
- field upload_id: Optional[int] = None#
The identifier of the upload that resulted in this activity
- field upload_id_str: Optional[str] = None#
The unique identifier of the upload in string format
- field utc_offset: Optional[float] = None#
- field weighted_average_watts: Optional[int] = None#
Similar to Normalized Power. Rides with power meter data only
- field workout_type: Optional[int] = None#
The activityโs workout type
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- SPORT_TYPES: ClassVar[Tuple] = ('AlpineSki', 'BackcountrySki', 'Badminton', 'Canoeing', 'Crossfit', 'EBikeRide', 'Elliptical', 'EMountainBikeRide', 'Golf', 'GravelRide', 'Handcycle', 'HighIntensityIntervalTraining', 'Hike', 'IceSkate', 'InlineSkate', 'Kayaking', 'Kitesurf', 'MountainBikeRide', 'NordicSki', 'Pickleball', 'Pilates', 'Racquetball', 'Ride', 'RockClimbing', 'RollerSki', 'Rowing', 'Run', 'Sail', 'Skateboard', 'Snowboard', 'Snowshoe', 'Soccer', 'Squash', 'StairStepper', 'StandUpPaddling', 'Surfing', 'Swim', 'TableTennis', 'Tennis', 'TrailRun', 'Velomobile', 'VirtualRide', 'VirtualRow', 'VirtualRun', 'Walk', 'WeightTraining', 'Wheelchair', 'Windsurf', 'Workout', 'Yoga')#
- TYPES: ClassVar[Tuple] = ('AlpineSki', 'BackcountrySki', 'Canoeing', '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')#
- property comments#
- property full_photos#
- property kudos#
- property zones#
- pydantic model stravalib.model.DistributionBucket[source]#
A single distribution bucket object, used for activity zones.
Show JSON schema
{ "title": "DistributionBucket", "description": "A single distribution bucket object, used for activity zones.", "type": "object", "properties": { "max": { "title": "Max", "type": "integer" }, "min": { "title": "Min", "type": "integer" }, "time": { "title": "Time", "type": "integer" } } }
- field max: Optional[int] = None#
The maximum value in the range.
- field min: Optional[int] = None#
The minimum value in the range.
- field time: Optional[int] = None#
The number of seconds spent in this zone
- pydantic model stravalib.model.BaseActivityZone[source]#
Base class for activity zones.
A collection of
stravalib.model.DistributionBucketobjects.Show JSON schema
{ "title": "BaseActivityZone", "description": "Base class for activity zones.\n\nA collection of :class:`stravalib.model.DistributionBucket` objects.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "custom_zones": { "title": "Custom Zones", "type": "boolean" }, "distribution_buckets": { "title": "Distribution Buckets", "type": "array", "items": { "$ref": "#/definitions/DistributionBucket" } }, "max": { "title": "Max", "type": "integer" }, "points": { "title": "Points", "type": "integer" }, "score": { "title": "Score", "type": "integer" }, "sensor_based": { "title": "Sensor Based", "type": "boolean" }, "type": { "title": "Type", "enum": [ "heartrate", "power", "pace" ], "type": "string" } }, "definitions": { "DistributionBucket": { "title": "DistributionBucket", "description": "A single distribution bucket object, used for activity zones.", "type": "object", "properties": { "max": { "title": "Max", "type": "integer" }, "min": { "title": "Min", "type": "integer" }, "time": { "title": "Time", "type": "integer" } } } } }
- Fields:
- field bound_client: Optional[Any] = None#
- field custom_zones: Optional[bool] = None#
- field distribution_buckets: Optional[List[DistributionBucket]] = None#
- field max: Optional[int] = None#
- field points: Optional[int] = None#
- field score: Optional[int] = None#
- field sensor_based: Optional[bool] = None#
- field type: Optional[Literal['heartrate', 'power', 'pace']] = None#
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.Stream[source]#
Stream of readings from the activity, effort or segment.
Show JSON schema
{ "title": "Stream", "description": "Stream of readings from the activity, effort or segment.", "type": "object", "properties": { "original_size": { "title": "Original Size", "type": "integer" }, "resolution": { "title": "Resolution", "enum": [ "low", "medium", "high" ], "type": "string" }, "series_type": { "title": "Series Type", "enum": [ "distance", "time" ], "type": "string" }, "type": { "title": "Type", "type": "string" }, "data": { "title": "Data", "type": "array", "items": {} } } }
- Fields:
- field data: Optional[List[Any]] = None#
- field original_size: Optional[int] = None#
The number of data points in this stream
- field resolution: Optional[Literal['low', 'medium', 'high']] = None#
The level of detail (sampling) in which this stream was returned
- field series_type: Optional[Literal['distance', 'time']] = None#
The base series used in the case the stream was downsampled
- field type: Optional[str] = None#
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.Route[source]#
Represents a Route.
Show JSON schema
{ "title": "Route", "description": "Represents a Route.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "athlete": { "$ref": "#/definitions/Athlete" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "description": { "title": "Description", "type": "string" }, "distance": { "title": "Distance", "type": "number" }, "elevation_gain": { "title": "Elevation Gain", "type": "number" }, "estimated_moving_time": { "title": "Estimated Moving Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "id_str": { "title": "Id Str", "type": "string" }, "map": { "$ref": "#/definitions/Map" }, "name": { "title": "Name", "type": "string" }, "private": { "title": "Private", "type": "boolean" }, "segments": { "title": "Segments", "type": "array", "items": { "$ref": "#/definitions/Segment" } }, "starred": { "title": "Starred", "type": "boolean" }, "sub_type": { "title": "Sub Type", "type": "integer" }, "timestamp": { "title": "Timestamp", "type": "integer" }, "type": { "title": "Type", "type": "integer" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" } }, "definitions": { "Bike": { "title": "Bike", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "ActivityType": { "title": "ActivityType", "enum": [ "AlpineSki", "BackcountrySki", "Canoeing", "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" ], "type": "string" }, "Club": { "title": "Club", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "activity_types": { "title": "Activity Types", "type": "array", "items": { "$ref": "#/definitions/ActivityType" } }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "cover_photo": { "title": "Cover Photo", "type": "string" }, "cover_photo_small": { "title": "Cover Photo Small", "type": "string" }, "featured": { "title": "Featured", "type": "boolean" }, "member_count": { "title": "Member Count", "type": "integer" }, "private": { "title": "Private", "type": "boolean" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "sport_type": { "title": "Sport Type", "enum": [ "cycling", "running", "triathlon", "other" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "url": { "title": "Url", "type": "string" }, "verified": { "title": "Verified", "type": "boolean" }, "admin": { "title": "Admin", "type": "boolean" }, "following_count": { "title": "Following Count", "type": "integer" }, "membership": { "title": "Membership", "enum": [ "member", "pending" ], "type": "string" }, "owner": { "title": "Owner", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "description": { "title": "Description", "type": "string" }, "club_type": { "title": "Club Type", "type": "string" } } }, "Shoe": { "title": "Shoe", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "distance": { "title": "Distance", "type": "number" }, "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "primary": { "title": "Primary", "type": "boolean" }, "resource_state": { "title": "Resource State", "type": "integer" }, "brand_name": { "title": "Brand Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "frame_type": { "title": "Frame Type", "type": "integer" }, "model_name": { "title": "Model Name", "type": "string" } } }, "Athlete": { "title": "Athlete", "description": "Provides backward compatibility with legacy BaseEntity", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "firstname": { "title": "Firstname", "type": "string" }, "lastname": { "title": "Lastname", "type": "string" }, "premium": { "title": "Premium", "type": "boolean" }, "profile": { "title": "Profile", "type": "string" }, "profile_medium": { "title": "Profile Medium", "type": "string" }, "resource_state": { "title": "Resource State", "type": "integer" }, "sex": { "title": "Sex", "enum": [ "M", "F" ], "type": "string" }, "state": { "title": "State", "type": "string" }, "summit": { "title": "Summit", "type": "boolean" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "bikes": { "title": "Bikes", "type": "array", "items": { "$ref": "#/definitions/Bike" } }, "clubs": { "title": "Clubs", "type": "array", "items": { "$ref": "#/definitions/Club" } }, "follower_count": { "title": "Follower Count", "type": "integer" }, "friend_count": { "title": "Friend Count", "type": "integer" }, "ftp": { "title": "Ftp", "type": "integer" }, "measurement_preference": { "title": "Measurement Preference", "enum": [ "feet", "meters" ], "type": "string" }, "shoes": { "title": "Shoes", "type": "array", "items": { "$ref": "#/definitions/Shoe" } }, "weight": { "title": "Weight", "type": "number" }, "is_authenticated": { "title": "Is Authenticated", "type": "boolean" }, "athlete_type": { "title": "Athlete Type", "type": "integer" }, "friend": { "title": "Friend", "type": "string" }, "follower": { "title": "Follower", "type": "string" }, "approve_followers": { "title": "Approve Followers", "type": "boolean" }, "badge_type_id": { "title": "Badge Type Id", "type": "integer" }, "mutual_friend_count": { "title": "Mutual Friend Count", "type": "integer" }, "date_preference": { "title": "Date Preference", "type": "string" }, "email": { "title": "Email", "type": "string" }, "super_user": { "title": "Super User", "type": "boolean" }, "email_language": { "title": "Email Language", "type": "string" }, "max_heartrate": { "title": "Max Heartrate", "type": "number" }, "username": { "title": "Username", "type": "string" }, "description": { "title": "Description", "type": "string" }, "instagram_username": { "title": "Instagram Username", "type": "string" }, "offer_in_app_payment": { "title": "Offer In App Payment", "type": "boolean" }, "global_privacy": { "title": "Global Privacy", "type": "boolean" }, "receive_newsletter": { "title": "Receive Newsletter", "type": "boolean" }, "email_kom_lost": { "title": "Email Kom Lost", "type": "boolean" }, "dateofbirth": { "title": "Dateofbirth", "type": "string", "format": "date" }, "facebook_sharing_enabled": { "title": "Facebook Sharing Enabled", "type": "boolean" }, "profile_original": { "title": "Profile Original", "type": "string" }, "premium_expiration_date": { "title": "Premium Expiration Date", "type": "integer" }, "email_send_follower_notices": { "title": "Email Send Follower Notices", "type": "boolean" }, "plan": { "title": "Plan", "type": "string" }, "agreed_to_terms": { "title": "Agreed To Terms", "type": "string" }, "follower_request_count": { "title": "Follower Request Count", "type": "integer" }, "email_facebook_twitter_friend_joins": { "title": "Email Facebook Twitter Friend Joins", "type": "boolean" }, "receive_kudos_emails": { "title": "Receive Kudos Emails", "type": "boolean" }, "receive_follower_feed_emails": { "title": "Receive Follower Feed Emails", "type": "boolean" }, "receive_comment_emails": { "title": "Receive Comment Emails", "type": "boolean" }, "sample_race_distance": { "title": "Sample Race Distance", "type": "integer" }, "sample_race_time": { "title": "Sample Race Time", "type": "integer" }, "membership": { "title": "Membership", "type": "string" }, "admin": { "title": "Admin", "type": "boolean" }, "owner": { "title": "Owner", "type": "boolean" }, "subscription_permissions": { "title": "Subscription Permissions", "type": "array", "items": {} } } }, "Map": { "title": "Map", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "polyline": { "title": "Polyline", "type": "string" }, "summary_polyline": { "title": "Summary Polyline", "type": "string" } } }, "AthletePrEffort": { "title": "AthletePrEffort", "description": "Mixin that intercepts attribute lookup and raises warnings or modifies return values\nbased on what is defined in the following class attributes:\n\n* _field_conversions\n* _deprecated_fields (TODO)\n* _unsupported_fields (TODO)", "type": "object", "properties": { "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_activity_id": { "title": "Pr Activity Id", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date-time" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "is_kom": { "title": "Is Kom", "type": "boolean" } } }, "AthleteSegmentStats": { "title": "AthleteSegmentStats", "description": "A structure being returned for segment stats for current athlete.", "type": "object", "properties": { "activity_id": { "title": "Activity Id", "type": "integer" }, "distance": { "title": "Distance", "type": "number" }, "elapsed_time": { "title": "Elapsed Time", "type": "integer" }, "id": { "title": "Id", "type": "integer" }, "is_kom": { "title": "Is Kom", "type": "boolean" }, "start_date": { "title": "Start Date", "type": "string", "format": "date-time" }, "start_date_local": { "title": "Start Date Local", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "pr_elapsed_time": { "title": "Pr Elapsed Time", "type": "integer" }, "pr_date": { "title": "Pr Date", "type": "string", "format": "date" } } }, "LatLon": { "title": "LatLon", "description": "Enables backward compatibility for legacy namedtuple", "minItems": 2, "maxItems": 2, "type": "array", "items": { "type": "number" } }, "Segment": { "title": "Segment", "description": "Represents a single Strava segment.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "activity_type": { "$ref": "#/definitions/ActivityType" }, "athlete_pr_effort": { "$ref": "#/definitions/AthletePrEffort" }, "athlete_segment_stats": { "$ref": "#/definitions/AthleteSegmentStats" }, "average_grade": { "title": "Average Grade", "type": "number" }, "city": { "title": "City", "type": "string" }, "climb_category": { "title": "Climb Category", "type": "integer" }, "country": { "title": "Country", "type": "string" }, "distance": { "title": "Distance", "type": "number" }, "elevation_high": { "title": "Elevation High", "type": "number" }, "elevation_low": { "title": "Elevation Low", "type": "number" }, "end_latlng": { "$ref": "#/definitions/LatLon" }, "id": { "title": "Id", "type": "integer" }, "maximum_grade": { "title": "Maximum Grade", "type": "number" }, "name": { "title": "Name", "type": "string" }, "private": { "title": "Private", "type": "boolean" }, "start_latlng": { "$ref": "#/definitions/LatLon" }, "state": { "title": "State", "type": "string" }, "athlete_count": { "title": "Athlete Count", "type": "integer" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "effort_count": { "title": "Effort Count", "type": "integer" }, "hazardous": { "title": "Hazardous", "type": "boolean" }, "map": { "$ref": "#/definitions/Map" }, "star_count": { "title": "Star Count", "type": "integer" }, "total_elevation_gain": { "title": "Total Elevation Gain", "type": "number" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "start_latitude": { "title": "Start Latitude", "type": "number" }, "end_latitude": { "title": "End Latitude", "type": "number" }, "start_longitude": { "title": "Start Longitude", "type": "number" }, "end_longitude": { "title": "End Longitude", "type": "number" }, "starred": { "title": "Starred", "type": "boolean" }, "pr_time": { "title": "Pr Time", "type": "integer" }, "starred_date": { "title": "Starred Date", "type": "string", "format": "date-time" }, "elevation_profile": { "title": "Elevation Profile", "type": "string" } } } } }
- Fields:
- field bound_client: Optional[Any] = None#
- field created_at: Optional[datetime] = None#
The time at which the route was created
- field description: Optional[str] = None#
The description of the route
- field distance: Optional[float] = None#
The routeโs distance, in meters
- field elevation_gain: Optional[float] = None#
The routeโs elevation gain.
- field estimated_moving_time: Optional[int] = None#
Estimated time in seconds for the authenticated athlete to complete route
- field id: Optional[int] = None#
The unique identifier of this route
- field id_str: Optional[str] = None#
The unique identifier of the route in string format
- field map: Optional[Map] = None#
- field name: Optional[str] = None#
The name of this route
- field private: Optional[bool] = None#
Whether this route is private
- field starred: Optional[bool] = None#
Whether this route is starred by the logged-in athlete
- field sub_type: Optional[int] = None#
This routeโs sub-type (1 for road, 2 for mountain bike, 3 for cross, 4 for trail, 5 for mixed)
- field timestamp: Optional[int] = None#
An epoch timestamp of when the route was created
- field type: Optional[int] = None#
This routeโs type (1 for ride, 2 for runs)
- field updated_at: Optional[datetime] = None#
The time at which the route was last updated
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.Subscription[source]#
Represents a Webhook Event Subscription.
Show JSON schema
{ "title": "Subscription", "description": "Represents a Webhook Event Subscription.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "id": { "title": "Id", "type": "integer" }, "application_id": { "title": "Application Id", "type": "integer" }, "object_type": { "title": "Object Type", "type": "string" }, "aspect_type": { "title": "Aspect Type", "type": "string" }, "callback_url": { "title": "Callback Url", "type": "string" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" } } }
- Fields:
- field application_id: Optional[int] = None#
- field aspect_type: Optional[str] = None#
- field bound_client: Optional[Any] = None#
- field callback_url: Optional[str] = None#
- field created_at: Optional[datetime] = None#
- field id: Optional[int] = None#
- field object_type: Optional[str] = None#
- field updated_at: Optional[datetime] = None#
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- ASPECT_TYPE_CREATE: ClassVar[str] = 'create'#
- OBJECT_TYPE_ACTIVITY: ClassVar[str] = 'activity'#
- VERIFY_TOKEN_DEFAULT: ClassVar[str] = 'STRAVA'#
- pydantic model stravalib.model.SubscriptionCallback[source]#
Represents a Webhook Event Subscription Callback.
Show JSON schema
{ "title": "SubscriptionCallback", "description": "Represents a Webhook Event Subscription Callback.", "type": "object", "properties": { "hub.mode": { "title": "Hub.Mode", "type": "string" }, "hub.verify_token": { "title": "Hub.Verify Token", "type": "string" }, "hub.challenge": { "title": "Hub.Challenge", "type": "string" } } }
- Config:
alias_generator: function = <function SubscriptionCallback.Config.<lambda> at 0x7f88c1e09d30>
- Fields:
- field hub_challenge: Optional[str] = None (alias 'hub.challenge')#
- field hub_mode: Optional[str] = None (alias 'hub.mode')#
- field hub_verify_token: Optional[str] = None (alias 'hub.verify_token')#
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self
- pydantic model stravalib.model.SubscriptionUpdate[source]#
Represents a Webhook Event Subscription Update.
Show JSON schema
{ "title": "SubscriptionUpdate", "description": "Represents a Webhook Event Subscription Update.", "type": "object", "properties": { "bound_client": { "title": "Bound Client" }, "subscription_id": { "title": "Subscription Id", "type": "integer" }, "owner_id": { "title": "Owner Id", "type": "integer" }, "object_id": { "title": "Object Id", "type": "integer" }, "object_type": { "title": "Object Type", "type": "string" }, "aspect_type": { "title": "Aspect Type", "type": "string" }, "event_time": { "title": "Event Time", "type": "string", "format": "date-time" }, "updates": { "title": "Updates", "type": "object" } } }
- Fields:
- field aspect_type: Optional[str] = None#
- field bound_client: Optional[Any] = None#
- field event_time: Optional[datetime] = None#
- field object_id: Optional[int] = None#
- field object_type: Optional[str] = None#
- field owner_id: Optional[int] = None#
- field subscription_id: Optional[int] = None#
- field updates: Optional[Dict] = None#
- classmethod deserialize(attribute_value_mapping: Dict)#
Creates and returns a new object based on serialized (dict) struct.
- from_dict(attribute_value_mapping: Dict)#
Deserializes v into self, resetting and ond/or overwriting existing fields
- to_dict()#
Returns a dict representation of self