You can simply do
$ pip install sheetsu
from sheetsu import SheetsuClient
client = SheetsuClient("<spreadsheed_id>")
If you have HTTP Basic Authentication turned on for your API, you should pass api_key
and api_secret
here, like:
from sheetsu import SheetsuClient
client = SheetsuClient("<spreadsheed_id>", api_key="<api_key>", api_secret="<api_secret>")
Sheetsu gives you the ability to use full CRUD on your Google Spreadsheet.
More information can be found here
# Read all available rows from default sheet
client.read()
# Read only first two 2 rows
client.read(limit=2)
# Read only 2 rows, starting from the 3'rd
client.read(limit=2, offset=2)
# Read 3 rows from "Sheet2"
client.read(sheet="Sheet2", limit=3)
More information can be found here
# Search on default sheet for all names
client.search(name="*")
# Search on default sheet for score = 42, but return only the first result
client.search(score=42, limit=1)
# Search on "Sheet2" for name "User", but ignore casing
client.search(sheet="Sheet2", name="User", ignore_case=True)
More information can be found here
# Create a new entry on default sheet
client.create_one(name="New User", score=0)
# Create two new entries on sheet "Sheet2"
client.create_many(sheet="Sheet2", *[dict(name="onename"), dict(name="othername")])
More information can be found here
# Update on default sheet, "Peter's" score to 120
client.update(column="name", value="Peter", data=dict(score=120))
More information can be found here
# Delete "Peter" user from default sheet
client.delete(column="name", value="Peter")
Start by cloning this repo:
$ git clone
$ mkvirtualenv sheetsu --python=python3
[sheetsu] $ pip install -r requirements.txt
Run all tests and generate coverage report
$ coverage run --source=sheetsu/ setup.py test
$ coverage report
Bug, issues or features are welcome in this project. Feel free to open an issue or a pull request. Your help is highly appreciated.
- Fixed status code verification to allow all "2*" codes.
- Added tests to all available Resources.
- Initial working version.