gsheets
Pythonic wrapper for the Google Sheets API
What it is and what it does
gsheets is a lightweight Python wrapper around the Google Sheets API v4 that simplifies reading and manipulating Google Spreadsheets from scripts. It abstracts away the low-level API calls, letting you fetch spreadsheets by ID or URL, access individual cells or ranges using spreadsheet coordinates (like 'A1') or zero-based positions, and iterate over worksheets and spreadsheets by title or ID. The package depends on google-api-python-client and oauth2client to handle OAuth authentication and API communication.
Typical workflows include fetching cell values, exporting worksheets to CSV files with custom naming schemes, and converting worksheet data into pandas DataFrames for data analysis. It targets developers and researchers who need programmatic access to Google Sheets without building authentication and API plumbing from scratch.
Use it for:
- Fetch data from a shared Google Sheet into a Python script for automated processing or reporting.
- Export multiple worksheets from a spreadsheet to CSV files with names derived from sheet titles.
- Load Google Sheet data directly into a pandas DataFrame for data analysis and manipulation.
- Build a data pipeline that reads from Google Sheets, transforms the data, and writes results elsewhere.
- Iterate over all spreadsheets in a Google Drive account to audit or aggregate data across multiple sheets.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
gsheets provides a Python wrapper around the Google Sheets API v4 to read spreadsheet data, access cells by coordinate or position, and export worksheets to CSV or pandas DataFrames.
Yes, if you need straightforward programmatic access to Google Sheets and are comfortable with OAuth setup. The low install friction and permissive license make it a reasonable choice. However, note that oauth2client is deprecated and the latest release is from 2022; verify compatibility with your Google account setup and current API versions before relying on it for production workflows.
Install
gsheets on PyPI
pip
pip install gsheetsuv
uv add gsheetspoetry
poetry add gsheetsInstalling gsheets
Before you install
Low friction: pure Python wheel with only two runtime dependencies (google-api-python-client and oauth2client). Maintenance is active with recent commits, though the latest release was in 2022.
License in practice
MIT license is permissive; you can use, modify, and distribute gsheets freely in commercial and private projects without restriction.
Quickstart
pip install gsheets
from gsheets import Sheets
sheets = Sheets.from_files('~/client_secrets.json', '~/storage.json')
s = sheets.get('https://docs.google.com/spreadsheets/d/...')
value = s.sheets[0]['A1']
Requires OAuth 2.0 client credentials (JSON file) from Google Developers Console and prior enablement of the Sheets and Drive APIs for your Google account.
Verify before relying
- Whether oauth2client (a deprecated library as of 2017) continues to work reliably with current Google authentication flows.
- Current state of compatibility with modern versions of google-api-python-client given the 2022 release date.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — google-api-python-client, oauth2client |
| Maintenance | actively maintained — 1,524 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 128,490/month — #11,705 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gsheets-0.6.1-py3-none-any.whl
Keywords: spreadhseets, google, api, v4, wrapper, csv, pandas
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
gspread-pandasBridges Google Sheets and pandas DataFrames,…
permissive · top 15,000 on PyPI
shillelaghShillelagh lets you query APIs, files,…
permissive · top 5,000 on PyPI
pygsheetspygsheets provides a Python interface to Google…
permissive · top 5,000 on PyPI
gspread-dataframeConverts between Google Sheets worksheets and…
permissive · top 5,000 on PyPI
df2gspreadTransfers tabular data between Google…
copyleft · top 15,000 on PyPI
gspreadgspread provides a Python interface to read,…
permissive · top 1,000 on PyPI
xlsx2csvConverts XLSX spreadsheet files to CSV format,…
permissive · top 5,000 on PyPI
gspread-asyncioProvides an asyncio wrapper around the gspread…
permissive · top 15,000 on PyPI
gspread-formattingAdds complete cell formatting support to…
permissive · top 5,000 on PyPI
aspose-cellsAspose.Cells for Python via Java is a library…
unclear · top 15,000 on PyPI