SlySheets.sheets#
Google Sheets API and types. https://developers.google.com/sheets/api/guides/concepts
Functions
|
Convert A1 notation column letter(s) to it's corresponding index number. |
|
Convert a number to it's corresponding A1 notation column letter(s). |
|
Convert a DateTimeRenderOption.Lotus123 formatted datetime value to a python datetime object. |
Classes
|
|
|
|
|
0-indexed, inclusive, integer bounds for a range None means unbounded |
|
How to format cells containing date/time/datetimes. |
|
Whether to insert new rows when updating a range, or overwrite any existing values. |
|
Whether elements of the returned value array are columns or rows. |
|
|
|
|
|
Class for handling sheets |
|
Whether to interpret the new value literally, or to parse the same as a user typing it in. |
|
What format to return cells in, since formula and display content do not always match. |
- class SlySheets.sheets.Scope[source]#
Bases:
object
- SheetsReadOnly = 'https://www.googleapis.com/auth/spreadsheets.readonly'#
- Sheets = 'https://www.googleapis.com/auth/spreadsheets'#
- class SlySheets.sheets.ValueRenderOption(value)[source]#
Bases:
Enum
What format to return cells in, since formula and display content do not always match. From https://developers.google.com/sheets/api/reference/rest/v4/ValueRenderOption.
- FORMATTED = 'FORMATTED_VALUE'#
- PLAIN = 'UNFORMATTED_VALUE'#
- FORMULA = 'FORMULA'#
- class SlySheets.sheets.ValueInputOption(value)[source]#
Bases:
Enum
Whether to interpret the new value literally, or to parse the same as a user typing it in. From https://developers.google.com/sheets/api/reference/rest/v4/ValueInputOption.
- RAW = 'RAW'#
- USER = 'USER_ENTERED'#
- class SlySheets.sheets.InsertDataOption(value)[source]#
Bases:
Enum
Whether to insert new rows when updating a range, or overwrite any existing values. From https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append#InsertDataOption.
- OVERWRITE = 'OVERWRITE'#
- INSERT = 'INSERT_ROWS'#
- class SlySheets.sheets.MajorDimension(value)[source]#
Bases:
Enum
Whether elements of the returned value array are columns or rows. From https://developers.google.com/sheets/api/reference/rest/v4/Dimension.
- ROW = 'ROWS'#
- COLUMN = 'COLUMNS'#
- class SlySheets.sheets.DateTimeRenderOption(value)[source]#
Bases:
Enum
How to format cells containing date/time/datetimes. From https://developers.google.com/sheets/api/reference/rest/v4/DateTimeRenderOption.
- Lotus123 = 'SERIAL_NUMBER'#
- Formatted = 'FORMATTED_STRING'#
- SlySheets.sheets.indexToCol(index)[source]#
Convert a number to it’s corresponding A1 notation column letter(s).
- SlySheets.sheets.colToIndex(letters)[source]#
Convert A1 notation column letter(s) to it’s corresponding index number.
- class SlySheets.sheets.CellRange(a1)[source]#
Bases:
object
0-indexed, inclusive, integer bounds for a range None means unbounded
Initialise from A1 notation.
- Parameters:
a1 (str) –
- SlySheets.sheets.sheets_date(timestamp, tz)[source]#
Convert a DateTimeRenderOption.Lotus123 formatted datetime value to a python datetime object.
- class SlySheets.sheets.Page(page_meta, sheet)[source]#
Bases:
object
- Parameters:
sheet (Spreadsheet) –
- await rows(start, end, n_cols=None)[source]#
Get the content of a range of rows, inclusive, zero-indexed
- class SlySheets.sheets.Spreadsheet(auth, sheet_id)[source]#
Bases:
WebAPI
Class for handling sheets
- Parameters:
auth (OAuth2) –
sheet_id (str) –