skillfed

decompyle3

Python cross-version byte-code decompiler

decompyle3 v3.9.3 286.1K downloads/30d#8,049 on PyPI1,269
Copyleft license GPL3 Active released

What it is and what it does

Decompyle3 is a native Python decompiler that converts compiled Python bytecode (.pyc and .pyo files) back into human-readable source code. It accepts bytecode from Python 3.7 onwards and is a reworking of the uncompyle6 project, addressing control-flow detection issues by refactoring grammar and adding more specific markers in the instruction stream. The tool runs as a command-line utility and can optionally verify the syntax of decompiled output.

The package depends on click for CLI handling, spark-parser for grammar-based parsing, and xdis for cross-version bytecode disassembly. It is actively maintained and has no known security vulnerabilities. The author acknowledges numerous decompilation bugs exist (as with all CPython decompilers) and notes that as Python optimization increases, decompilation becomes harder; the tool does not currently support obfuscated code, Cython, MicroPython, or Windows EXE extraction.

Use it for:

  • Recover source code from compiled Python packages when original source is unavailable or lost
  • Analyze and audit third-party Python bytecode for security review or reverse-engineering
  • Debug compiled Python applications by examining the decompiled bytecode logic
  • Extract and study Python code from legacy or archived .pyc files for documentation or migration
  • Test and validate decompilation correctness against Python's own test suite

Worth the install?

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

Decompyle3 translates Python bytecode back into equivalent Python source code for versions 3.7 and later, enabling reverse-engineering and analysis of compiled Python files.

Yes, if you need to decompile Python 3.7+ bytecode and accept the GPLv3 copyleft constraint. The tool is actively maintained, has low install friction, and carries no known vulnerabilities. Be aware that decompilation is imperfect—the author documents numerous known bugs and acknowledges that control-flow detection remains incomplete. Use the --syntax-verify option to validate output, and cross-check results with other decompilers when accuracy is critical.

Install

decompyle3 on PyPI

pip

pip install decompyle3

uv

uv add decompyle3

poetry

poetry add decompyle3

Installing decompyle3

Before you install

Low friction installation with three runtime dependencies (click, spark-parser, xdis). Active maintenance with recent commits and no known vulnerabilities. Last release was 317 days ago; repository shows ongoing development.

License in practice

Licensed under GPLv3 (copyleft). Any derivative work or distribution must also be open-source under GPLv3; proprietary use or closed-source redistribution is not permitted.

Quickstart

pip install decompyle3

decompyle3 compiled-python-file.pyc

For syntax verification:
decompyle3 --syntax-verify compiled-python-file.pyc

Requires Python 3.7 or 3.8 to run; can only decompile bytecode from Python 3.7 onwards. Does not handle obfuscated code, Cython, MicroPython, or Py2EXE executables.

Verify before relying

  • Extent of known decompilation bugs and their frequency in real-world bytecode
  • Whether decompilation accuracy varies significantly across Python 3.7–3.13 versions
  • Performance characteristics when handling large or complex bytecode files

Package facts

License GPL3 (copyleft)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 3 — click, spark-parser, xdis
Maintenance actively maintained — 317 days since the last release
Last repo commit
First released
Downloads 286,099/month — #8,049 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: decompyle3-3.9.3-py37-none-any.whl; decompyle3-3.9.3-py38-none-any.whl; decompyle3-3.9.3-py39-none-any.whl; decompyle3-3.9.3-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Operating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: DebuggersTopic :: Software Development :: Libraries :: Python Modules

Tags

python bytecode decompilerdecompile pyc filesreverse engineer python bytecodepython source code recoverybytecode to source codecross-version python decompilerpyc file decompilation
bytecode-analysisreverse-engineeringcli-tool

More Python Modules packages