{"library":"pyvex","title":"pyvex","description":"PyVEX is a Python interface to libVEX, Valgrind's VEX Intermediate Representation (IR) engine. It provides bindings to translate machine code from various architectures into a common, architecture-agnostic, side-effects-free IR, facilitating static and dynamic program analysis. PyVEX is a foundational component of the angr binary analysis framework and is actively maintained with frequent releases, typically alongside the broader angr project.","language":"python","status":"active","last_verified":"Mon May 18","install":{"commands":["pip install pyvex"],"cli":null},"imports":["import pyvex\nimport archinfo\nirsb = pyvex.lift(b'\\x90', 0x400000, archinfo.ArchAMD64())","from pyvex import IRSB\n# ... or access via lifted block:\n# irsb = pyvex.lift(...)\n# type(irsb) == pyvex.IRSB"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pyvex\nimport archinfo\n\n# Binary code: 5 NOPs (0x90) for AMD64\nbinary_code = b\"\\x90\\x90\\x90\\x90\\x90\"\n# Base address for the code\nbase_address = 0x400400\n# Architecture definition\narchitecture = archinfo.ArchAMD64()\n\n# Lift the binary code into a VEX Intermediate Representation Super-Block (IRSB)\nirsb = pyvex.lift(binary_code, base_address, architecture)\n\nprint(\"--- Lifted IRSB ---\")\nirsb.pp() # Pretty-print the IRSB\n\nprint(\"\\n--- IRSB Statements ---\")\nfor stmt in irsb.statements:\n    stmt.pp()\n\nprint(\"\\n--- Next IR Expression (Jump Target) ---\")\nirsb.next.pp()\nprint(f\"Jump Kind: {irsb.jumpkind}\")","lang":"python","description":"This quickstart demonstrates how to lift a small block of AMD64 NOP instructions into PyVEX's IRSB (Intermediate Representation Super-Block). It then pretty-prints the entire IRSB, iterates through its statements, and shows how to access the default exit (jump target) expression and kind. This requires `archinfo` to be installed.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-18","installed_version":"9.2.102","pypi_latest":"9.2.215","is_stale":true,"summary":{"python_range":"3.10–3.9","success_rate":50,"avg_install_s":2.8,"avg_import_s":0.52,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pyvex","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pyvex","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3,"import_time_s":0.4,"mem_mb":10.1,"disk_size":"28M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyvex","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pyvex","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.7,"import_time_s":0.65,"mem_mb":10.9,"disk_size":"31M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyvex","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pyvex","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.3,"import_time_s":0.6,"mem_mb":10.8,"disk_size":"22M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyvex","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pyvex","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.4,"import_time_s":0.55,"mem_mb":10.8,"disk_size":"22M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pyvex","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pyvex","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.5,"import_time_s":0.42,"mem_mb":11.1,"disk_size":"32M"}]}}