Stravalib

Latest version: v2.1

Safety actively analyzes 685525 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

2.1.0

Added

- Add: update activities doc page and migrate to myst (lwasser, 508)
- Add: `get_athlete_zones` method on client (enadeau, 508)
- Add: tutorial on authenticating with Strava + stravalib + update get-started & docs fixes (lwasser, 317)
- Add: inheritance diagrams & explain overrides (lwasser, 531)
- Add: update examples to stravalib 2.x (lwasser, 581)
- Add: rename RST files to MD (lwasser, 589)

Fixed

- Fix: some overrides moved from `DetailedActivity` to `SummaryActivity` (enadeau, 570)
- Fix: ensures `ActivityType` instances can be compared to str (jsamoocha, 583)
- Fix: moved several undocumented attributes from `DetailedActivity` to `SummaryActivity` (jsamoocha, 594)
- Fix: broken link (lwasser, 597)
- Fix: do not create PDF files in CI (lwasser, 563)
- Fix: banner URL to relative path (lwasser, 565)
- Fix: missing comma in all-contributors JSON config (lwasser, 573)
- Fix: tiny update to streaming data documentation (lwasser, 588)
- Fix: summary activity undocumented attributes (jsamoocha, 595)
- Fix: update pre-commit configuration (lwasser, 591)

Changed

- Change: Strava API update (github-actions, 592)

Contributors to this release
yotam5 made their first contribution to stravalib!
jsamoocha, lwasser, enadeau, yotam5

2.0.0

Major Changes in This Release

