skillfed

google-api-python-client-stubs

Type stubs for google-api-python-client

google-api-python-client-stubs v1.39.0 4.4M downloads/30d#2,318 on PyPI
Permissive license Apache-2.0 Active released

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-stubs

uv

uv add google-api-python-client-stubs

poetry

poetry add google-api-python-client-stubs

Installing 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

Typing :: Stubs Only

Tags

type stubs google api clientmypy type checking google apisgoogle api python type hintsstatic type checking google clientgoogle api autocomplete editortype annotations google discoverygoogle api client typing support
type-stubsgoogle-apismypy

More Software Development packages