A library for parsing PGN chess notations
Project description
PgnParse
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 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pgnparse-0.4.0.tar.gz.
File metadata
- Download URL: pgnparse-0.4.0.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5022ac911948f05689ea171d98638a401b525fc94b3823f560f0440d7546a5d0
|
|
| MD5 |
77343b2dd06ad2bb1f84201cab0c3c3d
|
|
| BLAKE2b-256 |
380cf8aadfebf55c12301f6561d57d1c989d371b75b164543121ba6230ae2562
|
Provenance
The following attestation bundles were made for pgnparse-0.4.0.tar.gz:
Publisher:
publish.yml on ItsDrike/pgnparse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pgnparse-0.4.0.tar.gz -
Subject digest:
5022ac911948f05689ea171d98638a401b525fc94b3823f560f0440d7546a5d0 - Sigstore transparency entry: 162954262
- Sigstore integration time:
-
Permalink:
ItsDrike/pgnparse@f7feaa2175683bacede26215ab3cf45fcf4b5008 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/ItsDrike
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f7feaa2175683bacede26215ab3cf45fcf4b5008 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pgnparse-0.4.0-py3-none-any.whl.
File metadata
- Download URL: pgnparse-0.4.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65363eb65fa6b153e753993c10e45a640af14a75ca1bc81b99f44ae3697f4b62
|
|
| MD5 |
396202039108e306139c208444dac395
|
|
| BLAKE2b-256 |
669c96809798499ef59594286250be23416dc78e5091d843ce12a55ff90cd9e1
|
Provenance
The following attestation bundles were made for pgnparse-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on ItsDrike/pgnparse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pgnparse-0.4.0-py3-none-any.whl -
Subject digest:
65363eb65fa6b153e753993c10e45a640af14a75ca1bc81b99f44ae3697f4b62 - Sigstore transparency entry: 162954264
- Sigstore integration time:
-
Permalink:
ItsDrike/pgnparse@f7feaa2175683bacede26215ab3cf45fcf4b5008 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/ItsDrike
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f7feaa2175683bacede26215ab3cf45fcf4b5008 -
Trigger Event:
push
-
Statement type: