typed-ast
a fork of Python 2 and 3 ast modules with type comment support
Decision gist · record as of 2026-08-14
No. Do not install typed_ast for new projects. The package is abandoned and superseded entirely by the standard library `ast` module in Python 3.8+. If you encounter it as a transitive dependency, work with maintainers to remove it. For Python 3.6–3.7 projects, migrate to the standard `ast` module where possible; typed_ast offers no advantages on modern Python versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Project is no longer maintained; Python 3.8+ users should use the standard library `ast` module instead.
- Medium install friction due to compiled wheels for multiple platforms.
- Project is abandoned as of 2023-07-03 with no further maintenance; the standard library `ast` module in Python 3.8+ supersedes all functionality.
License · maintenance · safety
Apache License 2.0 (permissive) — Apache License 2.0 is permissive, allowing use in most contexts without significant restriction.
last release 2023-07-04 (1137 days) · last repo commit 2023-07-03 · 233 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,348,443 downloads/mo, #2,325 on PyPI
Alternatives
Verify before relying
pip install typed-ast==1.5.5
import typed_ast.ast3 as ast
tree = ast.parse('x: int = 5', mode='exec', feature_version=(3, 7))- Whether any downstream packages still actively depend on typed_ast or if migration paths are documented.
- Performance characteristics compared to the standard library `ast` module on modern Python versions.
What it is and what it does
typed_ast is an abandoned Python package that provided AST (abstract syntax tree) parsers for Python 2.7 and Python 3 code with support for PEP 484 type comments. It was designed to parse type annotations in comments, a feature that predated Python's native type hint syntax. The parsers were independent of the Python version running them, allowing you to parse code written for different Python versions from a single environment.
The package is no longer maintained and should not be used for new projects. Python 3.8 and later versions incorporated all of typed_ast's functionality into the standard library `ast` module, making typed_ast obsolete. The project's repository is archived, with the last commit on 2023-07-03. If you encounter typed_ast as a dependency, migration to the standard library is strongly recommended.
Use it for
- Legacy projects that parse Python 2.7 code with type comments from a Python 3 environment (use standard `ast` if possible).
- Tools that need to extract type information from older codebases written before native type hints existed.
- Transitional codebases migrating from Python 2 to Python 3 that need unified parsing logic.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
Do not install typed_ast for new projects. The package is abandoned and superseded entirely by the standard library `ast` module in Python 3.8+. If you encounter it as a transitive dependency, work with maintainers to remove it. For Python 3.6–3.7 projects, migrate to the standard `ast` module where possible; typed_ast offers no advantages on modern Python versions.
Install
typed-ast on PyPI
Before you install
Medium install friction due to compiled wheels for multiple platforms. Project is abandoned as of 2023-07-03 with no further maintenance; the standard library `ast` module in Python 3.8+ supersedes all functionality.
Project is no longer maintained; Python 3.8+ users should use the standard library `ast` module instead.
License in practice
Apache License 2.0 is permissive, allowing use in most contexts without significant restriction.
Quickstart
pip install typed-ast==1.5.5
import typed_ast.ast3 as ast
tree = ast.parse('x: int = 5', mode='exec', feature_version=(3, 7))
Verify before relying
- Whether any downstream packages still actively depend on typed_ast or if migration paths are documented.
- Performance characteristics compared to the standard library `ast` module on modern Python versions.
Package facts
| License | Apache License 2.0 permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,137 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 4,348,443 / month, #2,325 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 7 - InactiveEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: MicrosoftOperating System :: POSIXProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development |
Evidence: typed_ast-1.5.5-cp310-cp310-macosx_10_9_x86_64.whl; typed_ast-1.5.5-cp310-cp310-macosx_11_0_arm64.whl; typed_ast-1.5.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; typed_ast-1.5.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; typed_ast-1.5.5-cp310-cp310-musllinux_1_1_aarch64.whl; typed_ast-1.5.5-cp310-cp310-musllinux_1_1_x86_64.whl; typed_ast-1.5.5-cp310-cp310-win_amd64.whl; typed_ast-1.5.5-cp311-cp311-macosx_10_9_x86_64.whl; typed_ast-1.5.5-cp311-cp311-macosx_11_0_arm64.whl; typed_ast-1.5.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; typed_ast-1.5.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; typed_ast-1.5.5-cp311-cp311-musllinux_1_1_aarch64.whl; typed_ast-1.5.5-cp311-cp311-musllinux_1_1_x86_64.whl; typed_ast-1.5.5-cp311-cp311-win_amd64.whl; typed_ast-1.5.5-cp36-cp36m-macosx_10_9_x86_64.whl; typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; typed_ast-1.5.5-cp36-cp36m-musllinux_1_1_aarch64.whl; typed_ast-1.5.5-cp36-cp36m-musllinux_1_1_x86_64.whl; typed_ast-1.5.5-cp36-cp36m-win_amd64.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 › “python ast parser with type comments”
- typed-astProvides Python 2.7 and Python 3 AST parsers with PEP 484 type…
- proto-schema-parserParses and generates Protobuf schema files (.proto) to and from an…
- baronBaron parses Python source code into a Full Syntax Tree (FST) that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also ast-comments · types-typed-ast · astpretty · astatine · strip-hints · typeguard · jsoncomment · json-with-comments · gast · lxml-stubs