--- id: pypeg2 version: "2.15.2" license: LICENSE.txt license_treatment: copyleft maintenance: abandoned --- # pyPEG2 — An intrinsic PEG Parser-Interpreter for Python License: copyleft · Maintenance: abandoned · Downloads: 83.6K/mo ## What it is and what it does pyPEG2 is a PEG parser library that allows you to define grammars declaratively and use them to parse text in Python. It's designed for building custom parsers when standard parsing tools (like XML or template parsers) don't fit your needs, and it includes Unicode support. The package is production-stable according to its classifier but has been unmaintained since October 2015. It targets both Python 2.7 and Python 3.x, though the long gap since its last release raises questions about compatibility with recent Python versions. The description indicates it depends on lxml, though the exact dependency relationship is not fully documented in the fact sheet. Use it for: - Building domain-specific language (DSL) parsers for configuration files or custom syntax. - Parsing structured text formats where regex or simple string splitting is insufficient. - Creating grammar-based interpreters for small languages or query syntaxes. - Prototyping language parsers before committing to a full parser generator like ANTLR. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyPEG2 is a PEG (Parsing Expression Grammar) parser generator that lets you write your own parsers in Python, supporting both Python 2.7 and Python 3.x with Unicode handling. No, unless you have a specific legacy requirement. The package is abandoned (last release 2015) with no maintenance for over 3964 days, creating risk for Python 3.10+ compatibility issues. The GPLv2 copyleft license also constrains derivative work. For new projects, consider actively maintained PEG libraries like lark or parsley instead. ## Install pip install pypeg2 uv add pypeg2 poetry add pypeg2 ## Installing pyPEG2 Before you install: High install friction: the package is abandoned (last release 2015-10-07, over 3964 days ago) with no maintenance activity. It targets Python 2.7 alongside Python 3.x, which may cause compatibility issues in modern environments. License in practice: Licensed under GPLv2 (copyleft). Any derivative work or modification must be released under the same license, and you must distribute source code alongside binaries. Quickstart: pip install pypeg2 from pypeg2 import parse # Define a simple grammar and parse input result = parse("input_string", grammar_rule) The description states pyPEG 2 depends on lxml; verify this dependency is available in your environment. Python 2.7 support may conflict with modern Python 3 toolchains. Verify before relying: - Whether lxml is automatically installed as a dependency or must be manually installed separately. - Actual Python version compatibility in modern Python 3 releases (3.10+) given the 2015 last release date. - Whether the package works reliably with current versions of its stated dependency (lxml). ## Package facts - License: LICENSE.txt (copyleft) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 83.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags PEG parser generator, parsing expression grammar, custom parser python, language parser library, grammar-based parsing, text parsing tool, DSL parser, parser-generator, abandoned, copyleft [View on SkillFed](https://skillfed.io/packages/pypeg2) · [View on PyPI](https://pypi.org/project/pypeg2/)