cle
CLE Loads Everything (at least, many binary formats!) and provides a pythonic interface to analyze what they are and what they would look like in memory.
What it is and what it does
CLE is a binary loader that reads executable files in formats like ELF, PE (Windows), and Mach-O, then constructs an in-memory representation of how the OS would lay them out after loading. It resolves imports between the main binary and its shared libraries, searches for those libraries across configurable paths, and exposes the resulting memory state through a Python interface. You give it a file path, and it returns an object representing the loaded process with access to entry points, imports, memory contents, and architecture information.
The package is designed for binary analysis workflows—reverse engineering, vulnerability research, and automated program understanding. It sits at the foundation of the angr framework and handles the low-level mechanics of parsing multiple binary formats and reconciling their dependencies, so higher-level tools don't have to. Its main dependencies are format-specific parsers (pyelftools, pefile, pyxbe) and architecture metadata (archinfo), plus pyvex for lifting machine code to an intermediate representation.
Use it for:
- Load a binary and inspect its entry point, imports, and memory layout for reverse-engineering or static analysis
- Resolve all shared library dependencies of an executable and examine their symbols and relocations
- Extract raw machine code from a loaded binary and lift it to an intermediate representation for analysis
- Analyze Windows PE binaries or ARM Mach-O files by selecting the appropriate backend and architecture
- Build a custom binary analysis tool that needs to understand process memory layout without running the binary
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
CLE loads binary executables and shared libraries, resolves their imports, and provides a unified memory abstraction as if the OS loader had run them.
Yes. CLE is actively maintained, has no known vulnerabilities, installs with low friction, and is essential if you're doing binary analysis or building on the angr framework. The BSD-2-Clause license is permissive. The only caveat is the Python 3.12+ requirement; if you're on an older version, you cannot use it.
Install
cle on PyPI
pip
pip install cleuv
uv add clepoetry
poetry add cleInstalling cle
Before you install
Low friction installation with a pure-Python wheel. Active maintenance with a recent release (9 days old) and steady repository activity. Requires Python 3.12 or later.
License in practice
BSD-2-Clause is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.
Quickstart
pip install cle
import cle
ld = cle.Loader("/bin/ls")
print(hex(ld.main_object.entry))
print(ld.shared_objects)
Requires Python 3.12 or later. Cross-architecture library loading may require system cross-compilation libraries (e.g., libc6-powerpc-cross on Debian for ARM support).
Verify before relying
- Whether the package supports loading binaries from non-native architectures without cross-compilation libraries installed
- Performance characteristics when loading very large binaries or many shared objects simultaneously
- Whether all 11 runtime dependencies are required for basic use or only for specific backends
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — archinfo, arpy, cart, minidump, pefile, pyelftools, pyvex, pyxbe, pyxdia, sortedcontainers, uefi-firmware |
| Maintenance | actively maintained — 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 901,912/month — #4,772 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cle-9.3.2-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pefilepefile reads and parses Portable Executable…
permissive · top 5,000 on PyPI
liefLIEF parses, modifies, and abstracts binary…
permissive · top 5,000 on PyPI
membrowseAnalyzes binary size and memory footprint of…
unclear · top 15,000 on PyPI
bincopyConverts between binary file formats (Motorola…
permissive · top 15,000 on PyPI
clr_loaderLoads and provides a generic interface to call…
unclear · top 5,000 on PyPI
ailmentAILment provides the intermediate language (IL)…
permissive · top 15,000 on PyPI
dllistLists the shared libraries (DLLs) currently…
permissive · top 15,000 on PyPI
patchelfProvides a PyPI-packaged binary of patchelf, a…
copyleft · top 5,000 on PyPI
archinfoProvides architecture-specific metadata and…
permissive · top 5,000 on PyPI
ropperRopper displays binary file metadata and…
permissive · top 15,000 on PyPI