Metadata-Version: 2.1
Name: json2ast
Version: 1.0.1
Summary: The opposite of ast2json
Home-page: https://github.com/HacMan137/json2ast
Author: Adam Nichols
Project-URL: Bug tracker, https://github.com/HacMan137/json2ast/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE

# json2ast
### The JSON to Python AST converter you never knew you needed

<br/>

### Description
This package is meant to work in the opposite direction of the `ast2json` package which takes a Python AST object as input and produces a JSON structure as output. The one function, `json2ast` expects a Python dictionary created by `ast2json` and returns a replication of the AST objects used to create that dictionary.

### Example

```
import ast
from ast2json import ast2json
from json2ast import json2ast

tree = ast.parse(open("test_scripts/test0.py").read())
json_tree = ast2json(tree)

ast_tree = json2ast(json_tree)
```
