Skip to content

A persistent dict wrapper around Google Sheets using gspread

License

Notifications You must be signed in to change notification settings

Ycmelon/gspreaddict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gspreaddict Python version >= 3.6 GitHub Actions tests badge Coverage Status

A persistent dict wrapper around Google Sheets using gspread

import gspread
from gspreaddict import GspreadDict

gc = gspread.service_account()  # https://docs.gspread.org/en/latest/oauth2.html
db = GspreadDict(gc.open("My spreadsheet").sheet1)

# Keys can be str, and values can be str | None
db["colour"] = "blue"
db["shape"] = "triangle"
db["size"] = "large"
print(db["shape"])  # -> triangle

for key, value in db.items():
    print(key, value)  # colour blue    shape triangle    size large

print(len(db))  # 3

Credits

License

GNU General Public License v3.0

About

A persistent dict wrapper around Google Sheets using gspread

Topics

Resources

License

Stars

Watchers

Forks

Languages