Ethereum RLP
Recursive-length prefix (RLP) serialization as used by the Ethereum Execution Layer Specification (EELS).
Usage
Here's a very basic example demonstrating how to define a schema, then encode/decode it:
from dataclasses import dataclass
from ethereum_rlp import encode, decode_to
from ethereum_types.numeric import Uint
from typing import List
@dataclass
class Stuff:
toggle: bool
number: Uint
sequence: List["Stuff"]
encoded = encode(Stuff(toggle=True, number=Uint(3), sequence=[]))
decoded = decode_to(Stuff, encoded)
assert decoded.number == Uint(3)
See the tests/ directory for more examples.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ethereum_rlp-0.1.7.tar.gz
(14.3 kB
view details)
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 ethereum_rlp-0.1.7.tar.gz.
File metadata
- Download URL: ethereum_rlp-0.1.7.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dd52772318aa036e887bcc52db5f8ad7f0c54a8213fd48e52ef559962e494b9
|
|
| MD5 |
d7416c00817dcbe2abec4a6422a317d3
|
|
| BLAKE2b-256 |
818bb802cedccc7e8ea28d07075101e5106c0b63ec17e1c937c85a0e7391f927
|
File details
Details for the file ethereum_rlp-0.1.7-py3-none-any.whl.
File metadata
- Download URL: ethereum_rlp-0.1.7-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff7ff01e8d52a460ac2d68aeeccf1fa713034f4504045d45153eac303b808536
|
|
| MD5 |
a7ad291f72ad002c4f411575d00c36c2
|
|
| BLAKE2b-256 |
b1a131017847a42af04049e941bc871623cef71613862f2b474986ab0d516aff
|