It covers both directions properly — batch reads that avoid one call per range, and writes that land on a row or a column you name — so a sheet can be maintained rather than only queried.
A Google Sheets server that works through a service account. It selects a spreadsheet, reads whole sheets or specific ranges, writes cells, appends rows in batches, updates a row by index or a column by key, and creates or deletes sheets.
- A sheet selected to work in, and the sheets in the file listed
- A whole sheet, one range, several ranges at once, or a single cell read back
- A single cell set, a row replaced by its index, or a column updated or inserted
- Rows appended in batches rather than one call each
- Sheets created and deleted, and a range cleared before a refresh
Python 3.10 or newer, a Google Cloud project with the Sheets and Drive APIs enabled, and a service-account JSON key whose path is given to the server through the environment. The spreadsheet has to be shared with the service account's email as an Editor before anything works.
