gspread-formatting
Complete Google Sheets formatting support for gspread worksheets
Decision gist · record as of 2026-08-14
Yes. The package is stable, actively maintained, has no security vulnerabilities, and solves a real gap in gspread's capabilities. If you need to programmatically format Google Sheets beyond basic data entry, this is the standard tool. The low install friction and permissive license make adoption straightforward.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires an authenticated gspread worksheet object; you must have gspread set up with Google Sheets API credentials.
- Low install friction with a single runtime dependency on gspread.
- The package is in production/stable status and actively maintained, with a recent release in March 2025 and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
last release 2025-03-07 (525 days) · last repo commit 2025-03-28 · 194 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,186,386 downloads/mo, #4,250 on PyPI
Alternatives
Verify before relying
pip install gspread-formatting
from gspread_formatting import cellFormat, color, format_cell_range
fmt = cellFormat(
backgroundColor=color(1, 0.9, 0.9),
textFormat={'bold': True},
horizontalAlignment='CENTER'
)
format_cell_range(worksheet, 'A1:J1', fmt)- Whether the package supports all v4 Sheets API CellFormat features or only a subset of them.
- Performance characteristics when formatting large ranges or many cells in a single operation.
- Compatibility with recent versions of gspread and any breaking changes in the Sheets API.
What it is and what it does
gspread-formatting extends the gspread library with a complete API for styling Google Sheets. It wraps the v4 Sheets API's CellFormat specification, exposing all formatting components—background colors, text formatting, alignment, borders, and more—as Python classes that can be composed and applied to cell ranges. The package also handles worksheet-level operations like freezing rows and columns, setting row heights and column widths, managing data validation rules, and supporting right-to-left text direction.
The library is designed to work seamlessly with gspread's worksheet objects. You build format objects by instantiating classes with camelCase keyword arguments, then apply them to ranges using functions like format_cell_range or format_cell_ranges. For users working with Pandas DataFrames, a separate dataframe module provides convenience functions to format worksheets based on DataFrame structure. Format objects are composable, comparable, and support set-like operations (union, difference, intersection).
Use it for
- Style header rows with background colors, bold text, and centered alignment in a report spreadsheet.
- Apply data validation rules to restrict cell inputs to predefined lists or numeric ranges.
- Format a worksheet populated from a Pandas DataFrame with custom header colors and number formatting.
- Freeze the first row and first column of a large data table for easier navigation.
- Set column widths and row heights to match content and improve readability of exported data.
- Apply conditional formatting rules to highlight cells based on values or conditions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is stable, actively maintained, has no security vulnerabilities, and solves a real gap in gspread's capabilities. If you need to programmatically format Google Sheets beyond basic data entry, this is the standard tool. The low install friction and permissive license make adoption straightforward.
Install
gspread-formatting on PyPI
Before you install
Low install friction with a single runtime dependency on gspread. The package is in production/stable status and actively maintained, with a recent release in March 2025 and no known vulnerabilities.
Requires an authenticated gspread worksheet object; you must have gspread set up with Google Sheets API credentials.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install gspread-formatting
from gspread_formatting import cellFormat, color, format_cell_range
fmt = cellFormat(
backgroundColor=color(1, 0.9, 0.9),
textFormat={'bold': True},
horizontalAlignment='CENTER'
)
format_cell_range(worksheet, 'A1:J1', fmt)
Verify before relying
- Whether the package supports all v4 Sheets API CellFormat features or only a subset of them.
- Performance characteristics when formatting large ranges or many cells in a single operation.
- Compatibility with recent versions of gspread and any breaking changes in the Sheets API.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagegspread |
| Maintenance | Aging 525 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,186,386 / month, #4,250 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Office/Business :: Financial :: SpreadsheetTopic :: Software Development :: Libraries :: Python Modules |
Evidence: gspread_formatting-1.2.1-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “google sheets cell formatting”
- gspread-formattingAdds complete cell formatting support to gspread, enabling you to…
- pygsheetspygsheets provides a Python interface to Google Sheets via the Google…
- gspreadgspread provides a Python interface to read, write, format, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also gspread · gspread-pandas · gspread-dataframe · pygsheets · gspread-asyncio · gsheets · df2gspread · columnar · aspose-cells-python