skillfed

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.

cle v9.3.2 901.9K downloads/30d#4,772 on PyPI483
Permissive license BSD-2-Clause Active released

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 cle

uv

uv add cle

poetry

poetry add cle

Installing 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

Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

binary loader libraryELF PE Mach-O loaderload binaries and librariesprocess memory abstractionbinary analysis frameworkshared object resolutionexecutable format parser
binary-analysisreverse-engineeringexecutable-loader

More Software Development packages