pyparsing
pyparsing - Classes and methods to define and execute parsing grammars
Decision gist · record as of 2026-08-14
Yes. pyparsing is a mature, actively maintained library with zero dependencies, permissive licensing, and broad Python version support. It solves a real parsing problem more readably than regex or lex/yacc for many use cases. Install it if you need to parse text or define grammars programmatically.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low install friction; pure Python wheel with no runtime dependencies.
- Active maintenance with last commit 2026-08-12 and 2482 repository stars.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) — you can use, modify, and distribute pyparsing with minimal restrictions, including in commercial projects.
last release 2026-01-21 (205 days) · last repo commit 2026-08-12 · 2,482 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 412,671,524 downloads/mo, #103 on PyPI
Alternatives
Verify before relying
from pyparsing import Word, alphas
greet = Word(alphas) + "," + Word(alphas) + "!"
hello = "Hello, World!"
print(hello, "->", greet.parse_string(hello))What it is and what it does
pyparsing is a parsing library that lets you define grammars as Python code rather than using traditional lex/yacc tools or regular expressions. You compose grammar rules from pyparsing's classes using intuitive operators (+, |, ^), and the library handles common parsing headaches like variable whitespace, quoted strings, and embedded comments automatically. The parsed results come back as a ParseResults object that can be accessed as a list, dictionary, or object with named attributes.
The library has been in active development since 2007 and is widely used for building domain-specific language parsers, configuration file readers, SQL parsers, and similar text-processing tasks. It requires no external dependencies and works across Python 3.9 and later on all platforms.
Use it for
- Parse configuration files or domain-specific languages by defining grammar rules directly in Python.
- Extract structured data from text (e.g., log files, command output) without writing complex regex patterns.
- Build a simple SQL or query parser for application-specific query languages.
- Validate and parse command-line arguments or structured text formats with automatic whitespace handling.
- Create a chemical formula parser or similar domain-specific notation parser.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
pyparsing is a mature, actively maintained library with zero dependencies, permissive licensing, and broad Python version support. It solves a real parsing problem more readably than regex or lex/yacc for many use cases. Install it if you need to parse text or define grammars programmatically.
Install
pyparsing on PyPI
Before you install
Low install friction; pure Python wheel with no runtime dependencies. Active maintenance with last commit 2026-08-12 and 2482 repository stars. Supports Python 3.9 through 3.14.
Requires Python 3.9 or later.
License in practice
MIT license (permissive) — you can use, modify, and distribute pyparsing with minimal restrictions, including in commercial projects.
Quickstart
from pyparsing import Word, alphas
greet = Word(alphas) + "," + Word(alphas) + "!"
hello = "Hello, World!"
print(hello, "->", greet.parse_string(hello))
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 205 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 412,671,524 / month, #103 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 :: DevelopersIntended Audience :: Information TechnologyOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: CompilersTopic :: Text ProcessingTyping :: Typed |
Evidence: pyparsing-3.3.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 › “grammar definition in code”
- pyparsingpyparsing provides a library for building text parsers directly in…
- pyleriPyleri is a left-right parser generator that lets you define a…
- mo-parsingmo-parsing is a PEG parser generator that lets you define grammars…
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.
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.
Provides Python bindings to the Brotli compression library, enabling lossless compression and decompression using a modern LZ77 variant with Huffman coding and context modeling.
Install it if you need Brotli compression in Python; the API is straightforward and the library is battle-tested.
See also mo-parsing · parsy · textparser · pyPEG2 · pygmars · parsimonious · rply · Parsley · PyMeta3 · ply