Utilities for working with Google Sheets: establishing a connection, reading data from a sheet, and uploading a DataFrame to Google Sheets with retry support.
Project description
English:
Google Sheets Utils Module
The module provides convenient utilities for working with Google Sheets. Features include establishing a connection to the Google Sheets API, reading data from a sheet, and uploading a DataFrame to Google Sheets with retry support.
Installation
bashCopy codepip install gs-update-utils
Usage
Establishing a Connection
pythonCopy codefrom gs-update-utils import setup_google_sheets
credentials_folder = "path/to/credentials"
credentials_file = "credentials.json"
google_credentials = setup_google_sheets(credentials_folder, credentials_file)
Reading Data from a Sheet
pythonCopy codefrom gs-update-utils import read_gs_table
worksheet_id = "your_worksheet_id"
worksheet_name = "your_worksheet_name"
dataframe = read_gs_table(worksheet_id, worksheet_name, google_credentials)
Uploading DataFrame to Google Sheets
pythonCopy codefrom gs-update-utils import upload_table_to_google_sheet
worksheet_id = "your_worksheet_id"
worksheet_name = "your_worksheet_name"
upload_table_to_google_sheet(dataframe, worksheet_id, worksheet_name, google_credentials)
Русский:
Модуль Google Sheets Utils
Модуль предоставляет удобные утилиты для работы с Google Sheets. Возможности включают установку соединения с API Google Sheets, чтение данных из листа и загрузку DataFrame в Google Sheets с поддержкой повторных попыток.
Установка
bashCopy codepip install gs-update-utils
Использование
Установка соединения
pythonCopy codefrom gs-update-utils import setup_google_sheets
credentials_folder = "path/to/credentials"
credentials_file = "credentials.json"
google_credentials = setup_google_sheets(credentials_folder, credentials_file)
Чтение данных из листа
pythonCopy codefrom gs-update-utils import read_gs_table
worksheet_id = "your_worksheet_id"
worksheet_name = "your_worksheet_name"
dataframe = read_gs_table(worksheet_id, worksheet_name, google_credentials)
Загрузка DataFrame в Google Sheets
pythonCopy codefrom gs-update-utils import upload_table_to_google_sheet
worksheet_id = "your_worksheet_id"
worksheet_name = "your_worksheet_name"
upload_table_to_google_sheet(dataframe, worksheet_id, worksheet_name, google_credentials)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gs_update_utils-1.0.4.tar.gz.
File metadata
- Download URL: gs_update_utils-1.0.4.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eba710c330d8a8c0048c408439f5bfa3191230cac0856b422272f89e56c5a13d
|
|
| MD5 |
43167431175c8369fa98e396aceffc98
|
|
| BLAKE2b-256 |
e6d77e5ff2553d94d22719902de65436b185244a869100ad456ceeb520b62450
|
File details
Details for the file gs_update_utils-1.0.4-py3-none-any.whl.
File metadata
- Download URL: gs_update_utils-1.0.4-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
853f74574ccca9b2aecbee247c38f95c28ec22dbf3bd5c9931fb8b0cb933220c
|
|
| MD5 |
c784300fd5fc54d75d95f607ab186392
|
|
| BLAKE2b-256 |
e4fd8b4f6a7ef48083d7c40c9bb3f5a8d5cbf4f1af340578b08651c3dd2a74d3
|