parsy
Easy-to-use parser combinators, for parsing in pure Python
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- 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 · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing use in commercial and private projects with minimal restrictions—you need only include the license text in distributions.
last release 2025-09-12 (336 days) · last repo commit 2026-06-22 · 451 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,848,299 downloads/mo, #2,478 on PyPI
Alternatives
Verify before relying
pip install parsy
from parsy import string, regex
parser = string('hello') >> regex(r'\s+') >> string('world')
result = parser.parse('hello world')- Whether the library's LL(infinity) grammar support covers all parsing scenarios you need.
- Performance characteristics for very large or deeply nested input structures.
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 on this page. Verify before relying on it.
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
parsy on PyPI
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.
Requires Python 3.9 or later.
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')
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 the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 336 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,848,299 / month, #2,478 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: CompilersTopic :: Software Development :: InterpretersTopic :: Text Processing |
Evidence: parsy-2.2-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 › “monadic parser”
- parsyParsy is a parser combinator library that lets you build complex text…
- oslashOSlash implements functional programming abstractions—functors,…
- ArpeggioArpeggio is a recursive descent parser with memoization that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also textparser · funcparserlib · parsimonious · Arpeggio · pygmars · Parsley · tree-sitter-haskell · pluralizer · chz