1. **Breaking:** Added support for Pydantic 2.x; 1.x behavior is no longer supported.
Refer to [Pydantic’s V2 migration guide](https://docs.pydantic.dev/latest/migration/)
if you use extensions of Stravalib model classes or Pydantic’s serialization
mechanisms (`parse_obj()`, `dict()`, `json()`).

2. Removed deprecated (de-)serialization methods `deserialize()`, `from_dict()`,
and `to_dict()`. Use [Pydantic’s serialization mechanisms](https://docs.pydantic.dev/latest/concepts/serialization/).

3. Renamed `unithelper` module to `unit_helper`. Helper functions like `feet()`
and `miles()` now return a Pint `Quantity` object.

4. Introduced new types for distances, velocities, durations, and time zones.
`activity.distance` now returns a `Distance` type. Retrieve distance in meters
with `activity.distance` or as a `Quantity` using `activity.distance.quantity`.

Please see the migration guide in our docs for more details on the changes.

Added

- Add: `naive_datetime()` test to the `pydantic-v2 branch`. (bmeares, 522)
- Add: custom types that pass static type checks (jsamoocha, 534)
- Add: Strava type hierarchy for Activity type (jsamoocha, 505)
- Add: Athlete stats (jsamoocha, 507)
- Add: Summary segments (jsamoocha, 509)
- Add: SummarySegmentEffort superclass (jsamoocha, 518)
- Add: test for latlon values (lwasser, 516)
- Add: correct type returns following clubs/{id} & clubs/{id}/activities spec (lwasser, 519)

Fixed

- Fix: Update enhanced types doc (jsamoocha, 546)
- Fix: Replace invariant with covariant container types (lwasser, jsamoocha, 510)
- Fix: generated model using Pydantic v2 (jsamoocha, 495)
- Fix: Gear and Athlete type hierarchies (+ naive_datetime typing fixes) (jsamoocha, 526)
- Fix: docstrings in model.py (lwasser, 484)
- Fix: return types -- athlete clubs endpoint (lwasser, 517)
- Fix: Updates for activities/id endpoint 🙈 (lwasser, 520)
- Fix: Activities/{id}/zones & Laps (lwasser, 524)
- Fix: Rename `unithelper.py` --> `unit_helper.py` (lwasser, 535)
- Fix: Update & check photos endpoint (lwasser)
- Fix: Photos endpoint cleanup (lwasser, 540)
- Fix: Activity Comment check / cleanup (lwasser, 541)
- Fix: Migrate to covariant types to fix typing (lwasser, 530)
- Fix: Typing upgrade to Python 3.10+ (lwasser, 547)
- Fix(docs): Cleanup API docs & add migration guide (jsamoocha, lwasser, 537)
- Fix(docs): Clean up reference docs (lwasser, 537, 545)

Removed

- Remove: backward compatibility mixin (jsamoocha, 503)
- Remove: deprecated client methods (lwasser, 514)

Contributors to this release

jsamoocha, lwasser, bmeares

- bmeares made their first contribution in https://github.com/stravalib/stravalib/pull/522 :sparkles:

1.7

Added
- Add: Strava API change - Route objects have a new waypoints attribute (bot, 480)

Fixed
- Fix: Docs - add contributing section to top bar for easier discovery and a few small syntax fixes in the docs (lwasser)
- Fix: `Manifest.in` file - remove example dir (lwasser, 307)
- Fix: Codecov report wasn't generating correctly (lwasser, 469)
- Fix: Add sport type to create_activity and create type validator method. NOTE: this fix contains a breaking change in `Client.create_activity()` activity_type is now an optional keyword argument rather than a required positional argument (lwasser, 279)
- Fix: Fixes the Strava API update bot (jsamoocha, 477)
- Fix: Cleanup dependencies to only use `pyproject.toml` (lwasser, 466)
- Fix: use `parse_obj` rather than deserialize internally where possible (lwasser, 358)

Removed
- Remove: functional test suite from stravalib (lwasser, 457)
- Remove: `client.delete_activity` method is no longer supported by Strava (lwasser, 238)
- Remove/Add: Drop Python 3.9, add Python 3.12 (lwasser, 487)

Breaking Changes
If you have been using the `client.delete_activity` method then your code will
no longer work as this method was removed due to being deprecated by Strava. We also are dropping support for Python 3.9 (end of life / no more security fixes in October 2024 and now only getting security fixes) in this release and adding support for 3.12.

Contributors to this release

jsamoocha, lwasser, stravalib bot :)

1.6

Added
- Add: Support for Strava's new read rate limits (jsamoocha, 446)
- Add: Improved handling of unexpected activity types (jsamoocha, 454)

Fixed
- Fix: Forgot to update model CI build to follow new src layout (lwasser, 438)
- Fix: Type annotation on field that are of type timedelta are now correct (enadeau, 440)
- Fix: Correct type for ActivityPhoto sizes attribute (jsamoocha, 444)
- Fix: codespell config - ignore resources dir in tests (lwasser, 445)
- Fix: Ignore documentation autogenerated api stubs (lwasser, 447)

Breaking Changes

A potentially breaking change is that the RateLimiter's `__call__()` method now has
an additional `method` argument representing the HTTP method used for that request.
Existing custom rate limiters from users must be updated to this change.

Contributors to this release

jsamoocha endeau, lwasser,

1.5

Added

- Stravalib now includes types annotation, the package is PEP 561 compatible (enadeau, 423)
- Add: Add nox to run tests, build docs, build package wheel/sdist(lwasser, 395, 397)
- Type annotation for all files in the library (enadeau, 384, 415)
- Add blacken-docs and codespell to pre-commit & apply on docs (lwasser, 391)

Fixed

- Allow parsing of activity with segment of type other that Run and Ride (JohnScolaro, 434)

Changed

- Infra: Replace flake8 and isort by ruff (enadeau, 430)

Removed

- Remove python 3.8 support following NEP-29 (enadeau, 416)

Contributors to this release

endeau, lwasser, JohnScolaro

1.4

Fixed

- Apply flake8 and numpy docstrings to limiter & protocol (lwasser, 326)
- Update client's stream method to warn when using unofficial parameters (enadeau, 385)
- Fix docstring in SleepingRateLimitRule (enadeau)
- Fix: rename `SubscriptionCallback.validate` -> `SubscriptionCallback.validate_token` to avoid conflict with `pydantic.BaseModel` (lwasser, 394)
- Fix: docstrings in model.py, documentation errors, findfonts warning suppression by removing opengraph (temporarily), typing updates (lwasser, 387)
- Fix: read the docs is breaking due to pydantic json warnings, also update python version on build and sync pr previews (lwasser, 412)
- Fix: update master to main in all builds (lwasser)

Added

- Type annotation to client file (enadeau, 384)
- Add: issue templates for easier debugging / guide users (lwasser, 408)
- Fix: read the docs is breaking due to pydantic json warnings, also update python version on build and sync pr previews (lwasser, 412)
- Fix: update master to main in all builds (lwasser)

Contributors to this release

endeau, lwasser, jsamoocha

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.