--- id: parsy version: "2.2" license: MIT license_treatment: permissive maintenance: active --- # parsy — Easy-to-use parser combinators, for parsing in pure Python License: permissive · Maintenance: active · Downloads: 3.8M/mo ## What it is and what it does Parsy is a parser combinator library that builds complex parsers from simple, composable pieces. Instead of writing grammar rules or regex patterns, you define small parsers and combine them using operators—much like building expressions in functional programming. It's inspired by Haskell's Parsec and similar libraries, but designed for readability and ease of use in Python. The library has zero external dependencies, ships as a single module under 800 lines of code, and has been stable for over a decade. It's actively maintained and supports current Python versions (3.9 through 3.13). You can use it to parse structured text like JSON, SQL, configuration files, or domain-specific languages—anywhere you need to turn unstructured input into structured data without the overhead of a full parser generator. Use it for: - Parse JSON or other structured data formats by defining grammar rules as composable parser functions. - Build a SQL SELECT statement parser or similar domain-specific language parser. - Extract and validate structured fields from log files or configuration text. - Create a simple expression evaluator or calculator that respects operator precedence. - Parse custom query languages or filter syntax in applications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parsy is a parser combinator library that lets you build complex text parsers by combining small, reusable parser functions together in a declarative style. Yes. Parsy is a mature, zero-dependency library with active maintenance, no known vulnerabilities, and a permissive MIT license. It's well-suited for any project needing declarative text parsing without external build tools. Install it if you need to parse structured text and prefer a functional, composable approach over regex or hand-rolled parsing logic. ## Install pip install parsy uv add parsy poetry add parsy ## Installing parsy Before you install: Installation is straightforward with zero runtime dependencies outside the standard library. The project is actively maintained with a last commit on 2026-06-22, and has remained stable over its decade-long history with few backwards incompatibilities. License in practice: MIT license is permissive, allowing use in commercial and private projects with minimal restrictions—you need only include the license text in distributions. Quickstart: pip install parsy from parsy import string, regex parser = string('hello') >> regex(r'\s+') >> string('world') result = parser.parse('hello world') Requires Python 3.9 or later. Verify before relying: - Whether the library's LL(infinity) grammar support covers all parsing scenarios you need. - Performance characteristics for very large or deeply nested input structures. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags parser combinators python, text parsing library, monadic parser, LL grammar parser, declarative parsing, parser composition, grammar parsing, parsing, parser-combinators, functional-programming [View on SkillFed](https://skillfed.io/packages/parsy) · [View on PyPI](https://pypi.org/project/parsy/)