Skip to content

Commit d09ba2d

Browse files
committed
Add Google Sheets persister skeleton implementation (#213)
1 parent 1021e96 commit d09ba2d

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import json
2+
from burr.core.persistence import BaseStatePersister
3+
4+
5+
class GoogleSheetsPersister(BaseStatePersister):
6+
"""
7+
Persister that stores Burr state in Google Sheets.
8+
"""
9+
10+
def __init__(self, spreadsheet_id):
11+
self.spreadsheet_id = spreadsheet_id
12+
13+
def save(self, app_id: str, partition_key: str, state: dict):
14+
"""
15+
Save state to Google Sheets
16+
"""
17+
print("Saving state to Google Sheets")
18+
19+
def load(self, app_id: str, partition_key: str):
20+
"""
21+
Load state from Google Sheets
22+
"""
23+
print("Loading state from Google Sheets")
24+
25+
def list(self, app_id: str):
26+
"""
27+
List partitions
28+
"""
29+
return []

0 commit comments

Comments
 (0)