Registry / serialization / faster-eth-abi

faster-eth-abi

JSON →
library5.2.29pypypiunverified

A ~2-6x faster fork of eth_abi: Python utilities for encoding and decoding Ethereum ABI definitions, implemented in C for performance. Current stable version: 5.2.27. Requires Python >=3.10, <4. Released on a continuous cadence.

pip install faster-eth-abi
INSTALL
IMPORT
SIG · FASTER-ETH-ABI
F
faster-eth-abi
serializationpythonv5.2.29
Install
5.5s avg
Import
Disk
51MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.2.29 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 50.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.5s · import 0.000s · 54MB
51MB installed
● package 51MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

decode_single
from faster_eth_abi import decode_single
from faster_eth_abi import decode_single

Basic encoding and decoding of Ethereum ABI types.

from faster_eth_abi import encode_single, decode_single # Encode a uint256 value encoded = encode_single('uint256', 42) print(encoded.hex()) # e.g., '000000000000000000000000000000000000000000000000000000000000002a' # Decode back decoded = decode_single('uint256', encoded) print(decoded) # 42 # Encode a tuple from faster_eth_abi import encode_abi types = ['address', 'uint256'] values = ['0x1234567890abcdef1234567890abcdef12345678', 100] encoded = encode_abi(types, values) print(encoded.hex())
Debug
Known issues
gotchafaster-eth-abi is a fork of eth_abi but they are separate packages. Installing faster-eth-abi does not replace eth_abi; if your code imports from eth_abi, you will not see performance gains.
fix
Replace all imports of form `from eth_abi import ...` with `from faster_eth_abi import ...`. Also update dependencies to require faster-eth-abi instead of eth-abi.
affects: all
breakingVersion 5.0.0 introduced breaking changes: removed support for Python 3.7 and 3.8, and changed internal module structure. Code relying on private modules may break.
fix
Upgrade Python to 3.9+ (now 3.10+). Use only public API: `from faster_eth_abi import encode_single, decode_single, encode_abi, decode_abi`.
affects: <5.0.0 (old) vs >=5.0.0 (new)
deprecatedThe function `decode_abi` with positional arguments has been deprecated in favor of keyword argument style. In older versions: `decode_abi(types, data)`; now recommend `decode_abi(types, data)` still works but future versions may change.
fix
Use keyword arguments: `decode_abi(types=types, data=data)`.
affects: >=5.0.0
gotchaWhen encoding arrays, the type string must match exactly (e.g., 'uint256[]' not 'uint256[1]' for dynamic arrays). Using an incorrect type may produce silent data corruption.
fix
Ensure array types are correctly specified: dynamic arrays use '[]', static use '[size]'. Validate with decode_abi after encoding.
affects: all
Upgrade
Version history
5.2.29latest on PyPI · released May 27, 2026
Audit
Dependencies
eth-abirequiredDrop-in replacement; users may mistakenly import from eth_abi instead of faster_eth_abi
Agent activity
14 hits · last 30 days
node
14
Resources
faster-eth-abi — pip install faster-eth-abi · libregistry