# google/pytype

A static type analyzer for Python code

Repository: https://github.com/google/pytype
Canonical: https://ross.abutalabs.com/products/pytype
Homepage: https://google.github.io/pytype
Language: Python
License: NOASSERTION
License Family: other
Topics: python, typing, typechecker, linter, types, static-analysis, static-code-analysis
Last push: 2026-03-16T14:08:32+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 72, release rhythm 35, longevity 100
- inputs: {"age_days": 4186, "days_push": 170, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5031, forks 291 (observed 2026-08-28T04:09:08.654551+00:00)

## What it is
Pytype is a static type analyzer for Python that checks and infers types without requiring type annotations, using inference rather than gradual typing. It can lint unannotated code, enforce existing annotations, and generate .pyi stub files, though Python 3.12 is its last supported version as Google shifts investment elsewhere.

## Use cases
- type check python code without annotations
- infer types for untyped python codebase
- generate pyi stub files from python source
- catch type errors like str + int at compile time
- enforce type annotations in python project
- lint python code for misspelled attributes and bad calls

## When to choose
- your codebase is largely unannotated and you want inference-based checking
- you need to generate .pyi stub files
- you prefer lenient checking that allows anything valid at runtime
- you are on Python <= 3.12

## When to avoid
- you need support for Python 3.13 or newer
- you want a long-term maintained checker - the project is winding down
- you prefer strict gradual typing like mypy
- you want fast adoption of new typing PEPs

## Facets
- artifact type: library
- maturity: maintenance
- function: linter, type-system, developer-tools
- domain: developer-tools, programming-languages
- platform: python, cli, cross-platform
- tags: type-checker, type-inference, pyi, static-analysis, python-typing, python

## Member repositories
- google/pytype (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:08.654551+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:17:27.398645+00:00, confidence not recorded.
  - readme: https://github.com/google/pytype (fetched 2026-08-28T04:09:08.654551+00:00, sha ba0efc10d3d6)
  - homepage: https://google.github.io/pytype (fetched 2026-08-29T08:58:01.846168+00:00, sha 908fb70bf4be)
- Data as of 2026-08-30T08:39:29.467469+00:00.
