Python RLP serialization/deserialization based on a rapid fast Rust implementation.
Project Links
Meta
Author: Christoph Burgdorf <christoph.burgdorf@gmail.com>
Classifiers
Intended Audience
- Developers
Programming Language
- Python :: 3
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
License
- OSI Approved :: MIT License
Natural Language
- English
Rusty-RLP
Rapid fast RLP serialization / deserialization for Python.
As the name suggest, rusty-rlp is written in Rust and based on the battle-tested, MIT-licensed
rlp implementation that is also used by OpenEthereum.
Usage
from rusty_rlp import decode_raw, encode_raw
encoded = encode_raw(b'some_string')
decoded = decode_raw(encoded)
Running the tests
The library exposes a pure Python API and all tests are implemented in python_tests.py
Run the tests:
make test
Note: There do exists some tests implemented in Rust that can be run with cargo tests but those do not test this library but the underlying rlp library instead. They exist merely to prove some assumptions about the underlying library.
Benchmarks
We provide some benchmarks against pyrlp.
| Encoding (msec/loop) | Decoding (msec/loop) | |
|---|---|---|
| PyRLP | 0.016 | 0.014 |
| rusty-rlp | 0.00173 (~9x) | 0.00595 (~2.35x) |
Running the benchmarks
make benchmark
0.4.0
Apr 17, 2024
0.3.0
Feb 14, 2024
0.2.1
Dec 02, 2021
0.1.15
Aug 28, 2020
0.1.14
Aug 26, 2020
0.1.13
Aug 26, 2020
0.1.12
Aug 18, 2020
0.1.11
Aug 18, 2020
0.1.10
Aug 17, 2020
0.1.9
Aug 14, 2020
0.1.8
Aug 14, 2020
0.1.7
Aug 14, 2020
0.1.6
Aug 14, 2020
0.1.5
Aug 14, 2020
0.1.4
Aug 14, 2020
0.1.3
Aug 14, 2020
0.1.2
Aug 13, 2020
0.1.1
Aug 12, 2020
0.1.0
Aug 11, 2020
Wheel compatibility matrix
| Platform | CPython 3.8 | CPython 3.9 | CPython 3.10 | CPython 3.11 | CPython 3.12 |
|---|---|---|---|---|---|
| macosx_10_12_x86_64 | |||||
| manylinux_2_34_x86_64 | |||||
| win_amd64 |
Files in release
rusty_rlp-0.4.0-cp310-cp310-macosx_10_12_x86_64.whl (174.6KiB)
rusty_rlp-0.4.0-cp310-cp310-manylinux_2_34_x86_64.whl (231.0KiB)
rusty_rlp-0.4.0-cp310-none-win_amd64.whl (108.2KiB)
rusty_rlp-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl (174.6KiB)
rusty_rlp-0.4.0-cp311-cp311-manylinux_2_34_x86_64.whl (231.0KiB)
rusty_rlp-0.4.0-cp311-none-win_amd64.whl (108.2KiB)
rusty_rlp-0.4.0-cp312-cp312-macosx_10_12_x86_64.whl (174.6KiB)
rusty_rlp-0.4.0-cp312-cp312-manylinux_2_34_x86_64.whl (231.0KiB)
rusty_rlp-0.4.0-cp312-none-win_amd64.whl (108.2KiB)
rusty_rlp-0.4.0-cp38-cp38-macosx_10_12_x86_64.whl (174.6KiB)
rusty_rlp-0.4.0-cp38-cp38-manylinux_2_34_x86_64.whl (231.0KiB)
rusty_rlp-0.4.0-cp38-none-win_amd64.whl (108.2KiB)
rusty_rlp-0.4.0-cp39-cp39-macosx_10_12_x86_64.whl (174.6KiB)
rusty_rlp-0.4.0-cp39-cp39-manylinux_2_34_x86_64.whl (231.0KiB)
rusty_rlp-0.4.0-cp39-none-win_amd64.whl (108.2KiB)
No dependencies