parso
A Python Parser
Decision gist · record as of 2026-08-14
Yes. Parso is a stable, actively maintained parser with no dependencies, permissive licensing, and broad Python version support. Install it if you need to parse Python code programmatically, especially when error recovery or multi-version support matters. The low friction and zero runtime dependencies make it a safe choice for library and tool authors.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Actively maintained with a recent release (105 days ago) and steady commit activity.
- Supports current Python versions from 3.6 through 3.14.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute parso freely in commercial and private projects with minimal restrictions.
last release 2026-05-01 (105 days) · last repo commit 2026-07-31 · 677 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 136,154,332 downloads/mo, #282 on PyPI
Alternatives
Verify before relying
pip install parso
import parso
module = parso.parse('hello + 1', version="3.9")
expr = module.children[0]
print(expr.get_code())- Whether error recovery behavior is suitable for your specific use case (the fact sheet shows examples but not recovery guarantees).
- Performance characteristics when parsing large files or many files in sequence.
What it is and what it does
Parso is a Python parser library extracted from the Jedi project that lets you parse Python code as a syntax tree, with built-in support for error recovery and multi-version parsing. Instead of failing on the first syntax error, it can report multiple errors and still produce a partial tree you can inspect and manipulate. You specify the target Python version (3.6 through 3.14) when parsing, so the same code can correctly parse syntax from different Python releases.
The library gives you a small, focused API: call `parso.parse()` to get a syntax tree, walk its nodes to inspect structure, call `get_code()` to round-trip back to source, and use `Grammar.iter_errors()` to collect all syntax problems in one pass. It has no runtime dependencies and installs cleanly on any modern Python version.
Use it for
- Building IDE features or linters that need to parse incomplete or malformed Python code without crashing.
- Analyzing Python code structure programmatically to extract names, definitions, or syntax patterns.
- Migrating or refactoring code across Python versions by parsing with version-specific grammars.
- Detecting and reporting multiple syntax errors in a file in a single parse, rather than stopping at the first one.
- Implementing code completion or documentation tools that need to understand Python syntax trees.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Parso is a stable, actively maintained parser with no dependencies, permissive licensing, and broad Python version support. Install it if you need to parse Python code programmatically, especially when error recovery or multi-version support matters. The low friction and zero runtime dependencies make it a safe choice for library and tool authors.
Install
parso on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained with a recent release (105 days ago) and steady commit activity. Supports current Python versions from 3.6 through 3.14.
License in practice
MIT license is permissive; you can use, modify, and distribute parso freely in commercial and private projects with minimal restrictions.
Quickstart
pip install parso
import parso
module = parso.parse('hello + 1', version="3.9")
expr = module.children[0]
print(expr.get_code())
Verify before relying
- Whether error recovery behavior is suitable for your specific use case (the fact sheet shows examples but not recovery guarantees).
- Performance characteristics when parsing large files or many files in sequence.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 105 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 136,154,332 / month, #282 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: PluginsIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Text Editors :: Integrated Development Environments (IDE)Topic :: UtilitiesTyping :: Typed |
Evidence: parso-0.8.7-py2.py3-none-any.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 › “syntax error recovery”
- parsoParso is a Python parser that recovers from syntax errors and parses…
- json-repairParses and repairs malformed JSON strings from LLMs, APIs, logs, and…
- custodianCustodian is a just-in-time job management framework that wraps…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also libcst · gast · Parsley · syntaqlite · ast-comments · textparser · jedi · funcparserlib · pyparsing · tree-sitter-groovy