pyghidra
Native CPython for Ghidra
Decision gist · record as of 2026-08-14
Yes. PyGhidra is actively maintained, has no known vulnerabilities, installs with low friction, and is permissively licensed. Install it if you need to programmatically interact with Ghidra from Python or integrate Ghidra analysis into larger workflows. Prerequisite: Ghidra 12.0+ must be installed separately, and a Java runtime is required.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Ghidra 12.0 or later to be installed separately; PyGhidra will locate it via GHIDRA_INSTALL_DIR environment variable or last-used installation.
- JPype1 requires a Java runtime environment.
- Low friction: pure Python wheel with only two runtime dependencies (Jpype1 and packaging).
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use without restriction. No copyleft obligations; you may modify and redistribute under the same license terms.
last release 2026-05-14 (92 days) · last repo commit 2026-08-13 · 72,376 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 90,332 downloads/mo, #13,598 on PyPI
Alternatives
Verify before relying
pip install pyghidra
import pyghidra
launcher = pyghidra.start()
project = pyghidra.open_project('/path/to/project', 'myproject')
with pyghidra.program_context(project, '/path/to/binary') as program:
pyghidra.analyze(program)- Whether offline installation from Ghidra's bundled pypkg/dist works reliably across all platforms
- Performance characteristics when analyzing large binaries or running complex GhidraScripts
- Compatibility guarantees with Ghidra versions beyond 12.0
What it is and what it does
PyGhidra is a Python binding to Ghidra's reverse-engineering API, originally developed by the Department of Defense Cyber Crime Center. It uses JPype to run native CPython 3 code that can directly call Ghidra's Java API, eliminating the need to write GhidraScript in Java or Jython. The library provides high-level convenience functions for common tasks—starting the JVM, opening projects, loading programs, running analysis, and executing GhidraScripts—as well as lower-level access to Ghidra's full object model.
You can use PyGhidra standalone in Python workflows where Ghidra is one component among many, or integrate it with Ghidra's GUI via a built-in REPL and plugin. It supports both headless (command-line) and interactive modes, making it suitable for automation, batch analysis, and integration into larger reverse-engineering or malware-analysis pipelines.
Use it for
- Automate binary analysis workflows by scripting Ghidra tasks in native Python instead of Java or GhidraScript
- Build batch processing pipelines to analyze multiple binaries and extract structured data (functions, strings, cross-references) programmatically
- Integrate Ghidra analysis into security research or malware-analysis frameworks as a Python library component
- Write custom analysis plugins in Python and run them from the Ghidra GUI via the PyGhidra plugin
- Combine Ghidra's disassembly and decompilation with Python data science or machine-learning tools for program analysis
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
PyGhidra is actively maintained, has no known vulnerabilities, installs with low friction, and is permissively licensed. Install it if you need to programmatically interact with Ghidra from Python or integrate Ghidra analysis into larger workflows. Prerequisite: Ghidra 12.0+ must be installed separately, and a Java runtime is required.
Install
pyghidra on PyPI
Before you install
Low friction: pure Python wheel with only two runtime dependencies (Jpype1 and packaging). Actively maintained with recent releases; repository shows strong community engagement (72376 stars). Supports Python 3.9 through 3.14.
Requires Ghidra 12.0 or later to be installed separately; PyGhidra will locate it via GHIDRA_INSTALL_DIR environment variable or last-used installation. JPype1 requires a Java runtime environment.
License in practice
Apache-2.0 permissive license allows commercial and private use without restriction. No copyleft obligations; you may modify and redistribute under the same license terms.
Quickstart
pip install pyghidra
import pyghidra
launcher = pyghidra.start()
project = pyghidra.open_project('/path/to/project', 'myproject')
with pyghidra.program_context(project, '/path/to/binary') as program:
pyghidra.analyze(program)
Verify before relying
- Whether offline installation from Ghidra's bundled pypkg/dist works reliably across all platforms
- Performance characteristics when analyzing large binaries or running complex GhidraScripts
- Compatibility guarantees with Ghidra versions beyond 12.0
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesJpype1packaging |
| Maintenance | Actively maintained 92 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,332 / month, #13,598 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9 |
Evidence: pyghidra-3.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ghidra python api”
- pyghidraPyGhidra provides native CPython 3 access to the Ghidra…
- pypcodepypcode provides machine code disassembly and intermediate…
- xdkA Python SDK for interacting with the X API, providing typed client…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also pypcode · cplex · pyjks · javaobj-py3 · PyDrive · py4j · pyxdia · pyathenajdbc · idapro · pdfid