--- id: arpeggio version: "2.0.3" license: MIT license_treatment: permissive maintenance: active --- # Arpeggio — Packrat parser interpreter License: permissive · Maintenance: active · Downloads: 2.1M/mo ## What it is and what it does Arpeggio is a parser library that implements Packrat parsing using Parsing Expression Grammars (PEG). It uses recursive descent with memoization to parse input according to user-defined grammar rules. The library is designed for developers who need to build parsers for domain-specific languages, configuration formats, or other structured text without writing hand-coded parsing logic. The package has no runtime dependencies and is marked as Production/Stable. It supports Python 3.6 through 3.10 and has been actively maintained since its first release in 2014-08-16. The documentation notes that textX provides a higher-level interface to Arpeggio if you need a more convenient API for language definition. Use it for: - Build a parser for a custom configuration file format or domain-specific language - Parse structured text data where you want to define grammar rules declaratively rather than write parsing code - Create an interpreter or compiler frontend that needs to consume and validate input against a formal grammar - Extract and transform data from text files with complex, nested structures ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Arpeggio is a recursive descent parser with memoization that implements PEG (Packrat) grammars, letting you define and parse custom languages or structured text formats. Yes. Arpeggio is a stable, actively maintained parser library with no dependencies and permissive licensing. Install it if you need to build a parser for a custom grammar or language; if you want a higher-level interface for language definition, consider textX instead. ## Install pip install arpeggio uv add arpeggio poetry add arpeggio ## Installing Arpeggio Before you install: Low install friction with no runtime dependencies. Active maintenance with a recent release in 2025-09-12 and last commit on 2026-08-02; the repository is not archived and has 288 stars. License in practice: MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions beyond attribution. Quickstart: pip install arpeggio from arpeggio import ParsingExpression, ZeroOrMore, OneOrMore, Optional from arpeggio import PTNodeVisitor, visit_parse_tree # Define a simple grammar and parse input grammar = OneOrMore(ParsingExpression(...)) parse_tree = grammar.parse(input_string) Verify before relying: - Whether Arpeggio handles left-recursive grammars or has known limitations with certain PEG patterns - Performance characteristics when parsing large inputs or deeply nested structures - Whether the package includes built-in error recovery or reporting mechanisms ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 2.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags PEG parser, recursive descent parser, packrat parser, grammar-based parsing, language parser library, text parsing, DSL parser, parsing, peg-grammar, compiler-tools [View on SkillFed](https://skillfed.io/packages/arpeggio) · [View on PyPI](https://pypi.org/project/arpeggio/)