python-ast is both an executable binary that can be run, and a library that can be used in Rust programs.

Installing clean_test comprehensive_test debug_exact_file debug_if_detection debug_runtests final_test simple_test test_async_improvements test_async_runtimes test_code_gen test_convenience_methods test_detailed_output test_error_handling test_final_solution test_main_conflicts test_multiple_blocks test_original_file test_parse executables

Assuming you have Rust/Cargo installed, run this command in a terminal:

cargo install python-ast

It will make clean_test comprehensive_test debug_exact_file debug_if_detection debug_runtests final_test simple_test test_async_improvements test_async_runtimes test_code_gen test_convenience_methods test_detailed_output test_error_handling test_final_solution test_main_conflicts test_multiple_blocks test_original_file test_parse commands available in your PATH if you've allowed the PATH to be modified when installing Rust. cargo uninstall python-ast uninstalls.

Adding python_ast library as a dependency

Run this command in a terminal, in your project's directory:

cargo add python-ast

To add it manually, edit your project's Cargo.toml file and add to the [dependencies] section:

python-ast = "1.0.2"

The python_ast library will be automatically available globally.

Back to the crate overview.