bite-parser


Namebite-parser JSON
Version 0.2.4 PyPI version JSON
download
home_pagehttps://github.com/jgosmann/bite-parser/
SummaryAsynchronous parser taking incremental bites out of your byte input stream.
upload_time2024-01-05 13:10:50
maintainer
docs_urlNone
authorJan Gosmann
requires_python>=3.8,<4.0
licenseMIT
keywords asyncio parser peg incremental parser expression grammar
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://github.com/jgosmann/bite-parser/actions/workflows/ci.yml/badge.svg
  :target: https://github.com/jgosmann/bite-parser/actions/workflows/ci.yml
  :alt: CI and release pipeline
.. image:: https://codecov.io/gh/jgosmann/bite-parser/branch/main/graph/badge.svg?token=O4M05YWNQK
  :target: https://codecov.io/gh/jgosmann/bite-parser
  :alt: Codecov coverage
.. image:: https://img.shields.io/pypi/v/bite-parser
  :target: https://pypi.org/project/bite-parser/
  :alt: PyPI
.. image:: https://img.shields.io/pypi/pyversions/bite-parser
  :target: https://pypi.org/project/bite-parser/
  :alt: PyPI - Python Version
.. image:: https://img.shields.io/pypi/l/bite-parser
  :target: https://pypi.org/project/bite-parser/
  :alt: PyPI - License

Welcome to bite-parser
======================

   Asynchronous parser taking incremental bites out of your byte input stream.

The bite-parser is a parser combinator library for Python.
It is similar to `PyParsing <https://github.com/pyparsing/pyparsing>`_
in that it allows the construction of grammars for parsing
from simple building blocks in pure Python.
This approach is also known as `Parsing Expression Grammar (PEG)
<https://en.wikipedia.org/wiki/Parsing_expression_grammar>`_.
While PyParsing
(and many other Python parsing libraries)
only support string,
bite-parser operates on bytes.
In addition,
bite-parser makes use of `asyncio`
and can asynchronously generate parsed items
from an input stream.

A typical use-case would be the parsing of a network protocol
like IMAP.
In fact,
I wrote this library for the IMAP implementation of my
`dmarc-metrics-exporter <https://github.com/jgosmann/dmarc-metrics-exporter>`_.

.. note::
   I have implemented the fundamental set of parsers,
   which should allow constructing most or all grammars
   recognizable by this type of parser.
   However, many convenience or higher level parsers are not yet implemented.

   Other areas that still need improvement are:

   * Abilitiy to debug the parsing.
   * Better error messages.
   * Performance: Currently, only a basic recursive descent parser is
     implemented which can exhibit exponential worst case performance.
     This could be improved by implementing a packrat parser.

Important links
---------------

