Skip to content

Releases

1.1.0

Choose a tag to compare

@allenporter allenporter released this 24 Nov 15:49

What's Changed

  • chore(deps): update actions/checkout action to v7 by @renovate[bot] in #78
  • feat(client): add max concurrent requests semaphore and timezone cache lock by @allenporter in #81

Full Changelog: 1.0.0...1.1.0

1.0.0

Choose a tag to compare

@allenporter allenporter released this 16 Nov 03:12

Overview

1.0.0 updates python-google-health-api so callers work directly with native Python datetime and timedelta objects instead of parsing Google's raw Protobuf wire strings ("2026-06-22T08:00:00Z", "3600s", "-25200s"), and adds helpers for computing BMI without duplicate API calls.


Upgrading from 0.x (Breaking Changes)

1. Timestamps are now timezone-aware UTC datetime objects (#79)

All physical timestamps across health metrics, activity intervals, sleep sessions, paired devices (last_sync_time), profiles, and subscribers — including .start_time and .end_time on physical-time records — now return datetime.datetime in UTC instead of ISO 8601 strings.

  • Reading data: Remove manual string parsing (such as datetime.fromisoformat(...) or Home Assistant's dt_util.parse_datetime(...)) and use the datetime value directly.
  • Writing data: Pass timezone-aware datetime objects when constructing intervals or samples; .to_dict() automatically serializes them back to Z-normalized RFC 3339 strings for the API.
  • (Note: Date-only daily summary records like DailyRestingHeartRate continue to represent calendar dates via Date.)
# Before (0.x)
start = datetime.fromisoformat(point.data.start_time)

# Now (1.0.0)
start = point.data.start_time  # already datetime(..., tzinfo=UTC)

2. Durations and UTC offsets are now datetime.timedelta objects (#79)

Workout durations, heart-rate zone durations, sedentary and activity-level rollup totals, mobility ground-contact durations, and *_utc_offset fields now return and accept datetime.timedelta instead of Protobuf duration strings like "3600s" or "-25200s".

# Before (0.x)
seconds = float(exercise.active_duration.removesuffix("s"))

# Now (1.0.0)
duration = exercise.active_duration  # datetime.timedelta(minutes=45)

What's New

  • Compute BMI from already-fetched measurements (#80): Applications that already poll weight and height (such as a Home Assistant coordinator) no longer need to make duplicate HTTP requests to calculate BMI:
    • Bmi.from_measurements(weight, height) computes a single Bmi record directly from Weight and Height models.
    • BmiSubApi.compute(weight_points, height_points) aligns timestamps and computes DataPoint[Bmi] records in memory with zero network calls.
    • await api.bmi.list(..., weight_result=..., height_result=...) optionally accepts pre-fetched results while keeping standalone await api.bmi.list() unchanged.
  • Standard library helpers for civil dates and times (#79): Added .from_date() / .to_date(), .from_time() / .to_time(), and .from_datetime() / .to_datetime() conversion methods on Date, TimeOfDay, and CivilDateTime.
  • Improved CLI schema output (#79): google-health-cli schema now exposes camelCase JSON property names and wire-format hints (google-datetime and google-duration).

Full Changelog: 0.10.0...1.0.0

0.10.0

Choose a tag to compare

@allenporter allenporter released this 16 Aug 20:45

What's Changed

  • feat: add HealthApiAccountNotLinkedException for unlinked accounts by @allenporter in #69

Full Changelog: 0.9.0...0.10.0

0.9.0

Choose a tag to compare

@allenporter allenporter released this 16 Aug 17:58

What's Changed

  • chore(deps): update dependency coverage to v7.15.4 by @renovate[bot] in #67
  • feat: add specific exception classes for Google Health API errors by @allenporter in #68

Full Changelog: 0.8.0...0.9.0

0.8.0

Choose a tag to compare

@allenporter allenporter released this 03 Aug 15:22

🌟 Release v0.8.0

This release introduces native support for in-progress (active) sleep sessions and improves sleep query indexing, alongside substantial CLI refactorings and test suite enhancements.

🌙 In-Progress Sleep Session Support (#64)

  • Active Sleep Deserialization: SessionTimeInterval.end_time, OutOfBedSegment.end_time, and SleepStage.end_time are now optional (str | None = None), allowing real-time ongoing sleep sessions (where endTime is null) to be deserialized without type errors.
  • is_in_progress Property: Added Sleep.is_in_progress helper property to easily detect whether a sleep session is actively ongoing.
  • Query Indexing Fix: Updated SLEEP DataType time filter path to sleep.interval.start_time. Queries via api.sleep.list(start_time=...) now return both completed and currently active sleep sessions.

🛠️ CLI Refactoring & Test Infrastructure

  • Modular CLI Architecture: Refactored CLI commands and subcommands into structured submodules.
  • Aiohttp Integration Testing: Upgraded CLI tests to execute against a live aiohttp mock server rather than relying on monkeypatching.
  • Agent & Human DX: Enhanced dry-run execution, raw JSON payload handling, and field masking across all 36 supported Google Health API data types.

What's Changed

  • feat(sleep): support in-progress sleep sessions and query filtering by start_time (#64) by @allenporter in #66
  • refactor: Split CLI commands and tests into modular submodules by @allenporter in #60
  • test: Migrate CLI subcommand tests to use real SDK and aiohttp test server by @allenporter in #62
  • Toolchain & dependency updates (Ruff, Cruft) by @allenporter and @renovate[bot]

Full Changelog: 0.7.0...0.8.0

0.7.0

Choose a tag to compare

@allenporter allenporter released this 20 Jul 15:12

What's Changed

  • feat: add Operations API for retrieving and waiting on long-running operations by @allenporter in #39

Full Changelog: 0.6.0...0.7.0

0.6.0

Choose a tag to compare

@allenporter allenporter released this 19 Jul 23:04

What's Changed

  • feat: Add body height and synthetic BMI support by @allenporter in #16
  • feat: Add oxygen saturation (SpO2) support and fix daily summary filtering by @allenporter in #17
  • feat: Add exercise log support by @allenporter in #18
  • feat: Add ECG and irregular rhythm notification support by @allenporter in #19
  • feat: Add daily respiratory rate and respiratory rate sleep summary support by @allenporter in #20
  • feat: Add daily VO2 max and daily heart rate zones support by @allenporter in #21
  • feat: Add daily sleep temperature derivations support by @allenporter in #22
  • docs: Update README.md to list all 36 supported data types by @allenporter in #23
  • refactor: Sort google_health_api.model all alphabetically by @allenporter in #24
  • feat: Expose all 36 data types at the package root level by @allenporter in #27
  • docs: Define api.py all to place GoogleHealthApi first in documentation by @allenporter in #28
  • docs: Remove duplicate and outdated Attributes section from GoogleHealthApi class docstring by @allenporter in #29
  • docs: Wrap Example usage block in python fenced code blocks in module docstring by @allenporter in #30
  • refactor: Clean up package and module level all exports by @allenporter in #31
  • docs: Restore sub-API classes to api.py all with GoogleHealthApi listed first by @allenporter in #32
  • feat: webhook notification parsing and datatype mapping by @allenporter in #33
  • docs(skills): Add python_best_practices skill by @allenporter in #35
  • feat: Add keyset parsing and signature verification for webhooks by @allenporter in #34
  • feat: WebhookVerifier API with caching by @allenporter in #36

New Contributors

Full Changelog: 0.5.1...0.6.0

0.5.1

Choose a tag to compare

@allenporter allenporter released this 03 Jul 17:12

Full Changelog: 0.5.0...0.5.1

0.5.0

Choose a tag to compare

@allenporter allenporter released this 03 Jul 16:22

Full Changelog: 0.4.0...0.5.0

0.4.0

Choose a tag to compare

@allenporter allenporter released this 02 Jul 23:40

Full Changelog: 0.3.0...0.4.0