pyparsing

Python library for creating PEG parsers

https://github.com/pyparsing/pyparsing

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 75 committers (1.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary

Keywords

parser-combinators parsing parsing-expression-grammar parsing-library peg-parsers python python-2 python-3 python2 python3 text-processing

Keywords from Contributors

templates closember unit-testing pallets yapf apps views pre-commit-hook gofmt formatter
Last synced: 6 months ago · JSON representation

Repository

Python library for creating PEG parsers

Basic Info
  • Host: GitHub
  • Owner: pyparsing
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 8.32 MB
Statistics
  • Stars: 2,380
  • Watchers: 26
  • Forks: 291
  • Open Issues: 38
  • Releases: 46
Topics
parser-combinators parsing parsing-expression-grammar parsing-library peg-parsers python python-2 python-3 python2 python3 text-processing
Created almost 9 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing Funding License Code of conduct Security

README.rst

PyParsing -- A Python Parsing Module
====================================

|Version| |Build Status| |Coverage| |License| |Python Versions| |Snyk Score|

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.

*[Since first writing this description of pyparsing in late 2003, this
technique for developing parsers has become more widespread, under the
name Parsing Expression Grammars - PEGs. See more information on PEGs*
`here `__
*.]*

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

.. code:: python

    from pyparsing import Word, alphas
    greet = Word(alphas) + "," + Word(alphas) + "!"
    hello = "Hello, World!"
    print(hello, "->", greet.parse_string(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 ``parse_string()`` is a collection of type
``ParseResults``, which 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 examples directory includes a simple SQL parser, simple CORBA IDL
parser, a config file parser, a chemical formula parser, and a four-
function algebraic notation parser, among many others.

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

There are many examples in the online docstrings of the classes
and methods in pyparsing. You can find them compiled into `online docs `__. Additional
documentation resources and project info are listed in the online
`GitHub wiki `__. An
entire directory of examples can be found `here `__.

License
=======

MIT License. See header of the `pyparsing __init__.py `__ file.

History
=======

See `CHANGES `__ file.

.. |Build Status| image:: https://github.com/pyparsing/pyparsing/actions/workflows/ci.yml/badge.svg
   :target: https://github.com/pyparsing/pyparsing/actions/workflows/ci.yml

.. |Coverage| image:: https://codecov.io/gh/pyparsing/pyparsing/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/pyparsing/pyparsing

.. |Version| image:: https://img.shields.io/pypi/v/pyparsing?style=flat-square
    :target: https://pypi.org/project/pyparsing/
    :alt: Version

.. |License| image:: https://img.shields.io/pypi/l/pyparsing.svg?style=flat-square
    :target: https://pypi.org/project/pyparsing/
    :alt: License

.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/pyparsing.svg?style=flat-square
    :target: https://pypi.org/project/python-liquid/
    :alt: Python versions

.. |Snyk Score| image:: https://snyk.io//advisor/python/pyparsing/badge.svg
   :target: https://snyk.io//advisor/python/pyparsing
   :alt: pyparsing

Owner

  • Name: Pyparsing
  • Login: pyparsing
  • Kind: organization

GitHub Events

Total
  • Create event: 4
  • Release event: 2
  • Issues event: 36
  • Watch event: 152
  • Issue comment event: 83
  • Push event: 77
  • Pull request review event: 1
  • Pull request event: 28
  • Gollum event: 8
  • Fork event: 11
Last Year
  • Create event: 4
  • Release event: 2
  • Issues event: 36
  • Watch event: 152
  • Issue comment event: 83
  • Push event: 77
  • Pull request review event: 1
  • Pull request event: 28
  • Gollum event: 8
  • Fork event: 11

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 1,391
  • Total Committers: 75
  • Avg Commits per committer: 18.547
  • Development Distribution Score (DDS): 0.17
Past Year
  • Commits: 206
  • Committers: 9
  • Avg Commits per committer: 22.889
  • Development Distribution Score (DDS): 0.126
Top Committers
Name Email Commits
ptmcg p****g@a****m 1,155
Max Fischer m****1@g****m 38
Jon Dufresne j****e@g****m 32
FeRD (Frank Dana) f****c@g****m 17
Cengiz Kaygusuz c****z@g****m 15
Matěj Cepl m****l@c****u 14
Matt Carmody 3****y 11
Devin J. Pohly d****y@g****m 7
Hugo h****k 7
Michael Milton t****t@g****m 6
Kyle Lahnakoski k****i@m****m 5
Michael Smedberg m****g@z****m 4
InSync 1****o 4
cclauss c****s@b****h 3
Stephen Rosen s****n@g****g 3
Kazantcev Andrey 4****d 2
retsyo l****n@g****m 2
jmcb j****p@p****m 2
Riccardo Coccioli v****- 2
Odysseas (Ody) Krystalakos O****r 2
Gabriel Gerlero g****o 2
Eric Wald g****r@b****g 2
Brandon LeBlanc b****n@l****s 2
Aussie Schnore a****3@y****m 2
Andrey Sobolev a****v@g****m 2
Michal Čihař m****l@c****m 1
Michał Górny m****y@g****g 1
xecgr f****t@g****m 1
Dominic Davis-Foster d****c@d****k 1
Daniel Wagner-Hall d****r@g****m 1
and 45 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 147
  • Total pull requests: 96
  • Average time to close issues: 4 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 115
  • Total pull request authors: 37
  • Average comments per issue: 3.35
  • Average comments per pull request: 1.79
  • Merged pull requests: 64
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 22
  • Pull requests: 28
  • Average time to close issues: 8 days
  • Average time to close pull requests: 3 days
  • Issue authors: 19
  • Pull request authors: 7
  • Average comments per issue: 1.77
  • Average comments per pull request: 1.14
  • Merged pull requests: 21
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ptmcg (7)
  • egberts (4)
  • djpohly (4)
  • grv87 (4)
  • RoDuth (3)
  • rowlesmr (3)
  • InSyncWithFoo (3)
  • volans- (2)
  • netmonitoring (2)
  • anntzer (2)
  • aucampia (2)
  • dave-kennedy (2)
  • nijel (2)
  • Honza0297 (2)
  • douloveppt (2)
Pull Request Authors
  • ferdnyc (15)
  • djpohly (10)
  • InSyncWithFoo (10)
  • jayaddison (6)
  • joelsgp (4)
  • gerlero (4)
  • sirosen (3)
  • felixfontein (2)
  • baruchoxman (2)
  • MajorTanya (2)
  • pavlozt (2)
  • yarikoptic (2)
  • gialmisi (2)
  • berrytern (2)
  • rwpeterson (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 21
  • Total downloads:
    • pypi 187,628,030 last-month
    • homebrew 8,231 last-month
  • Total docker downloads: 10,486,710,872
  • Total dependent packages: 1,876
    (may contain duplicates)
  • Total dependent repositories: 268,400
    (may contain duplicates)
  • Total versions: 159
  • Total maintainers: 2
conda-forge.org: pyparsing

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.

  • Versions: 29
  • Dependent Packages: 115
  • Dependent Repositories: 2,110
Rankings
Dependent repos count: 0.2%
Average: 0.5%
Dependent packages count: 0.7%
Last synced: 6 months ago
pypi.org: pyparsing

pyparsing module - Classes and methods to define and execute parsing grammars

  • Versions: 81
  • Dependent Packages: 1,663
  • Dependent Repositories: 264,180
  • Downloads: 187,628,030 Last month
  • Docker Downloads: 10,486,710,872
Rankings
Dependent repos count: 0.0%
Docker downloads count: 0.0%
Downloads: 0.0%
Dependent packages count: 0.0%
Average: 1.1%
Stargazers count: 2.2%
Forks count: 4.2%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.13: py3-parsing

An object-oriented approach to text processing

  • Versions: 1
  • Dependent Packages: 7
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 2.3%
Average: 2.7%
Stargazers count: 3.9%
Forks count: 4.5%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.15: py3-parsing

An object-oriented approach to text processing

  • Versions: 1
  • Dependent Packages: 12
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 2.6%
Average: 2.8%
Stargazers count: 4.2%
Forks count: 4.6%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.18: py3-parsing-pyc

Precompiled Python bytecode for py3-parsing

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 2.9%
Stargazers count: 5.7%
Forks count: 5.7%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.18: py3-parsing

An object-oriented approach to text processing

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 2.9%
Stargazers count: 5.7%
Forks count: 5.7%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.16: py3-parsing

An object-oriented approach to text processing

  • Versions: 1
  • Dependent Packages: 17
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 2.9%
Average: 3.0%
Stargazers count: 4.5%
Forks count: 4.7%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.17: py3-parsing

An object-oriented approach to text processing

  • Versions: 1
  • Dependent Packages: 24
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 1.7%
Average: 3.2%
Forks count: 5.3%
Stargazers count: 5.8%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.14: py3-parsing

An object-oriented approach to text processing

  • Versions: 1
  • Dependent Packages: 3
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 3.5%
Stargazers count: 3.9%
Forks count: 4.5%
Dependent packages count: 5.5%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-parsing-pyc

Precompiled Python bytecode for py3-parsing

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Stargazers count: 6.1%
Average: 6.9%
Forks count: 7.0%
Dependent packages count: 14.4%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-parsing

Object-oriented approach to text processing

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Stargazers count: 5.9%
Average: 6.9%
Forks count: 7.0%
Dependent packages count: 14.6%
Maintainers (1)
Last synced: 6 months ago
anaconda.org: pyparsing

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.

  • Versions: 15
  • Dependent Packages: 11
  • Dependent Repositories: 2,110
Rankings
Dependent repos count: 1.4%
Dependent packages count: 5.1%
Average: 11.5%
Stargazers count: 18.4%
Forks count: 21.1%
Last synced: 6 months ago
formulae.brew.sh: python-pyparsing

Python library for creating PEG parsers

  • Versions: 2
  • Dependent Packages: 24
  • Dependent Repositories: 0
  • Downloads: 8,231 Last month
Rankings
Dependent packages count: 18.6%
Average: 47.9%
Dependent repos count: 56.3%
Downloads: 68.7%
Last synced: 6 months ago
alpine-v3.19: py3-parsing

Object-oriented approach to text processing

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.21: py3-parsing-pyc

Precompiled Python bytecode for py3-parsing

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.19: py3-parsing-pyc

Precompiled Python bytecode for py3-parsing

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.22: py3-parsing

Object-oriented approach to text processing

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.20: py3-parsing

Object-oriented approach to text processing

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.22: py3-parsing-pyc

Precompiled Python bytecode for py3-parsing

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.21: py3-parsing

Object-oriented approach to text processing

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.20: py3-parsing-pyc

Precompiled Python bytecode for py3-parsing

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago