Python module to decompile AST to Python code
Project description
ast_decompiler is a module for generating Python code given an AST.
A usage example:
>> import ast >> from ast_decompiler import decompile >> decompile(ast.parse('(a + b) * c')) (a + b) * c
This module supports Python 3.8 through 3.13.
Tests and formatting
To run the tests, install pytest in a virtual environment. Then, either use tox, or simply run pytest tests/.
The code is formatted with Black.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ast_decompiler-0.8.0.tar.gz
(18.5 kB
view details)
Built Distribution
File details
Details for the file ast_decompiler-0.8.0.tar.gz
.
File metadata
- Download URL: ast_decompiler-0.8.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | daef5ca5c2bcb9ba7cf72a9308c7cd596c092d7201c0bbaf28947c721ce26441 |
|
MD5 | c76918bf082db264b368faea49257244 |
|
BLAKE2b-256 | 90c4734659d4b1d254d3c85afbd0e47e1e3e9e95d17c5022e0a105a97e00c35c |
File details
Details for the file ast_decompiler-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: ast_decompiler-0.8.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc2449883f153788d89b842967dbe871d6db14f53a178bf7ec601f393fe1e1bb |
|
MD5 | cbbeb9e2264fa17cf8abb69ea0c0c913 |
|
BLAKE2b-256 | 5d40d6b10d5911541867e8397ccb76a6fd9399eae78de967d1209e7ee7d1cf13 |