pyevmasm
Ethereum Virtual Machine (EVM) assembler and disassembler
What it is and what it does
pyevmasm is a Python library for assembling human-readable EVM assembly into bytecode and disassembling bytecode back into readable instructions. It provides both a command-line tool (evmasm) and a Python API, supporting multiple Ethereum protocol forks (frontier, homestead, tangerine_whistle, spurious_dragon, byzantium, constantinople, serenity) so you can work with bytecode from different network versions. The library depends only on future, making it lightweight to install.
Developers use it to analyze compiled smart contracts, manipulate EVM bytecode programmatically, or build tools that need to understand or generate Ethereum bytecode. The CLI accepts hex input/output and can read from stdin or files, while the Python API lets you query instruction tables, disassemble bytecode into instruction objects, modify them, and reassemble them back to hex.
Use it for:
- Analyze compiled Ethereum smart contract bytecode to understand its structure and operations.
- Build security analysis or fuzzing tools that need to manipulate or inspect EVM instructions.
- Generate or modify EVM bytecode programmatically for contract testing or research.
- Support multiple Ethereum forks in tooling by selecting the appropriate instruction set.
- Disassemble bytecode from the blockchain to reverse-engineer contract logic.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pyevmasm assembles and disassembles Ethereum Virtual Machine bytecode, providing both a command-line tool and a Python API for working with EVM instructions across multiple protocol forks.
Yes, if you work with Ethereum bytecode analysis or manipulation. The package is lightweight, actively maintained, permissively licensed, and has no known vulnerabilities. The 2020 release date is a minor signal to check whether it covers your target EVM forks, but the active repository and recent commits suggest ongoing support. Install it if you need EVM assembly/disassembly; skip it if you only work with high-level smart contract code.
Install
pyevmasm on PyPI
pip
pip install pyevmasmuv
uv add pyevmasmpoetry
poetry add pyevmasmInstalling pyevmasm
Before you install
Low install friction with a single lightweight dependency (future). The package is actively maintained with recent commits, though the latest release was in 2020; the repository remains active and not archived.
License in practice
Licensed under Apache License 2.0, a permissive license allowing commercial and private use with minimal restrictions, making it safe to integrate into most projects.
Quickstart
pip install pyevmasm
from pyevmasm import disassemble_hex, assemble_hex
# Disassemble bytecode
print(disassemble_hex('0x608060405260043610603f57600035'))
# Assemble instructions
result = assemble_hex('PUSH1 0x40\nMSTORE\n')
print(result)
Requires Python >2.7; the description notes Python >=3.10 is required for current development.
Verify before relying
- Whether the package actively supports all currently-used EVM forks beyond those listed in the CLI help (frontier through serenity).
- Current test coverage and whether the 2020 release date reflects actual maintenance gaps or merely infrequent version bumps.
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | supports the current Python release (>2.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — future |
| Maintenance | actively maintained — 2,310 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,823/month — #13,968 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyevmasm-0.2.3-py2-none-any.whl; pyevmasm-0.2.3-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,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
py-evmPy-EVM is a Python implementation of the…
permissive · top 15,000 on PyPI
keystone-engineKeystone is a lightweight assembler framework…
permissive · top 15,000 on PyPI
qwasmDecodes and disassembles WebAssembly binary…
permissive · top 15,000 on PyPI
vyperVyper is a Python-like programming language for…
permissive · top 15,000 on PyPI
bytecodebytecode generates and modifies Python bytecode…
permissive · top 1,000 on PyPI
xdisDisassembles Python bytecode from any Python…
copyleft · top 15,000 on PyPI
mythrilMythril analyzes EVM bytecode for security…
permissive · top 15,000 on PyPI
nvidia-cuda-nvdisasmnvdisasm disassembles NVIDIA CUDA cubin files…
unclear · top 5,000 on PyPI