Skip to main content
====================================
PyParsing -- A Python Parsing Module
====================================

Introduction
============

The pyparsing module is an alternative approach to creating and executing
simple grammars, vs. the traditional lex/yacc approach, or the use of
regular expressions. The pyparsing module provides a library of classes
that client code uses to construct the grammar directly in Python code.

Here is a program to parse "Hello, World!" (or any greeting of the form
"<salutation>, <addressee>!"):

from pyparsing import Word, alphas
greet = Word( alphas ) + "," + Word( alphas ) + "!"
hello = "Hello, World!"
print hello, "->", greet.parseString( hello )

The program outputs the following:

Hello, World! -> ['Hello', ',', 'World', '!']

The Python representation of the grammar is quite readable, owing to the
self-explanatory class names, and the use of '+', '|' and '^' operator
definitions.

The parsed results returned from parseString() can be accessed as a
nested list, a dictionary, or an object with named attributes.

The pyparsing module handles some of the problems that are typically
vexing when writing text parsers:
- extra or missing whitespace (the above program will also handle
"Hello,World!", "Hello , World !", etc.)
- quoted strings
- embedded comments

The .zip file includes examples of a simple SQL parser, simple CORBA IDL
parser, a config file parser, a chemical formula parser, and a four-
function algebraic notation parser. It also includes a simple how-to
document, and a UML class diagram of the library's classes.



Installation
============

Do the usual:

python setup.py install

(pyparsing requires Python 2.6 or later.)

Or corresponding commands using pip, easy_install, or wheel:

pip install pyparsing

easy_install pyparsing

wheel install pyparsing


Documentation
=============

See:

HowToUsePyparsing.html


License
=======

MIT License. See header of pyparsing.py

History
=======

See CHANGES file.

Metadata

Release files for pyparsing 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for pyparsing 2.1.1
File Size Uploaded Provenance Actions
pyparsing-2.1.1.zip 1.3 MB Without provenance Details for pyparsing-2.1.1.zip
pyparsing-2.1.1.tar.gz 1.1 MB Without provenance Details for pyparsing-2.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pyparsing 2.1.1
File Actions
pyparsing-2.1.1.win32-py3.5.exe Details for pyparsing-2.1.1.win32-py3.5.exe
pyparsing-2.1.1.win32-py3.4.exe Details for pyparsing-2.1.1.win32-py3.4.exe
pyparsing-2.1.1.win32-py3.3.exe Details for pyparsing-2.1.1.win32-py3.3.exe
pyparsing-2.1.1.win32-py2.7.exe Details for pyparsing-2.1.1.win32-py2.7.exe
pyparsing-2.1.1.win32-py2.6.exe Details for pyparsing-2.1.1.win32-py2.6.exe
pyparsing-2.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for pyparsing-2.1.1-py2.py3-none-any.whl

Total release size: 3.5 MB

Release files / pyparsing-2.1.1.zip

Download URL pyparsing-2.1.1.zip
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
4bd04badfda39b1e2fd0d77cb78b488c881d88c31734791a0ae902979ae10575
BLAKE2b-256 checksum
How to use checksums
549711c0b807bafeaf19f50efadb9bd9e47a5f397509154833a1bd66fee59f6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyparsing-2.1.1.tar.gz

Download URL pyparsing-2.1.1.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
9bae5cd4cbee6da0d7d8d9a1647f5253a3b89652e707647eaf1961f4932ae6c6
BLAKE2b-256 checksum
How to use checksums
94513dd26b41be55ed05e72d1da87e4a732d8b92245b1f2f7fe2fa65a4910858
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyparsing-2.1.1.win32-py3.5.exe

Download URL pyparsing-2.1.1.win32-py3.5.exe
Size 235.7 kB
Tags Source
SHA-256 checksum
How to use checksums
900351d66d07f1338942074a4306c54d684d53a19df286e8679fdb69a0122dca
BLAKE2b-256 checksum
How to use checksums
32dda3274d5a0804bb543284080ee6547f32d8b78cf0557bac8a00a8216ad394
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyparsing-2.1.1.win32-py3.4.exe

Download URL pyparsing-2.1.1.win32-py3.4.exe
Size 235.7 kB
Tags Source
SHA-256 checksum
How to use checksums
26d293069c5208e132bdeef81d4f9e20dd0d35da2ed78eded4af1da148fdf130
BLAKE2b-256 checksum
How to use checksums
36a91a10ee31e90acf9f4034b04b613a399c8181090b76e1d5a5c1a138061fa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyparsing-2.1.1.win32-py3.3.exe

Download URL pyparsing-2.1.1.win32-py3.3.exe
Size 235.7 kB
Tags Source
SHA-256 checksum
How to use checksums
be0d5736784b6100bf47a587b112e9a5b00d0803025407feb981836109c1acb8
BLAKE2b-256 checksum
How to use checksums
6c24b46d9827f53349f42aed67798b95a805bf1f0da665f9073bbf1f2b96dcfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyparsing-2.1.1.win32-py2.7.exe

Download URL pyparsing-2.1.1.win32-py2.7.exe
Size 235.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1302197acc1d5bbb206ca35dfae346cbb16d493e08d720ee4b15e97665d82026
BLAKE2b-256 checksum
How to use checksums
a5ea01209617d3fa09f9b80fdcd6fa9924f729d84f574d2cda3de2483d293a3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyparsing-2.1.1.win32-py2.6.exe

Download URL pyparsing-2.1.1.win32-py2.6.exe
Size 105.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f1a56b9e7c6a43ffe9a696cf3454b2c5774342d8493635da03d056d393591779
BLAKE2b-256 checksum
How to use checksums
44c8cb9cff22ff3738c13cfe38b6d14d2f46813246c9fc95d0ef9c708d7b9ac2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyparsing-2.1.1-py2.py3-none-any.whl

Download URL pyparsing-2.1.1-py2.py3-none-any.whl
Size 38.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
3a9743e0cba1df5ad7e5412d19a5ec1cd320c08852d5b5a4050aabe877d46c1f
BLAKE2b-256 checksum
How to use checksums
77e0a9ec2ed6e31b123e7babc788806cbd734775a3e4be9fac8f4cbf0b1f4356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyparsing 2.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.1.1 This release

8 release files No provenance

1.3.3

1.2

1.1.2

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page