google-api-python-client-stubs
Type stubs for google-api-python-client
What it is and what it does
This package provides type stubs for google-api-python-client, the official Python library for accessing Google APIs. It bridges the gap between the library's dynamic nature—where resources and methods are attached at runtime—and static type checkers, enabling both type checking and improved editor autocomplete.
The stubs are generated automatically from Google's Discovery Documents and cover all API services and versions. Because the underlying library is highly dynamic (resources are instances of a single class with dynamically attached methods, and requests/responses are dictionaries), the stubs define TypedDicts and classes that exist only in the stub files, not in the runtime library. This means explicit type annotations must use TYPE_CHECKING guards or string annotations to avoid runtime crashes.
Use it for:
- Enable type checkers to validate code using google-api-python-client without runtime errors.
- Get IDE autocomplete and inline documentation for API methods and parameters.
- Explicitly annotate function arguments and return types when working with Google APIs.
- Catch API usage errors at development time rather than at runtime.
- Improve code maintainability in projects that integrate multiple Google services.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for google-api-python-client, enabling static type checking and editor autocomplete for Google API interactions.
Yes, if you use google-api-python-client and want static type checking or better IDE support. Install it alongside google-api-python-client; it has low friction and no runtime overhead. Be aware that explicit type annotations require TYPE_CHECKING blocks or string annotations to avoid crashes.
Install
google-api-python-client-stubs on PyPI
pip
pip install google-api-python-client-stubsuv
uv add google-api-python-client-stubspoetry
poetry add google-api-python-client-stubsInstalling google-api-python-client-stubs
Before you install
Low install friction; pure stub package with minimal dependencies (google-api-python-client, types-httplib2, typing-extensions). Actively maintained with recent release.
License in practice
Apache-2.0 permissive license allows broad use, modification, and distribution with minimal restrictions.
Quickstart
pip install google-api-python-client-stubs
# In your code with type checking enabled:
from __future__ import annotations
from google-api-python-client import discovery
service = discovery.build('sheets', 'v4', credentials=creds)
Requires Python 3.7+. Types are stub-only and cannot be imported at runtime; use TYPE_CHECKING blocks or string annotations for explicit type annotations.
Verify before relying
- Whether stub completeness and accuracy match current google-api-python-client API surface
- Performance impact of type inference on large codebases using many Google API services
- Frequency of stub updates relative to google-api-python-client release cycle
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — google-api-python-client, types-httplib2, typing-extensions |
| Maintenance | actively maintained — 34 days since the last release |
| First released | |
| Downloads | 4,367,935/month — #2,318 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: google_api_python_client_stubs-1.39.0-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
google-auth-stubsProvides type stubs for the google-auth…
permissive · top 5,000 on PyPI
quantconnect-stubsProvides type stubs for QuantConnect's Lean…
permissive · top 15,000 on PyPI
googleapis-common-protos-stubsProvides type stubs for…
permissive · top 15,000 on PyPI
celery-typesProvides type stubs for Celery and related…
permissive · top 5,000 on PyPI
django-stubsProvides type stubs and a mypy plugin to enable…
permissive · top 5,000 on PyPI
pika-stubsProvides type stubs for the pika RabbitMQ…
permissive · top 15,000 on PyPI
google-auth-oauthlib-stubsProvides type stubs for google-auth-oauthlib to…
permissive · top 15,000 on PyPI
msgpack-typesProvides type stubs for msgpack to enable…
permissive · top 15,000 on PyPI
types-google-cloud-ndbProvides type stubs for google-cloud-ndb,…
permissive · top 15,000 on PyPI
types-gdbProvides type stubs for GDB's Python API,…
permissive · top 15,000 on PyPI