* `Documentation <https://jgosmann.github.io/bite-parser/docs/en/main/>`_
* `GitHub repository <https://github.com/jgosmann/bite-parser>`_

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jgosmann/bite-parser/",
    "name": "bite-parser",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "asyncio,parser,PEG,incremental,parser expression grammar",
    "author": "Jan Gosmann",
    "author_email": "jan@hyper-world.de",
    "download_url": "https://files.pythonhosted.org/packages/0a/50/f265176afceef97b5d3bd36a69168385053f80e04f5661b23776887ad077/bite_parser-0.2.4.tar.gz",
    "platform": null,
    "description": ".. image:: https://github.com/jgosmann/bite-parser/actions/workflows/ci.yml/badge.svg\n  :target: https://github.com/jgosmann/bite-parser/actions/workflows/ci.yml\n  :alt: CI and release pipeline\n.. image:: https://codecov.io/gh/jgosmann/bite-parser/branch/main/graph/badge.svg?token=O4M05YWNQK\n  :target: https://codecov.io/gh/jgosmann/bite-parser\n  :alt: Codecov coverage\n.. image:: https://img.shields.io/pypi/v/bite-parser\n  :target: https://pypi.org/project/bite-parser/\n  :alt: PyPI\n.. image:: https://img.shields.io/pypi/pyversions/bite-parser\n  :target: https://pypi.org/project/bite-parser/\n  :alt: PyPI - Python Version\n.. image:: https://img.shields.io/pypi/l/bite-parser\n  :target: https://pypi.org/project/bite-parser/\n  :alt: PyPI - License\n\nWelcome to bite-parser\n======================\n\n   Asynchronous parser taking incremental bites out of your byte input stream.\n\nThe bite-parser is a parser combinator library for Python.\nIt is similar to `PyParsing <https://github.com/pyparsing/pyparsing>`_\nin that it allows the construction of grammars for parsing\nfrom simple building blocks in pure Python.\nThis approach is also known as `Parsing Expression Grammar (PEG)\n<https://en.wikipedia.org/wiki/Parsing_expression_grammar>`_.\nWhile PyParsing\n(and many other Python parsing libraries)\nonly support string,\nbite-parser operates on bytes.\nIn addition,\nbite-parser makes use of `asyncio`\nand can asynchronously generate parsed items\nfrom an input stream.\n\nA typical use-case would be the parsing of a network protocol\nlike IMAP.\nIn fact,\nI wrote this library for the IMAP implementation of my\n`dmarc-metrics-exporter <https://github.com/jgosmann/dmarc-metrics-exporter>`_.\n\n.. note::\n   I have implemented the fundamental set of parsers,\n   which should allow constructing most or all grammars\n   recognizable by this type of parser.\n   However, many convenience or higher level parsers are not yet implemented.\n\n   Other areas that still need improvement are:\n\n   * Abilitiy to debug the parsing.\n   * Better error messages.\n   * Performance: Currently, only a basic recursive descent parser is\n     implemented which can exhibit exponential worst case performance.\n     This could be improved by implementing a packrat parser.\n\nImportant links\n---------------\n\n* `Documentation <https://jgosmann.github.io/bite-parser/docs/en/main/>`_\n* `GitHub repository <https://github.com/jgosmann/bite-parser>`_\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Asynchronous parser taking incremental bites out of your byte input stream.",
    "version": "0.2.4",
    "project_urls": {
        "Homepage": "https://github.com/jgosmann/bite-parser/",
        "Repository": "https://github.com/jgosmann/bite-parser/"
    },
    "split_keywords": [
        "asyncio",
        "parser",
        "peg",
        "incremental",
        "parser expression grammar"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f60bc7044a3de4c060be413a9f0f2c2690bba62ac0136b01fbd8a88e14b9818",
                "md5": "1ab1f30e1fb14e7670278aff2f80aedf",
                "sha256": "e2209ac3c25c9951d2d80579d7ffa7584d325666e3387a5a6f6b7e5f1f5c5494"
            },
            "downloads": -1,
            "filename": "bite_parser-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1ab1f30e1fb14e7670278aff2f80aedf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 19384,
            "upload_time": "2024-01-05T13:10:48",
            "upload_time_iso_8601": "2024-01-05T13:10:48.910025Z",
            "url": "https://files.pythonhosted.org/packages/1f/60/bc7044a3de4c060be413a9f0f2c2690bba62ac0136b01fbd8a88e14b9818/bite_parser-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a50f265176afceef97b5d3bd36a69168385053f80e04f5661b23776887ad077",
                "md5": "df6db56be4f0528e8c7461f915204268",
                "sha256": "52ad850e8a39833b4c46ab5d90a617d1150b863160cbe0deba30ba0536770992"
            },
            "downloads": -1,
            "filename": "bite_parser-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "df6db56be4f0528e8c7461f915204268",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 17118,
            "upload_time": "2024-01-05T13:10:50",
            "upload_time_iso_8601": "2024-01-05T13:10:50.681585Z",
            "url": "https://files.pythonhosted.org/packages/0a/50/f265176afceef97b5d3bd36a69168385053f80e04f5661b23776887ad077/bite_parser-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-05 13:10:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jgosmann",
    "github_project": "bite-parser",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bite-parser"
}
        
Elapsed time: 0.16759s