py-evm
Python implementation of the Ethereum Virtual Machine
What it is and what it does
Py-EVM is a Python-based reference implementation of the Ethereum Virtual Machine designed to be readable, flexible, and performant enough for testing and research. It executes Ethereum bytecode and processes transactions according to the protocol specification, with a focus on clarity and modifiability over raw speed.
The package is built on a stack of Ethereum-specific cryptographic and data-structure libraries (eth-bloom, eth-keys, eth-typing, eth-utils, py-ecc, rlp, trie, and ckzg) and provides chainable interfaces for constructing and simulating Ethereum execution. It is intended as a reference implementation and testing tool rather than a production execution client, and is suitable for developers building Python-based Ethereum applications, running protocol experiments, or validating smart contract behavior in isolation.
Use it for:
- Testing smart contracts and transaction logic in Python without deploying to a live network.
- Building research prototypes and experimental Ethereum protocol implementations.
- Validating bytecode execution and state transitions as part of a Python test suite.
- Understanding Ethereum protocol mechanics through a readable, modifiable codebase.
- Simulating blockchain state and transaction processing for educational or analytical purposes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Py-EVM is a Python implementation of the Ethereum Virtual Machine that executes smart contract bytecode and processes transactions according to Ethereum protocol specifications.
No, not for new projects. While py-evm is well-designed and has low install friction, the repository is archived and abandoned—no maintenance, security patches, or bug fixes will be provided. Its 10 dependencies may themselves become stale. Install only if you are maintaining an existing codebase that already depends on it, or if you are conducting time-limited research where you accept the stability and security risks.
Install
py-evm on PyPI
pip
pip install py-evmuv
uv add py-evmpoetry
poetry add py-evmInstalling py-evm
Before you install
Installation is straightforward with low friction—a pure Python wheel with 10 runtime dependencies. However, the repository is archived and marked as abandoned; the last commit was 2025-09-08 but no active maintenance is occurring. Use only if you accept that security patches and bug fixes will not be forthcoming.
License in practice
MIT license is permissive; you can use, modify, and distribute py-evm with minimal legal restriction, though you must retain the license notice.
Quickstart
pip install py-evm
from eth_utils import decode_hex
from py_evm.vm import VM
from py_evm.chains.mainnet import MainnetChain
# Create a chain instance and execute transactions
chain = MainnetChain()
# Use chain methods to process blocks and state
Requires Python 3.8 or later; the package is in Alpha status (Development Status :: 3) and the repository is archived, so production use carries stability risk.
Verify before relying
- Current performance characteristics and whether it remains suitable for testing large transaction volumes.
- Compatibility with recent Ethereum protocol upgrades post-abandonment.
- Whether the 10 runtime dependencies (eth-bloom, eth-keys, eth-typing, eth-utils, lru-dict, py-ecc, rlp, trie, ckzg, cached-property) are themselves maintained.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — cached-property, eth-bloom, eth-keys, eth-typing, eth-utils, lru-dict, py-ecc, rlp, trie, ckzg |
| Maintenance | abandoned — 457 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 280,173/month — #8,114 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: py_evm-0.12.1b1-py3-none-any.whl
Keywords: ethereum, blockchain, evm
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
vyperVyper is a Python-like programming language for…
permissive · top 15,000 on PyPI
web3web3.py is a Python library for interacting…
permissive · top 5,000 on PyPI
ethereum-dasmDisassembles Ethereum EVM bytecode into…
copyleft · top 15,000 on PyPI
evmdasmevmdasm provides a lightweight registry of…
copyleft · top 15,000 on PyPI
pyevmasmpyevmasm assembles and disassembles Ethereum…
permissive · top 15,000 on PyPI
mythrilMythril analyzes EVM bytecode for security…
permissive · top 15,000 on PyPI
clvm-toolsCompiles a LISP-like smart-contract language…
permissive · top 15,000 on PyPI
eth-brownieBrownie is a Python framework for developing,…
permissive · top 15,000 on PyPI
clvmA LISP-like virtual machine for writing and…
permissive · top 15,000 on PyPI
x402Implements the x402 payment protocol with…
permissive · top 15,000 on PyPI