Skip to content
Paul McGuire edited this page Dec 1, 2023 · 48 revisions

Welcome to the pyparsing wiki!

I started writing pyparsing in 2003, about a year after starting to learn Python. This followed on the heels of many years of programming in many different programming languages, and a long interest in text processing and parsing. Combined with a fear/dismay at using regular expressions, I wanted an object-assembly model for building up parsers. Since then, tools of this style have come to be called PEG's, or Parsing Expression Grammars. I also related to Python's operator overloading features, and so pyparsing has become an embedded DSL within Python, making heavy use of operators for grammar construction and call syntax for grammar element naming.

Discussion

You can read and post comments, links, questions, and suggestions (and brag on your own cool parser projects) by posting to the pyparsing sub-reddit - r/pyparsing.

Who's Using Pyparsing

  • setuptools - parser for cracking various version dependency strings
  • matplotlib - TeX parser in mathtext
  • pydot - parser of Graphviz DOT language
  • poetry - parsing requirement and marker strings
  • httplib2 - parser for auth headers GitHub repo
  • godot_parser - parser of Godot game engine scene (.tscn) and resource (.tres) files GitHub repo
  • zhpy - interpreter pre-processor to convert Chinese keywords into Python English GitHub repo
  • whoosh - search library using pyparsing as a search query parser
  • Microsoft Guidance- parser for template markup for automating interactions with Large Language Models GitHub repo
  • TScript (Pinterest) - internal DSL for querying and alerting on observability time series data article (Medium)
  • handcalcs - library to render Python calculation code automatically in Latex, especially useful in Jupyter Notebooks GitHub repo
  • graphql-python - experimental parser of the GraphQL language GitHub repo
  • pingparsing - parser for ping command on various OS GitHub repo
  • PyContracts - parser of parameter preconditions (a='int,>0') GitHub repo
  • ViperMonkey - a VBA parser and emulation engine to analyze malicious macros
  • bob - BobBuildTool - parser of build commands GitHub repo
  • Crumble - automation scripting language - Redfern Electronics
  • RoboComp - open source robotics framework GitHub repo
  • ioc_finder - utility for finding IOC's (indicators of compromise) in bodies of text GitHub repo
  • periodictable - library for working with chemical and molecular properties and formulas GitHub repo
  • pyparsing_helper - GUI for experimenting and testing your pyparsing parsers GitHub repo; from Catherine Devlin's original blog post, saved to GitHub by techtonik
  • Parametric_Curve_FP - parses mathematical expressions to visualize resulting curves GitHub repo
  • plaso - timeline data aggregator (Super Timeline All The Things) GitHub repro
  • copybook - parser for VSAM copybooks GitHub repo
  • pccc (Python Conventional Commit Checker) - parser/validator of commit messages per the Conventional Commits specification - GitHub repo
  • ProDy - Protein Dynamics and Sequence Analysis - parser of a sophisticated atom selection grammar. "This makes every user a power user by enabling fast access to and easy handling of atomic data via simple selection statements." (http://prody.csb.pitt.edu/index.html)
  • classad - parser of ClassAd syntax for HTCondor GitHub repo / language specification
  • ddlparse - parser for SQL DDL CREATE TABLE statements GitHub repo
  • undebt - code refactoring and cleanup utility, developed by Yelp Engineering
  • recurser - interactive web demo to illustrate principles of recursion; implements a simple language for user-input recursive code GitHub repo
  • nginxparser - an nginx configuration parser GitHub repo
  • pyparsing-highlighting - alternative to Pygments using pyparsing parsers GitHub repo
  • ezdxf - DXF document parser (https://ezdxf.mozman.at/)

See this list at libraries.io.

Notable Projects

See this article on discriminatory insurance pricing, supported by this data analysis of submitted documents using pyparsing to extract several megabytes of data from the PDFs submitted by Allstate Insurance.

Also, there is this fascinating SlideShare presentation on how pyparsing was used to decipher obfuscated flight plans in tracking down international arms dealer Viktor Bout!

Enterprise Support

Pyparsing is freely available under the MIT License. pyparsing is now included as part of the Tidelift Subscription. Get commercial maintenance and assurances, while supporting my work. More info at Tidelift.com