skillfed

pyelftools

Library for analyzing ELF files and DWARF debugging information

pyelftools v0.33 16.0M downloads/30d#1,165 on PyPI2,270
Permissive license Public domain Active released

What it is and what it does

pyelftools is a pure-Python library for reading and analyzing ELF (Executable and Linkable Format) binaries and their embedded DWARF debugging metadata. It requires only Python 3 and has no external dependencies, making it straightforward to integrate into tools that need to inspect compiled binaries, extract debug symbols, or analyze executable structure.

The library is used in debuggers, disassemblers, binary analysis tools, and compiler infrastructure. It handles the low-level parsing of ELF headers, sections, segments, and symbol tables, as well as DWARF format data. Since it is pure Python, it can be embedded directly in projects without system library requirements, though it is also available on PyPI for standard installation.

Use it for:

  • Extract debug symbols and line number information from compiled binaries for debugger integration
  • Analyze ELF binary structure to understand sections, segments, and symbol tables in reverse-engineering tools
  • Parse DWARF metadata to recover source-level information from stripped or optimized executables
  • Build binary analysis and instrumentation tools that need to read ELF metadata without external C libraries

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

pyelftools parses and analyzes ELF binary files and DWARF debugging information in pure Python, with no external dependencies.

Yes. pyelftools is stable (production/stable status), actively maintained, has no dependencies, and is permissively licensed under public domain. It is the standard choice for Python-based ELF and DWARF parsing. Install it if you need to read or analyze ELF binaries or debug information from Python.

Install

pyelftools on PyPI

pip

pip install pyelftools

uv

uv add pyelftools

poetry

poetry add pyelftools

Installing pyelftools

Before you install

Low friction: pure Python with no runtime dependencies, distributed as a wheel. Active maintenance with a recent release 77 days ago and 2270 repository stars.

License in practice

Public domain license permits unrestricted use, modification, and distribution with no attribution or copyleft obligations.

Quickstart

pip install pyelftools

import pyelftools

# See user's guide for detailed usage examples

Requires Python 3.10 or later; input must be a valid ELF binary file.

Verify before relying

  • Specific DWARF versions or ELF variants supported beyond the general claim
  • Performance characteristics or file size limits for large binaries
  • Whether the library can be used without installation by adjusting PYTHONPATH as described

Package facts

License Public domain (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 77 days since the last release
Last repo commit
First released
Downloads 16,037,769/month — #1,165 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyelftools-0.33-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: Public DomainOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: File FormatsTopic :: Software Development :: CompilersTopic :: Software Development :: DebuggersTopic :: Software Development :: Disassemblers

Tags

ELF file parserDWARF debugging informationbinary file analysisELF format readerdebug symbol extraction
binary-analysisdebugging-tools

More Compilers packages