--- id: pyevmasm version: "0.2.3" license: Apache License 2.0 license_treatment: permissive maintenance: active --- # pyevmasm — Ethereum Virtual Machine (EVM) assembler and disassembler License: permissive · Maintenance: active · Downloads: 84.8K/mo ## 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 above — 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 pip install pyevmasm uv add pyevmasm poetry add pyevmasm ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 84.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ethereum bytecode assembler disassembler, evm instruction assembly, ethereum virtual machine tools, evm opcode manipulation, smart contract bytecode analysis, ethereum bytecode compiler, evm fork-aware assembly, ethereum, bytecode-analysis, evm [View on SkillFed](https://skillfed.io/packages/pyevmasm) · [View on PyPI](https://pypi.org/project/pyevmasm/)