{"id":34095540,"url":"https://github.com/sladkovm/stravaio","last_synced_at":"2026-04-06T07:01:44.429Z","repository":{"id":44589941,"uuid":"162896898","full_name":"sladkovm/stravaio","owner":"sladkovm","description":"Python client for Strava API with a focus on fluent data handling","archived":false,"fork":false,"pushed_at":"2022-08-05T21:57:25.000Z","size":5828,"stargazers_count":72,"open_issues_count":10,"forks_count":30,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-01-02T11:16:51.874Z","etag":null,"topics":["python-client","strava-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sladkovm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-23T14:18:05.000Z","updated_at":"2025-02-14T20:42:59.000Z","dependencies_parsed_at":"2022-08-12T11:20:42.662Z","dependency_job_id":null,"html_url":"https://github.com/sladkovm/stravaio","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/sladkovm/stravaio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sladkovm%2Fstravaio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sladkovm%2Fstravaio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sladkovm%2Fstravaio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sladkovm%2Fstravaio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sladkovm","download_url":"https://codeload.github.com/sladkovm/stravaio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sladkovm%2Fstravaio/sbom","scorecard":{"id":830963,"data":{"date":"2025-08-11","repo":{"name":"github.com/sladkovm/stravaio","commit":"d7ccbed34a2f3888e017d5e4c1b6e29103f86311"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 3/27 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}}]},"last_synced_at":"2025-08-23T17:47:36.584Z","repository_id":44589941,"created_at":"2025-08-23T17:47:36.584Z","updated_at":"2025-08-23T17:47:36.584Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31463015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python-client","strava-api"],"created_at":"2025-12-14T15:14:51.227Z","updated_at":"2026-04-06T07:01:44.423Z","avatar_url":"https://github.com/sladkovm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stravaio\nPython client for Strava API with a focus on fluent data handling\n\n[![PyPI version](https://badge.fury.io/py/stravaio.svg)](https://badge.fury.io/py/stravaio)\n[![Build Status](https://travis-ci.org/sladkovm/stravaio.svg?branch=master)](https://travis-ci.org/sladkovm/stravaio)\n\n## Example\n\nBuild your own *Year in Strava* poster [Jupyter notebook](https://github.com/sladkovm/stravaio/blob/master/examples/Year%20in%20Strava%202018.ipynb)\n\n## Install\n```bash\npipenv install stravaio\n```\n\nor\n\n```bash\npip install stravaio\n```\n\nLatest dev version could be installed as:\n```bash\npipenv install git+https://github.com/sladkovm/stravaio.git#egg=stravaio\n```\n\n## Before use\nYou need `STRAVA_ACCESS_TOKEN` with activity level permissions to make use of this package. \n\nThe easiest way to get the token is to use the *stravaio* library itself:\n\n```python\nfrom stravaio import strava_oauth2\n\nstrava_oauth2(client_id=STRAVA_CLIENT_ID, client_secret=STRAVA_CLIENT_SECRET)\n```\n\nYou will be redirected to the default system browser, where the authorization flow must be completed. In the background the local webserver will be running and listening to the data returned by Strava.\n\nBoth `STRAVA_CLIENT_ID` and `STRAVA_CLIENT_SECRET` are optional arguments if they are set as the environment variables.\n\nAnother way is to head to the [strava-oauth](https://github.com/sladkovm/strava-oauth) library for help. There you will find a link to the public webserver that can be used for completing the Strava authorizatio flow.\n\nWhen the token is fetched it is handy to store it as an environment variable. Otherwise it should be passed explicitely to the StravaIO constructor.\n\n```bash\nexport STRAVA_ACCESS_TOKEN=\u003cstrava_access_token\u003e\n```\n\n## Use\n\n```python\nfrom stravaio import StravaIO\n\n# If the token is stored as an environment varible it is not neccessary\n# to pass it as an input parameters\nclient = StravaIO(access_token=STRAVA_ACCESS_TOKEN)\n```\n\n### Athlete\n```python\n# Get logged in athlete (e.g. the owner of the token)\n# Returns a stravaio.Athlete object that wraps the\n# [Strava DetailedAthlete](https://developers.strava.com/docs/reference/#api-models-DetailedAthlete)\n# with few added data-handling methods\nathlete = client.get_logged_in_athlete()\n\n# Dump athlete into a JSON friendly dict (e.g. all datetimes are converted into iso8601)\nathlete_dict = athlete.to_dict()\n\n# Store athlete infor as a JSON locally (~/.stravadata/athlete_\u003cid\u003e.json)\nathlete.store_locally()\n\n# Get locally stored athletes (returns a generator of dicts)\nlocal_athletes = client.local_athletes()\n```\n\n\n\n### Activities\n```python\n# Returns a stravaio.Activity object that wraps the \n# [Strava DetailedActivity](https://developers.strava.com/docs/reference/#api-models-DetailedActivity)\nactivity = client.get_activity_by_id(2033203247)\n\n# Dump activity into a JSON friendly dict\nactivity_dict = activity.to_dict()\n\n# Store activity locally (~/.stravadata/activities_\u003cathlete_id\u003e/activity_\u003cid\u003e.json)\nactivity.store_locally()\n\n# Get list of athletes activities since a given date (after) given in a human friendly format.\n# Kudos to [Maya: Datetimes for Humans(TM)](https://github.com/kennethreitz/maya)\n# Returns a list of [Strava SummaryActivity](https://developers.strava.com/docs/reference/#api-models-SummaryActivity) objects\nlist_activities = client.get_logged_in_athlete_activities(after='last week')\n\n# Obvious use - store all activities locally\nfor a in list_activities:\n    activity = client.get_activity_by_id(a.id)\n    activity.store_locally()\n\n# List local activities (returns a generator of JSON friendly dicts)\nactivities = client.local_activities(athlete_id=1202065)\n```\n\n### Streams\n```python\n# Returns a stravaio.Streams object that wraps the \n# [Strava StreamSet](https://developers.strava.com/docs/reference/#api-models-StreamSet)\nstreams = client.get_activity_streams(2033203247)\n\n# Access streams using the dot notation\nwatts = streams.watts\n\n# Dump streams into a JSON friendly dict\nstreams_dict = streams.to_dict()\n\n# Store streams locally (~/.stravadata/streams_\u003cathlete_id\u003e/streams_\u003cid\u003e.parquet) as a .parquet file, that can be loaded later using the\n# pandas.read_parquet()\nstreams.store_locally()\n\n```\n\n## Contributors\n\n[Aart Goossens](https://github.com/AartGoossens)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsladkovm%2Fstravaio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsladkovm%2Fstravaio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsladkovm%2Fstravaio/lists"}