skillfed

py-evm

Python implementation of the Ethereum Virtual Machine

py-evm v0.12.1b1 280.2K downloads/30d#8,114 on PyPI2,353
Permissive license MIT Abandoned released

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-evm

uv

uv add py-evm

poetry

poetry add py-evm

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

ethereum virtual machine pythonevm implementationethereum bytecode executionsmart contract testing pythonethereum protocol referenceevm simulatorblockchain development python
ethereumblockchain-testingreference-implementation

More Software Development packages