astor · PyPI
https://pypi.org/project/astor09.12.2019 · astor is designed to allow easy manipulation of Python source via the AST. There are some other similar libraries, but astor focuses on the following areas: Round-trip an AST back to Python [1]: Modified AST doesn’t need linenumbers, ctx, etc. or otherwise be directly compileable for the round-trip to work. Easy to read generated code as ...