pgnparse


Namepgnparse JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
SummaryA library for parsing PGN chess notations
upload_time2025-01-14 19:13:43
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseNone
keywords chess pgn parsing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PgnParse

![supported python versions](https://img.shields.io/pypi/pyversions/pgnparse.svg)
[![current PyPI version](https://img.shields.io/pypi/v/pgnparse.svg)](https://pypi.org/project/pgnparse/)
[![CI](https://github.com/ItsDrike/pgnparse/actions/workflows/main.yml/badge.svg)](https://github.com/ItsDrike/pgnparse/actions/workflows/main.yml)

This is a simple library capable of parsing chess PGNs, following the standard
definition. It includes classes that form an Abstract Syntax Tree, fully
representing the parsed PGN with code. These classes also include `__str__`
implementations that allow seamless conversion back to regular (normalized) PGN
strings.

A unique feature of this library is the `flatten` function for a list of moves.
This function allows for the flattening of a list of moves, recursively
stripping away all of the variations in a chess game and returning full
standalone lists for each variation.

The parsing is handled using the
[`Lark`](https://lark-parser.readthedocs.io/en/stable/index.html) library,
which is therefore a dependecy of this library. Lark allows specifying a formal
EBNF-like grammar definition, which it then uses to tokenize the given input.
This token tree is then used to produce the AST.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pgnparse",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "Chess, PGN, Parsing",
    "author": null,
    "author_email": "ItsDrike <itsdrike@protonmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bb/6d/fbb0bd2751687ac7f6f2b034d2c165e02893b7e5801385dc95a2a6a925d1/pgnparse-0.3.0.tar.gz",
    "platform": null,
    "description": "# PgnParse\n\n![supported python versions](https://img.shields.io/pypi/pyversions/pgnparse.svg)\n[![current PyPI version](https://img.shields.io/pypi/v/pgnparse.svg)](https://pypi.org/project/pgnparse/)\n[![CI](https://github.com/ItsDrike/pgnparse/actions/workflows/main.yml/badge.svg)](https://github.com/ItsDrike/pgnparse/actions/workflows/main.yml)\n\nThis is a simple library capable of parsing chess PGNs, following the standard\ndefinition. It includes classes that form an Abstract Syntax Tree, fully\nrepresenting the parsed PGN with code. These classes also include `__str__`\nimplementations that allow seamless conversion back to regular (normalized) PGN\nstrings.\n\nA unique feature of this library is the `flatten` function for a list of moves.\nThis function allows for the flattening of a list of moves, recursively\nstripping away all of the variations in a chess game and returning full\nstandalone lists for each variation.\n\nThe parsing is handled using the\n[`Lark`](https://lark-parser.readthedocs.io/en/stable/index.html) library,\nwhich is therefore a dependecy of this library. Lark allows specifying a formal\nEBNF-like grammar definition, which it then uses to tokenize the given input.\nThis token tree is then used to produce the AST.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A library for parsing PGN chess notations",
    "version": "0.3.0",
    "project_urls": {
        "Documentation": "https://github.com/ItsDrike/pgnparse",
        "Source code": "https://github.com/ItsDrike/pgnparse"
    },
    "split_keywords": [
        "chess",
        " pgn",
        " parsing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd3b8ffc749b9882eaf32acb7ff47ad230fb12bc4f43133ff706af52ad27bee0",
                "md5": "12e2eb1445e5a249cf137e75945bb177",
                "sha256": "60c9df9fabdec17f4fde64f23054a634acb8912fbf0a71371a4290eca26326d9"
            },
            "downloads": -1,
            "filename": "pgnparse-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "12e2eb1445e5a249cf137e75945bb177",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 7496,
            "upload_time": "2025-01-14T19:13:42",
            "upload_time_iso_8601": "2025-01-14T19:13:42.331336Z",
            "url": "https://files.pythonhosted.org/packages/bd/3b/8ffc749b9882eaf32acb7ff47ad230fb12bc4f43133ff706af52ad27bee0/pgnparse-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb6dfbb0bd2751687ac7f6f2b034d2c165e02893b7e5801385dc95a2a6a925d1",
                "md5": "659c980639d0adfe00a6cfcc6135083f",
                "sha256": "de46b0a4c2513ba339840412cd24b95fa69645a4d3119615dfa576c878e9c48e"
            },
            "downloads": -1,
            "filename": "pgnparse-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "659c980639d0adfe00a6cfcc6135083f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 28237,
            "upload_time": "2025-01-14T19:13:43",
            "upload_time_iso_8601": "2025-01-14T19:13:43.560710Z",
            "url": "https://files.pythonhosted.org/packages/bb/6d/fbb0bd2751687ac7f6f2b034d2c165e02893b7e5801385dc95a2a6a925d1/pgnparse-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-14 19:13:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ItsDrike",
    "github_project": "pgnparse",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pgnparse"
}
        
Elapsed time: 0.50414s