{"id":13746625,"url":"https://github.com/python/typed_ast","last_synced_at":"2025-10-03T16:31:20.445Z","repository":{"id":4117333,"uuid":"51875828","full_name":"python/typed_ast","owner":"python","description":"Modified fork of CPython's ast module that parses `# type:` comments","archived":true,"fork":false,"pushed_at":"2023-07-03T22:56:14.000Z","size":1747,"stargazers_count":228,"open_issues_count":1,"forks_count":54,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-10-29T16:09:55.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/python.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"custom":"https://www.python.org/psf/donations/python-dev/","github":["python"]}},"created_at":"2016-02-16T22:40:09.000Z","updated_at":"2024-09-23T21:53:24.000Z","dependencies_parsed_at":"2023-07-06T01:55:50.822Z","dependency_job_id":null,"html_url":"https://github.com/python/typed_ast","commit_stats":{"total_commits":200,"total_committers":29,"mean_commits":6.896551724137931,"dds":0.635,"last_synced_commit":"ca148cc5d94f847798f06f0a2b24053a22225783"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python%2Ftyped_ast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python%2Ftyped_ast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python%2Ftyped_ast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python%2Ftyped_ast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/python","download_url":"https://codeload.github.com/python/typed_ast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234889142,"owners_count":18902344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T06:00:57.208Z","updated_at":"2025-10-03T16:31:15.081Z","avatar_url":"https://github.com/python.png","language":"C","readme":"# End of life\n\nThis project is no longer maintained.\n\nUse the standard library `ast` module instead.\nSee https://github.com/python/typed_ast/issues/179.\n\n# Typed AST\n\n[![Build Status](https://travis-ci.org/python/typed_ast.svg?branch=master)](https://travis-ci.org/python/typed_ast)\n[![Chat at https://gitter.im/python/typed_ast](https://badges.gitter.im/python/typed_ast.svg)](https://gitter.im/python/typed_ast)\n\n`typed_ast` is a Python 3 package that provides a Python 2.7 and Python 3\nparser similar to the standard `ast` library.  Unlike `ast` up to Python 3.7, the parsers in\n`typed_ast` include [PEP 484](https://www.python.org/dev/peps/pep-0484/) type\ncomments and are independent of the version of Python under which they are run.\nThe `typed_ast` parsers produce the standard Python AST (plus type comments),\nand are both fast and correct, as they are based on the CPython 2.7 and 3.7\nparsers.  `typed_ast` runs on CPython 3.6-3.10 on Linux, OS X and Windows.\n\n**Note:** Starting with Python 3.8, we recommend to use the native `ast` parser\n(see below).\n\n## Development Philosophy\n\nThis project is a (mostly) drop-in replacement for the builtin `ast` module.  It is\nintended to be bug-for-bug compatible and behave identically, except for the\npresence of a few additional fields on the returned classes and a few\nadditional optional arguments to the `parse` call.  Therefore, `typed_ast` will\nnot accept any bugfixes for bugs in `ast` -- they should be fixed upstream\ninstead.  To avoid feature bloat, any new features for `typed_ast` should have\nthe potential to be broadly useful and not be built just for one niche usecase\nor in a manner such that only one project can use them.\n\n### Incompatibilities\n\nFor the purposes of *consuming* syntax trees, this should be a drop-in replacement.\nIt is not a drop-in replacement for users that wish to create or transform ASTs,\nas a number of syntax tree classes have additional fields that must be populated\nwhen constructing them.\n\nDue to reliance on certain C APIs, this library does not build on and there\nare [no plans to support PyPy](https://github.com/python/typed_ast/issues/111).\n\n### Python 3.8\n\n`typed_ast` will not be updated to support parsing Python 3.8 and\nnewer.  Instead, it is recommended to use the stdlib `ast` module\nthere, which has been augmented to support extracting type comments\nand has limited support for parsing older versions of Python 3.\n\n## Submodules\n### ast3\nThe `ast3` parser produces the AST from a Python 3 code, up to Python 3.7. \n(For rationale and technical\ndetails, see [here](update_process.md).)  The AST it currently produces is described in\n[ast3/Parser/Python.asdl](ast3/Parser/Python.asdl).  If you wish to limit\nparsing to older versions of Python 3, `ast3` can be configured to to give a\nSyntaxError for new syntax features introduced beyond a given Python version.\nFor more information, see the module docstring in\n[typed\\_ast/ast3.py](typed_ast/ast3.py).\n\n### ast27\nThe `ast27` parser tracks the standard Python 2.7 AST, which is expected to\nnever receive further updates. The AST it produces is described in\n[ast27/Parser/Python.asdl](ast27/Parser/Python.asdl).  For more information,\nsee the module docstring in [typed\\_ast/ast27.py](typed_ast/ast27.py).\n\n### conversions\n`typed_ast` also provides a `conversions` module which converts `ast27` ASTs\ninto `ast3` ASTs.  This functionality is somewhat experimental, however.  For\nmore information, see the `py2to3` docstring in\n[typed\\_ast/conversions](typed_ast/conversions.py).\n\n\nNote: as these parsers consider type comments part of the grammar, incorrectly\nplaced type comments are considered syntax errors.\n\n## Releases\n\nTo make a new `typed_ast` release, see [`release_process.md`](release_process.md).\n","funding_links":["https://www.python.org/psf/donations/python-dev/","https://github.com/sponsors/python"],"categories":["AST Tools","Python"],"sub_categories":["PHP - Docblock Parser"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython%2Ftyped_ast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython%2Ftyped_ast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython%2Ftyped_ast/lists"}