skillfed

pygsheets

Google Spreadsheets Python API v4

pygsheets v2.0.6 2.5M downloads/30d#3,023 on PyPI1,544
Permissive license MIT AGING released

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 pygsheets

uv

uv add pygsheets

poetry

poetry add pygsheets

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Office/Business :: Financial :: SpreadsheetTopic :: Software Development :: Libraries :: Python Modules

Tags

google sheets python apiprogrammatic spreadsheet accessgoogle sheets automationpython google sheets libraryspreadsheet cell manipulationgoogle drive spreadsheet controlbatch spreadsheet updates
google-sheetsspreadsheet-automationapi-wrapper

More Python Modules packages