rust-pgn-reader-python-binding 2.5.2__cp313-cp313-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ from .rust_pgn_reader_python_binding import *
2
+
3
+ __doc__ = rust_pgn_reader_python_binding.__doc__
4
+ if hasattr(rust_pgn_reader_python_binding, "__all__"):
5
+ __all__ = rust_pgn_reader_python_binding.__all__
@@ -0,0 +1,39 @@
1
+ Metadata-Version: 2.4
2
+ Name: rust_pgn_reader_python_binding
3
+ Version: 2.5.2
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Requires-Python: >=3.8
8
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
9
+
10
+ # rust_pgn_reader_python_binding
11
+ ## Fast PGN parsing bindings for Python
12
+ This project adds Python bindings to [rust-pgn-reader](https://github.com/niklasf/rust-pgn-reader). In addition, it also parses and extracts [%clk ..] and [%eval ..] tags from comments.
13
+
14
+ ## Benchmarks
15
+ Below are some benchmarks on Lichess's 2013-07 chess games (293,459 games).
16
+
17
+ | Parser | File format | Time |
18
+ |----------------------------------------------------------------------------|-------------|--------|
19
+ | [rust-pgn-reader](https://github.com/niklasf/rust-pgn-reader/tree/master) | PGN | 1s |
20
+ | rust_pgn_reader_python_binding | PGN | 4.7s |
21
+ | rust_pgn_reader_python_binding, parse_game (single_threaded) | parquet | 3.3s |
22
+ | rust_pgn_reader_python_binding, parse_games (multithreaded) | parquet | 0.5s |
23
+ | [chess-library](https://github.com/Disservin/chess-library) | PGN | 2s |
24
+ | [python-chess](https://github.com/niklasf/python-chess) | PGN | 3+ min |
25
+
26
+ The main reason for rust_pgn_reader_python_binding being slower (at least in single threaded mode) than rust-pgn-reader is because of vector / string allocations (that show up as malloc's and free's in profiling).
27
+
28
+ ## Building
29
+ `maturin develop`
30
+ `maturin develop --release`
31
+
32
+ For a more thorough tutorial, follow https://lukesalamone.github.io/posts/how-to-create-rust-python-bindings/
33
+
34
+ ## Profiling
35
+ `py-spy record -s -F -f speedscope --output profile.speedscope -- python ./src/bench_parquet.py`
36
+
37
+ Linux/WSL-only:
38
+ `py-spy record -s -F -n -f speedscope --output profile.speedscope -- python ./src/bench_parquet.py`
39
+
@@ -0,0 +1,5 @@
1
+ rust_pgn_reader_python_binding-2.5.2.dist-info/METADATA,sha256=9YTlYOStj_N0YYjJY75haZA1iJINSoEx2TZqlTpp1Yg,2158
2
+ rust_pgn_reader_python_binding-2.5.2.dist-info/WHEEL,sha256=5zJUAvrwfUbVFx6pqssfG4NOmnNrTmyrbjZ6Af_c5Ow,92
3
+ rust_pgn_reader_python_binding/__init__.py,sha256=lhSdJaKZEMrZVdzPOP73MTNFcg6hOIbqlkQ070gWYAQ,203
4
+ rust_pgn_reader_python_binding/rust_pgn_reader_python_binding.cp313-win32.pyd,sha256=sa6ZOA9lSVpVVU4hejOZ8-kR8vtX2pVqdL0hIRBxcsQ,1194496
5
+ rust_pgn_reader_python_binding-2.5.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.8.6)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313-win32