skillfed

uncompyle6

Python cross-version byte-code decompiler

uncompyle6 v3.9.3 494.5K downloads/30d#6,349 on PyPI4,317
Copyleft license GPL3 Active released

What it is and what it does

uncompyle6 is a Python bytecode decompiler that reconstructs source code from compiled .pyc and .pyo files. It spans Python versions 1.0 through 3.8 and PyPy bytecodes, making it one of the few tools that handles such a wide historical range. Unlike simpler decompilers, it builds a parse tree using compiler technology to understand bytecode structure deeply, allowing it to deparse not just complete files but also code fragments at specific bytecode offsets—useful for runtime debugging and stack trace enhancement.

The tool depends on click for CLI handling, spark-parser for parsing, and xdis for bytecode analysis. It is actively maintained and has no known security vulnerabilities. The GPLv3 license means any derivative work must remain open-source. It is most useful when you have only compiled bytecode and need to recover or understand the original source, or when you need to inspect bytecode fragments at runtime for debugging purposes.

Use it for:

  • Recover source code from legacy .pyc files when original source is lost or unavailable.
  • Analyze and understand obfuscated or compiled Python bytecode for security auditing.
  • Extract code fragments at specific bytecode offsets for enhanced stack traces in debuggers.
  • Verify decompilation correctness by comparing bytecode across Python versions.
  • Inspect PyPy bytecode or bytecode from Python 1.x–2.7 when other tools only support modern versions.

Worth the install?

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

uncompyle6 translates Python bytecode back into equivalent Python source code, supporting Python versions from 1.0 through 3.8 and PyPy bytecodes.

Yes, if you need to decompile Python bytecode. uncompyle6 is actively maintained, has no security vulnerabilities, and offers the broadest Python version support (1.0–3.8 + PyPy) among available decompilers. The GPLv3 license is a hard constraint for proprietary use; open-source projects face no barrier. Install friction is low. Decompilation quality varies by Python version (strongest around 3.3–3.4, weaker at the extremes), so verify output for your target bytecode version.

Install

uncompyle6 on PyPI

pip

pip install uncompyle6

uv

uv add uncompyle6

poetry

poetry add uncompyle6

Installing uncompyle6

Before you install

Low install friction with pure-Python wheels for multiple Python versions (3.6–3.9). Actively maintained as of 2026-04-24 with 4317 repository stars and no known security vulnerabilities.

License in practice

GPLv3 copyleft license: any derivative work or distribution must also be open-source under GPLv3. Suitable for open-source projects; proprietary applications cannot incorporate this code without licensing compliance.

Quickstart

pip install uncompyle6

uncompyle6 compiled-python-file.pyc

Requires a .pyc or .pyo file as input; bytecode must originate from a Python version the tool recognizes (1.0–3.8 or PyPy).

Verify before relying

  • Exact Python version requirements for running uncompyle6 itself (description mentions git branches but not minimum runtime version).
  • Whether fragment deparsing and runtime bytecode offset association are accessible via public API or CLI.
  • Decompilation accuracy rates for specific Python versions beyond 3.8.

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 — 319 days since the last release
Last repo commit
First released
Downloads 494,456/month — #6,349 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: uncompyle6-3.9.3-py36-none-any.whl; uncompyle6-3.9.3-py38-none-any.whl; uncompyle6-3.9.3-py39-none-any.whl; uncompyle6-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 :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.4Programming Language :: Python :: 2.5Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.0Programming Language :: Python :: 3.1Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming 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 bytecodebytecode to source codepython decompilation toolpyc to py convertercross-version python decompiler
bytecode-analysisreverse-engineeringdebugging

More Python Modules packages