{"library":"mo-parsing","title":"mo-parsing","description":"mo-parsing is a Python PEG (Parsing Expression Grammar) parsing tool. It is a fork of `pyparsing`, designed for faster parsing, and allows users to define parsers using predefined patterns and Python operators. The library is currently at version 8.694.25301, with its latest release uploaded on October 27, 2025 (likely 2024, indicating active development with frequent updates).","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install mo-parsing"],"cli":null},"imports":["from mo_parsing import Word","from mo_parsing import Literal","from mo_parsing import Keyword","from mo_parsing import Group","from mo_parsing import Regex","from mo_parsing.utils import alphas","from mo_parsing.whitespaces import Whitespace"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from mo_parsing import Word, Literal\nfrom mo_parsing.utils import alphas\nfrom mo_parsing.whitespaces import Whitespace\n\n# Define a simple grammar for 'Hello, World!' with a custom whitespace rule\nwith Whitespace(' \\t') as whitespace_context:\n    greet = Word(alphas)('greeting') + Literal(',') + Word(alphas)('person') + Literal('!')\n\n    # Parse a string\n    result = greet.parse_string('Hello, World!')\n\n    # Access results as a list\n    print(f\"List view: {list(result)}\")\n    # Access results as a dictionary (for named tokens)\n    print(f\"Dict view: {dict(result)}\")\n\n    # Example with different input\n    result_named = greet.parse_string('Hi, There!')\n    print(f\"Named tokens: {result_named.greeting}, {result_named.person}\")","lang":"python","description":"This quickstart demonstrates defining a simple grammar using `Word` and `Literal`, managing whitespace with `Whitespace` context, and parsing a string. It shows how to access the parsed results as both a list and a dictionary.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}