astunparse

An AST unparser for Python

Here are some articles that you may find helpful