--- id: typed-ast version: "1.5.5" license: Apache License 2.0 license_treatment: permissive maintenance: abandoned --- # typed-ast — a fork of Python 2 and 3 ast modules with type comment support License: permissive · Maintenance: abandoned · Downloads: 4.3M/mo ## 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 above — verify before relying. Provides Python 2.7 and Python 3 AST parsers with PEP 484 type comment support, independent of the Python version running the parser. 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 pip install typed-ast uv add typed-ast poetry add typed-ast ## Installing typed-ast 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. 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)) Project is no longer maintained; Python 3.8+ users should use the standard library `ast` module instead. 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_current - Install friction: medium - Maintenance: abandoned - Downloads: 4.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags python ast parser with type comments, parse python 2.7 syntax, pep 484 type comment parsing, typed abstract syntax tree, python code parsing type hints, deprecated, ast-parsing, type-comments [View on SkillFed](https://skillfed.io/packages/typed-ast) · [View on PyPI](https://pypi.org/project/typed-ast/)