Python RLP serialization/deserialization based on a rapid fast Rust implementation.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file rusty_rlp-0.1.8-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: rusty_rlp-0.1.8-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 143.5 kB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f275a9cde6c6e46dc017d44ee9071f7f08971bc69f97f7c9be68f4deab559309 |
|
MD5 | e39fef500287e78a360a828a3d9c5ca0 |
|
BLAKE2b-256 | c89a72bd02dce4bd6216156dd5c792419b0912eb5adcafc20a3ffe14cd6cf79f |
File details
Details for the file rusty_rlp-0.1.8-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: rusty_rlp-0.1.8-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 143.5 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20ea3e1ccd85933031b43df67c44b54884023caedfd8fcb8b7af57f9890b9aa4 |
|
MD5 | 9ca2d0d5df7009355a0cb62ad7bcfb7f |
|
BLAKE2b-256 | 1dd56256b69a86e37a77a0f2ec7ad64e357598c4b5e0e8d110434d1f6bbc7351 |
File details
Details for the file rusty_rlp-0.1.8-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: rusty_rlp-0.1.8-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 143.7 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e28e869e9bd86289a1a410d8d6eec06f2d83b49f7c90d712355d834465caf6d9 |
|
MD5 | dc27952014c1f34b4ef6b1250ff6e737 |
|
BLAKE2b-256 | c92e2306e5258f5c1ddbf040179e1460a1d08e46de5ddf75b9dff71aa6c72660 |
File details
Details for the file rusty_rlp-0.1.8-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: rusty_rlp-0.1.8-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 143.2 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aa75bb1f50f7a4e304acaa2984bc0be87a9e4d4796aec6691215fbf72fd608b |
|
MD5 | 6339190212f86c2ff60fdc7fabdb2a2a |
|
BLAKE2b-256 | ea0cd02c75ee859e60a9ce644c88404e06e8cd62845f5238aa6db97d3c3f3d24 |