{"categories":[{"label":"Code Generators","url":"https://skillfed.io/packages/category/software-development-code-generators"},{"label":"Compilers","url":"https://skillfed.io/packages/category/software-development-compilers"}],"enrichment":{"capability":"astor converts Python abstract syntax trees (ASTs) back to readable source code and provides tools for AST manipulation, inspection, and non-recursive tree traversal.","skillfed_tags":["ast-tools","code-generation","python-internals"],"use_cases":["Generate readable Python code from modified ASTs in code generation or transpilation tools.","Compare two Python source files for functional equivalence after automated transformations.","Debug AST structures by pretty-printing them in a more readable format than the built-in ast module.","Build refactoring or linting tools that need to output modified code back to source.","Implement custom AST visitors that walk the tree non-recursively and rewrite nodes based on parent context."],"what_it_does":"astor is a library for reading, rewriting, and writing Python abstract syntax trees back to source code. It specializes in round-tripping ASTs\u2014converting them back to readable Python without requiring the modified tree to be fully compileable or include line numbers and context information. The library also provides pretty-printing of AST structures and supports non-recursive tree walking, allowing you to visit nodes and their children on your own terms rather than through forced recursion.\n\nThe package has no runtime dependencies and runs on Python 2.7 and Python 3.4 and later. It is commonly used in code generation, refactoring tools, and AST analysis where you need to inspect or transform Python code programmatically and then output human-readable results. The library includes the astor.rtrip tool for comparing two source trees functionally after transformations like PEP 8 formatting.","worth_installing":"Yes. astor is stable (Production/Stable status), has no dependencies, installs easily, carries no known vulnerabilities, and solves a real problem\u2014converting ASTs back to readable code\u2014that the Python standard library does not address well. The 2019 release date is offset by active repository maintenance and broad adoption (top 5000 packages). Install it if you need AST round-tripping or advanced tree inspection."},"id":"astor","links":{"html":"https://skillfed.io/packages/astor","md":"https://skillfed.io/packages/astor.md","pypi":"https://pypi.org/project/astor/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2019-12-10","license_spdx":null,"license_treatment":"permissive","name":"astor","python_support":"supports_current","summary":"Read/rewrite/write Python ASTs"},"popularity":{"monthly_downloads":20035933,"position":1047,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.8.1"}
