pygsheets
Google Spreadsheets Python API v4
What it is and what it does
pygsheets wraps the Google Sheets API v4 in a Pythonic interface, letting you read, write, format, and manage Google Sheets without wrestling with raw API calls. It models spreadsheets as intuitive objects—spreadsheet, worksheet, cell, and data range—so you can open sheets by title or key, update cell values and formatting, create named ranges, apply conditional formatting, and share sheets with others using straightforward method calls.
The library is useful for automation tasks like syncing data between Python and Google Sheets, bulk updates, or building tools that treat Sheets as a lightweight database. It supports batch operations, cell formatting, data validation, and can integrate with pandas DataFrames. However, maintenance is aging; the latest release was in 2022, so expect infrequent updates and potential compatibility gaps with newer Google API changes.
Use it for:
- Automate bulk data entry or updates to Google Sheets from Python scripts or data pipelines.
- Share computed results or numpy arrays with collaborators by writing them directly to a shared spreadsheet.
- Build a lightweight data management tool that uses Google Sheets as a backend store.
- Apply formatting, validation rules, and formulas to sheets programmatically at scale.
- Extract sheet data as pandas DataFrames for analysis or export to CSV.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pygsheets provides a Python interface to Google Sheets via the Google Sheets API v4, letting you open, create, modify, and share spreadsheets programmatically with intuitive cell, worksheet, and spreadsheet objects.
Yes, if you need to automate Google Sheets workflows and are comfortable with aging maintenance. The library is stable and has no known vulnerabilities, low install friction, and a permissive MIT license. However, be aware that updates are infrequent (last release 2022); if Google's API changes significantly or you need cutting-edge features, you may need to fork or seek an actively maintained alternative.
Install
pygsheets on PyPI
pip
pip install pygsheetsuv
uv add pygsheetspoetry
poetry add pygsheetsInstalling pygsheets
Before you install
Installation is straightforward with low friction; the package depends on google-api-python-client and google-auth-oauthlib. Maintenance is aging—the latest release was in 2022 and the last commit was 2025-06-10, so updates are infrequent but the repository remains active.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute pygsheets freely as long as you retain the license notice.
Quickstart
pip install pygsheets
import pygsheets
gc = pygsheets.authorize()
sh = gc.open('my sheet')
wks = sh.sheet1
wks.update_value('A1', 'Hello')
Requires OAuth2 credentials from Google Developers Console (client_secret.json) for Google Sheets API and Drive API access.
Verify before relying
- Whether enum34 dependency is still necessary for modern Python versions listed in classifiers (3.5–3.10).
- Current state of pandas integration support and whether it is actively maintained.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — google-api-python-client, google-auth-oauthlib, enum34 |
| Maintenance | aging — 1,353 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,521,153/month — #3,023 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pygsheets-2.0.6-py3-none-any.whl
Keywords: spreadsheets, google-spreadsheets, pygsheets
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
gspreadgspread provides a Python interface to read,…
permissive · top 1,000 on PyPI
smartsheet-python-sdkA Python client library for the Smartsheet API…
permissive · top 5,000 on PyPI
gsheetsgsheets provides a Python wrapper around the…
permissive · top 15,000 on PyPI
gspread-pandasBridges Google Sheets and pandas DataFrames,…
permissive · top 15,000 on PyPI
aspose-cells-pythonAspose.Cells for Python via .NET creates,…
unclear · top 15,000 on PyPI
numbers-parserRead, edit, and write Apple Numbers spreadsheet…
permissive · top 5,000 on PyPI
gspread-formattingAdds complete cell formatting support to…
permissive · top 5,000 on PyPI
pyxlsxProvides dictionary-like read and write access…
permissive · top 15,000 on PyPI
mcp-google-sheetsAn MCP server that bridges AI clients like…
unclear · top 15,000 on PyPI
gspread-dataframeConverts between Google Sheets worksheets and…
permissive · top 5,000 on PyPI