Description
pygsheets is a Python library for Google Sheets, built on the Google Sheets API v4. It lets you open, create, delete and share spreadsheets by title or key, and it provides models for spreadsheets, worksheets, cells and data ranges. You can control spreadsheet permissions, set cell formats, text formats and colors, write notes, and work with named and protected ranges. It also supports data validation such as checkboxes and drop-downs, conditional formatting, and batch reads and writes through get_values_batch and update_values_batch. If you work with pandas, you can use DataFrames directly. To connect, you create OAuth2 credentials in the Google Developers Console for the Google Sheets API and the Drive API, and save the file as client_secret.json in your project folder. The README recommends installing from GitHub, and it also provides a stable release on PyPI. The latest update it lists is version 2.0.5. The full documentation covers the rest of the API.…
Highlights
- Open, create, delete and share spreadsheets
- Cell, worksheet and data range models
- Cell formats, notes, named and protected ranges
- Data validation and conditional formatting
- Pandas DataFrame integration
Ratings & Reviews
No ratings yet
Be the first to rate Pygsheets.
People also visit
Pygsheets FAQ
What is pygsheets?
A Python library for working with Google Sheets through the Google Sheets API v4.
How do I install it?
The README recommends installing from GitHub, and it also offers a stable release from PyPI.
What do I need before my first run?
OAuth2 credentials from the Google Developers Console for the Sheets and Drive APIs, saved as client_secret.json in your project folder.
Does it work with pandas?
Yes. You can use pandas DataFrames directly with a spreadsheet.
What are the best Pygsheets alternatives?
Popular alternatives to Pygsheets include Gspread, SheetDB and Sheetson. See all Pygsheets alternatives









