Registry / gcp / databricks-google-sheets

databricks-google-sheets

JSON →
library0.8.0pypypi✓ verified 85d ago

A Python library for reading and writing Google Sheets data from Databricks notebooks. Version 0.8.0 supports Python >=3.6. It wraps the Google Sheets API and provides a simple DataFrame-centric interface. Releases are infrequent; no breaking changes recently announced.

pip install databricks-google-sheets
INSTALL
IMPORT
SIG · DATABRICKS-GOOGLE-
D
databricks-google-sheets
gcppythonv0.8.0
Install
10.7s avg
Import
Disk
193MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 193MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 10.7s · import 0.000s · 185MB
193MB installed
● package 193MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DatabricksGoogleSheets
from databricks_google_sheets import DatabricksGoogleSheets
from databricks_google_sheets import GoogleSheetsClient

Initialize client with service account credentials and read a sheet into a DataFrame.

from databricks_google_sheets import GoogleSheetsClient import os # Set credentials via environment variables or Databricks secrets scope = ['https://www.googleapis.com/auth/spreadsheets'] creds = GoogleSheetsClient.get_credentials( service_account_key=os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', '') ) client = GoogleSheetsClient(creds) # Read a sheet url = 'https://docs.google.com/spreadsheets/d/your-sheet-id/edit' df = client.read_from_url(url, sheet_name='Sheet1') print(df.head())
Debug
Known issues
gotchaThe library expects a service account key file path, not JSON string. Use absolute path or Databricks secret scope.
fix
Store the key file in DBFS or use Databricks secrets with dbutils.secrets.get() and write to a temp file.
affects: <=0.8.0
gotchaGoogle Sheets API quotas are low for free tier. Frequent writes may exceed limits.
fix
Implement rate limiting or batch updates using gspread directly if needed.
affects: all
deprecatedThe method `write_to_sheet` expects a DataFrame; passing a list may cause silent errors.
fix
Always convert data to pandas DataFrame before calling write_to_sheet.
affects: >=0.5.0
Upgrade
Version history
0.8.0latest on PyPI · released Jan 29, 2023
Audit
Dependencies
google-authrequiredRequired for authentication with Google Sheets API.
gspreadrequiredUnderlying library to interact with Google Sheets.
pandasrequiredUsed to represent data as DataFrames.
Agent activity
33 hits · last 30 days
node
28
OpenAI (training)
1
Resources
databricks-google-sheets — pip install databricks-google-sheets · libregistry