{"id":13572183,"url":"https://github.com/davidhalter/parso","last_synced_at":"2025-05-14T08:07:00.175Z","repository":{"id":38007355,"uuid":"90668463","full_name":"davidhalter/parso","owner":"davidhalter","description":"A Python Parser","archived":false,"fork":false,"pushed_at":"2025-03-10T22:13:23.000Z","size":1458,"stargazers_count":638,"open_issues_count":14,"forks_count":110,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-14T05:44:27.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://parso.readthedocs.org/en/latest/","language":"Python","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/davidhalter.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-08T20:14:30.000Z","updated_at":"2025-05-12T02:55:14.000Z","dependencies_parsed_at":"2024-04-21T09:44:44.416Z","dependency_job_id":"22f19fd7-1e95-4610-bade-fa6108c81d87","html_url":"https://github.com/davidhalter/parso","commit_stats":{"total_commits":1068,"total_committers":48,"mean_commits":22.25,"dds":"0.12453183520599254","last_synced_commit":"1ca6b1f3e8c04de586f5da26e69a59fe9c19c52f"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhalter%2Fparso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhalter%2Fparso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhalter%2Fparso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhalter%2Fparso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidhalter","download_url":"https://codeload.github.com/davidhalter/parso/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101618,"owners_count":22014909,"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-01T14:01:15.862Z","updated_at":"2025-05-14T08:06:55.166Z","avatar_url":"https://github.com/davidhalter.png","language":"Python","readme":"###################################################################\nparso - A Python Parser\n###################################################################\n\n\n.. image:: https://github.com/davidhalter/parso/workflows/Build/badge.svg?branch=master\n    :target: https://github.com/davidhalter/parso/actions\n    :alt: GitHub Actions build status\n\n.. image:: https://coveralls.io/repos/github/davidhalter/parso/badge.svg?branch=master\n    :target: https://coveralls.io/github/davidhalter/parso?branch=master\n    :alt: Coverage Status\n\n.. image:: https://pepy.tech/badge/parso\n    :target: https://pepy.tech/project/parso\n    :alt: PyPI Downloads\n\n.. image:: https://raw.githubusercontent.com/davidhalter/parso/master/docs/_static/logo_characters.png\n\nParso is a Python parser that supports error recovery and round-trip parsing\nfor different Python versions (in multiple Python versions). Parso is also able\nto list multiple syntax errors in your python file.\n\nParso has been battle-tested by jedi_. It was pulled out of jedi to be useful\nfor other projects as well.\n\nParso consists of a small API to parse Python and analyse the syntax tree.\n\nA simple example:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import parso\n    \u003e\u003e\u003e module = parso.parse('hello + 1', version=\"3.9\")\n    \u003e\u003e\u003e expr = module.children[0]\n    \u003e\u003e\u003e expr\n    PythonNode(arith_expr, [\u003cName: hello@1,0\u003e, \u003cOperator: +\u003e, \u003cNumber: 1\u003e])\n    \u003e\u003e\u003e print(expr.get_code())\n    hello + 1\n    \u003e\u003e\u003e name = expr.children[0]\n    \u003e\u003e\u003e name\n    \u003cName: hello@1,0\u003e\n    \u003e\u003e\u003e name.end_pos\n    (1, 5)\n    \u003e\u003e\u003e expr.end_pos\n    (1, 9)\n\nTo list multiple issues:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e grammar = parso.load_grammar()\n    \u003e\u003e\u003e module = grammar.parse('foo +\\nbar\\ncontinue')\n    \u003e\u003e\u003e error1, error2 = grammar.iter_errors(module)\n    \u003e\u003e\u003e error1.message\n    'SyntaxError: invalid syntax'\n    \u003e\u003e\u003e error2.message\n    \"SyntaxError: 'continue' not properly in loop\"\n\nResources\n=========\n\n- `Testing \u003chttps://parso.readthedocs.io/en/latest/docs/development.html#testing\u003e`_\n- `PyPI \u003chttps://pypi.python.org/pypi/parso\u003e`_\n- `Docs \u003chttps://parso.readthedocs.org/en/latest/\u003e`_\n- Uses `semantic versioning \u003chttps://semver.org/\u003e`_\n\nInstallation\n============\n\n.. code-block:: bash\n\n    pip install parso\n\nFuture\n======\n\n- There will be better support for refactoring and comments. Stay tuned.\n- There's a WIP PEP8 validator. It's however not in a good shape, yet.\n\nKnown Issues\n============\n\n- `async`/`await` are already used as keywords in Python3.6.\n- `from __future__ import print_function` is not ignored.\n\n\nAcknowledgements\n================\n\n- Guido van Rossum (@gvanrossum) for creating the parser generator pgen2\n  (originally used in lib2to3).\n- Salome Schneider for the extremely awesome parso logo.\n\n\n.. _jedi: https://github.com/davidhalter/jedi\n","funding_links":[],"categories":["Python","Linters \u0026 Style Checkers","Tools"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidhalter%2Fparso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidhalter%2Fparso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidhalter%2Fparso/lists"}