Skip to content

A wrapper around gspread with cell and row level functionalities

Notifications You must be signed in to change notification settings

shahriyardx/betterspread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Better Spread

A wrapper around gspread with cell and row level functionalities

Sheet

from betterspread import Sheet, Connection

con = Connection(credentials_path="./credentials.json")
sheet = Sheet(connection=con, sheet_name="Better Sheet")
tab = await sheet.get_tab('Sheet1')

Sheet is a subclass of gsprad's Spreadsheet

get all values

await tab.values() # returns a list of rows

Row

row is a subclass of list, with functionalities like update and clear

row = await tab.get_row(1) # returns a Row
print(row)

update row

await row.update(['new', 'values'])
await row.clear() # clear all value of the row

Cell

cell is a subclass of string, with additional functionalities like update and clear

cell = await tab.get_cell('A1') # returns a Cell
cell = row[0] # same as above

update cell

await cell.update('New cell value')
await cell.clear() # clear value of the cell

About

A wrapper around gspread with cell and row level functionalities

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages