$npx skillfedfor your agent

ast-decompiler

Python module to decompile AST to Python code

Worth itPyPI Software DevelopmentReleased May 2024176.0K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — ast_decompiler-0.8.0-py3-none-any.whl
v0.8.0 · released 2024-05-17 · Python >=3.8

Yes. The package is lightweight (no dependencies), actively maintained with recent commits, supports current Python versions, and has no known vulnerabilities. Install it if you need to convert ASTs back to source code for inspection, debugging, or code generation workflows.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction install with no runtime dependencies.
  • The package is actively maintained with recent commits and supports current Python versions (3.8–3.13), making it reliable for modern projects.

License · maintenance · safety

permissive license (permissive) — Licensed under the Python Software Foundation License, a permissive license that allows broad use with minimal restrictions.

last release 2024-05-17 (819 days) · last repo commit 2026-06-30 · 40 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 175,951 downloads/mo, #10,256 on PyPI

Verify before relying

import ast
from ast_decompiler import decompile

code = decompile(ast.parse('(a + b) * c'))
print(code)  # Output: (a + b) * c
  • Completeness of AST-to-code coverage: whether all Python constructs are supported or if some edge cases remain unhandled.
  • Performance characteristics on large or deeply nested ASTs.
Same gist for agents: .md · .json

What it is and what it does

ast_decompiler takes a Python AST object and generates human-readable Python source code from it. This is useful when you have parsed code as an AST (via ast.parse or similar) and need to recover or inspect the original source, or when you're working with dynamically constructed ASTs and want to see what code they represent.

The package supports Python 3.8 through 3.13 and has no runtime dependencies, making it lightweight to integrate. It is actively maintained with recent activity, and the codebase is formatted with Black. The module is straightforward to use: pass an AST node to the decompile function and receive a string of reconstructed Python code.

Use it for

  • Debug or inspect dynamically generated or modified ASTs by converting them back to readable code.
  • Implement code transformation tools that need to display or log the result of AST modifications.
  • Build educational tools or documentation that show how Python code maps to its AST representation.
  • Generate test fixtures or example code from programmatically constructed AST objects.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is lightweight (no dependencies), actively maintained with recent commits, supports current Python versions, and has no known vulnerabilities. Install it if you need to convert ASTs back to source code for inspection, debugging, or code generation workflows.

Install

ast-decompiler on PyPI

Before you install

Low friction install with no runtime dependencies. The package is actively maintained with recent commits and supports current Python versions (3.8–3.13), making it reliable for modern projects.

License in practice

Licensed under the Python Software Foundation License, a permissive license that allows broad use with minimal restrictions.

Quickstart

import ast
from ast_decompiler import decompile

code = decompile(ast.parse('(a + b) * c'))
print(code)  # Output: (a + b) * c

Verify before relying

  • Completeness of AST-to-code coverage: whether all Python constructs are supported or if some edge cases remain unhandled.
  • Performance characteristics on large or deeply nested ASTs.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 819 days since the last release
Last repo commit
First released
Downloads175,951 / month, #10,256 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Environment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: Python Software Foundation LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development

Evidence: ast_decompiler-0.8.0-py3-none-any.whl

Tags

Capabilities
ast to code generationdecompile python astreconstruct source from astast code generationpython ast decompilergenerate code from astast to source code
Topics
ast-manipulationcode-generation
PyPI keywords
astdecompiler

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 › “ast to code generation”

  • ast-decompilerConverts Python abstract syntax trees (ASTs) back into readable…
  • asttokensAnnotates Python abstract syntax trees with the positions of tokens…
  • astorastor converts Python abstract syntax trees (ASTs) back to readable…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

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.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

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.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

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.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

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.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

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.

permissive licensepure Python
323.3Mdownloads / mo

See also astroid · asttokens · astunparse · google-pasta · astor · beniget · astpretty · ast-comments · luaparser · decompyle3