Open-source project
google/pytype avatar
google/pytype

pytype: Google's type checker, archived with a farewell that names its own flaw

GitHub describes it as A static type analyzer for Python code. The repository metadata lists Python as its primary language. The metadata lists the NOASSERTION license. This article stays within the project description and details documented in the GitHub repository README.

5,031 stars290 forksPythonNOASSERTION

At a glance

What is it?
pytype is Google's static type analyzer for Python, begun in 2012 and now archived, with Python 3.12 declared its final supported version. The farewell note explains the retirement honestly, the bytecode-based design resisted the faster adoption of new typing PEPs, even as the team says it remains invested in Python type checking and is shifting toward new approaches.
Who is it for?
Read pytype's archive notice before anything else if you are choosing a type checker today, because the project itself directs users toward the mature alternatives collected in its FAQ issue, and an archived tool will not gain support for Python beyond 3.12 or for future typing PEPs. Its remaining value is historical and forensic, understanding how inference-first checking worked, how typeshed came to exist, and what a bytecode-based analysis cost.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
No. The owners have archived the repository on GitHub, so it is read-only and no longer receives changes.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

An archive notice instead of a feature list

The repository is archived, and the README has been replaced by a retirement note titled An update on pytype. Its summary is direct, the last supported Python version for pytype will be 3.12, the team remains very actively interested in the space of Python type checking, but is shifting investments towards new ideas and different frameworks. The last push landed 2026-03-16, there are no GitHub releases to consult, and the homepage at google.github.io/pytype remains as documentation of what the tool was. For a project that once served Google's internal Python population, the note reads less like an abandonment and more like a rotation, the problem stays on the roster while this particular implementation leaves the field.

From 2012 inference to typeshed, with Guido and mypy

The history compressed into the farewell note covers the whole evolution of Python typing. Pytype's development began in 2012 to meet Google developers' demand for compile-time checking, years before the language had a standard annotation syntax. It started with type inference and interface files, the pre-PEP 484 approach, and after the acceptance of PEP 484 it switched to inline annotations while retaining the inference engine underneath, a hybrid few other checkers attempted. Along the way, pytype's team collaborated with Guido and mypy to create typeshed, the central repository for type annotations that the entire ecosystem now depends on. The repository still carries typeshed as a submodule, a living connection to that contribution.

The bytecode design that ended it

The stated cause of retirement is architectural. While pytype has been effective, its bytecode-based design has presented challenges in implementing new features, in the note's own example, faster adoption of new typing PEPs, due to bytecode's inherent instability and propensity to change. Python's bytecode format is an internal implementation detail that shifts between versions, so a checker anchored to it pays a maintenance tax on every release, precisely when the typing landscape was producing new PEPs at increasing speed. The consequence is stated plainly, focus moves to exploring new typing approaches better suited for Google's Python user base, and Python 3.12 becomes the last supported version. It is a candid postmortem published at the moment of archiving rather than years later.

A C++ solver under a Python tool

The repository reveals how much machinery sat under the surface. The setup.py builds a pybind11 C++ extension named pytype.typegraph.cfg from six source files, cfg.cc, cfg_logging.cc, pylogging.cc, reachable.cc, solver.cc and typegraph.cc, compiled against the C++20 standard, with CMakeLists and a cmake directory supporting the native build. A Dockerfile.dev containerizes the development environment, and googletest arrives as another submodule for testing the native layer. The name typegraph names the data structure at the center of the analysis, and the solver source hints at the constraint solving the inference engine performed, this was a research-grade static analysis system wearing a Python package's clothes.

pycnite, importlab and the dependency set

The pinned requirements file, generated with uv from requirements.in, reads as a map of the tool's internals. pycnite, the bytecode parsing library, sits at the heart of the approach that ultimately retired the project. importlab handled resolving the import graph of analyzed code, libcst provided concrete syntax tree manipulation, networkx graph algorithms, and pydot rendered graphs, the debug visualization side of a constraint solver. ninja and pybind11 support the native build, jinja2 and msgspec handle templating and fast serialization, and pylint with its dependencies round out the development tooling. immutabledict and typing-extensions reflect the type-system focus, and the whole set is pinned to exact versions, frozen at the moment the project stopped moving.

Pytype checked itself, by configuration

The pyproject.toml carries a tool.pytype section, the tool checking its own codebase, with inputs set to pytype/**/*.py and pytype_extensions/**/*.py and excludes covering test files in their three naming shapes, typeshed, test_data and testdata directories. The separate pytype_extensions package exists as the published home for extensions to the typing system the checker supported, the pattern typing tools use to ship features that do not fit the standard library's annotations. That self-hosting configuration is now a snapshot of the project's final shape, the last statement of which code was held to the checker's standard and which was exempted, and it remains a useful example of how a large Python project configured pytype at the end of its life.

Four names and a decade of Rebecca Chen

The closing paragraph is a credit roll. The creation and development of pytype was a collaborative effort, with four main contributors named, Rebecca Chen, Martin DeMello, Teddy Sudol, and initial lead Matthias Kramm. Rebecca Chen receives particular recognition, a decade-long commitment to pytype and significant contributions to Python's type system as a long-standing member of the typing council, the group that steers the language's typing direction. The note encourages users to investigate the mature and excellent alternative solutions for Python typing, pointing at a FAQ issue that collects them, an orderly handoff of the recommendation itself. An AUTHORS file, a CHANGELOG and a LICENSE remain at the root, with GitHub reporting the license as unclassified despite the file's presence.

Editorial conclusion

Read pytype's archive notice before anything else if you are choosing a type checker today, because the project itself directs users toward the mature alternatives collected in its FAQ issue, and an archived tool will not gain support for Python beyond 3.12 or for future typing PEPs. Its remaining value is historical and forensic, understanding how inference-first checking worked, how typeshed came to exist, and what a bytecode-based analysis cost. If you maintain old pytype annotations or pytype_extensions usage, plan the migration to a maintained checker while Python 3.12 is still your floor, and treat the repository as a reference implementation rather than a dependency with a future.

Frequently asked questions

What is pytype?

pytype is Google's static type analyzer for Python, developed from 2012 and now archived. It combined type inference with inline annotations after PEP 484, contributed to the creation of typeshed together with Guido and mypy, and declared Python 3.12 its last supported version upon retirement.

Is pytype still maintained?

No, the repository is archived. The final note states that Python 3.12 is the last supported version, that the bytecode-based design made adopting new typing PEPs difficult, and that the team is shifting investment to new typing approaches while remaining interested in the space. The last push was 2026-03-16.

What are the alternatives to pytype?

The farewell note encourages investigating the mature and excellent alternative solutions in the Python typing ecosystem, collected in the project's FAQ issue on GitHub. It states the ecosystem now offers a wider array of mature solutions than existed when pytype began, without naming a single successor.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/google-pytype.svg)](https://hysenlabs.com/projects/google-pytype)