Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shahriyardx/betterspread
A wrapper around gspread with cell and row level functionalities
https://github.com/shahriyardx/betterspread
Last synced: 9 days ago
JSON representation
A wrapper around gspread with cell and row level functionalities
- Host: GitHub
- URL: https://github.com/shahriyardx/betterspread
- Owner: shahriyardx
- Created: 2023-11-19T12:45:09.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-04-16T20:21:40.000Z (7 months ago)
- Last Synced: 2024-09-18T01:16:19.397Z (about 2 months ago)
- Language: Python
- Size: 252 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Better Spread
A wrapper around gspread with cell and row level functionalities## Sheet
```python
from betterspread import Sheet, Connectioncon = 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
```python
await tab.values() # returns a list of rows
```### Row
row is a subclass of list, with functionalities like `update` and `clear`
```python
row = await tab.get_row(1) # returns a Row
print(row)
```### update row
```python
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`
```python
cell = await tab.get_cell('A1') # returns a Cell
cell = row[0] # same as above
```### update cell
```python
await cell.update('New cell value')
await cell.clear() # clear value of the cell
```