Skip to content

Add Google Sheets state persister - #932

Open
prvn0x wants to merge 1 commit into
apache:mainfrom
prvn0x:feat/213-google-sheets-persister
Open

Add Google Sheets state persister#932
prvn0x wants to merge 1 commit into
apache:mainfrom
prvn0x:feat/213-google-sheets-persister

Conversation

@prvn0x

@prvn0x prvn0x commented Sep 12, 2026

Copy link
Copy Markdown

Closes #213

Adds a state persister backed by a Google Sheets worksheet, so applications can
persist and reload state in a store that is human-readable and shareable without
running a database. This builds on the earlier work in #670 by @goutamk09 and
addresses the review feedback left there.

Changes

  • burr/integrations/persisters/b_google_sheets.pyGoogleSheetsBasePersister,
    implementing BaseStatePersister. State is stored one row per step, keyed by
    (partition_key, app_id, sequence_id, position), with a header row written by an
    idempotent initialize().
  • pyproject.toml — a google-sheets extra so gspread stays an optional
    dependency, wired into the tests extra.
  • docs/reference/persister.rst — table entry and autoclass reference.
  • tests/integrations/persisters/test_b_google_sheets.py — 16 unit tests.

Specific points raised in the review of #670:

  • load() scans to the last matching row rather than the first, so state is
    still readable after repeated saves to the same app.
  • All reads go through a single _data_rows() helper, so the header row is skipped
    consistently rather than in some methods but not others.
  • save() and load() match the BaseStatePersister signatures, including
    sequence_id.
  • No spreadsheet IDs or credentials are committed.

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

Closes apache#213

Co-authored-by: goutamk09 <goutamk09@users.noreply.github.com>
@github-actions github-actions Bot added area/storage Persisters, state storage area/integrations External integrations (LLMs, frameworks) area/website burr.apache.org website area/ci Workflows, build, release scripts labels Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Workflows, build, release scripts area/integrations External integrations (LLMs, frameworks) area/storage Persisters, state storage area/website burr.apache.org website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Burr -- Google Sheets Persister

1 participant