FICHA · MANJARO

python-libcst

A concrete syntax tree parser and serializer library for Python that preserves many aspects of Python's abstract syntax tree

  • Library
  • Dev
  • Dependency only
official+codex · reviewed · May 28, 2026 description in en

Description

Parses Python source into a concrete syntax tree that preserves formatting details such as comments and whitespace. It helps refactoring tools, linters, codemods, and code generators change Python code safely.

Because it can be used to rewrite source files, generated changes should be reviewed with version control. Preserving syntax helps, but it does not prove the transformation is logically correct.

Permissions

Permissions not analysed for this source yet.