Hacker GitHub

← All repos

Instagram/LibCST

View on GitHub ↗ ★ 1,966 Python

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

11 mentions on Hacker News by 8 people: 1 story, 10 comments · first 2019-08-07 · latest 2026-07-26

Mentions per year 11 mentions · busiest year 2021 (3)
20082026
  1. …https://crates.io/crates/rustpython-ruff_python_parser .. https://github.com/astral-sh/ruff LibCST: https://github.com/Instagram/LibCST
  2. …optimization make libCST or bandit faster? https://news.ycombinator.com/item?id=39111747 libCST: https://github.com/Instagram/LibCST bandit: https://github.com/PyCQA/bandit Links to codemod tools; "Baby Steps into Genetic Programming"…
    comment by westurner · 2026-06-16 · in Making ast.walk 220x Faster
  3. …most robust tool I’ve found but you can just use built-in ast.py and ad-hoc file:line parsing too. https://github.com/Instagram/LibCST [1] Sorry to be a fanboi but Antimemetics is amazing! https://qntm.org/fiction
    comment by gorgoiler · 2026-02-02 · in Ratchets in software development (2021)
  4. I was going to suggest libCST, it works really well and is much less of a hassle to set up than this. https://github.com/Instagram/LibCST
  5. …Jedi or manually edit the source (and then deal with nasty off-set re-parsing logic). Or libCST: https://github.com/Instagram/LibCST docs: https://libcst.readthedocs.io/en/latest/ : > LibCST parses Python 3.0 -> 3.12 source code as a CST…
    comment by westurner · 2024-09-27 · in Refactoring Python with Tree-sitter and Jedi
  6. …`black` (and `precommit run --all-files`) to format the code after mutating it? Instagram/LibCST: https://github.com/Instagram/LibCST PyCQA/redbaron: https://github.com/PyCQA/redbaron E.g. PyCQA/bandit does static analysis for security…
  7. …using other interesting tools and libraries from FB (Instagram) like libcst [1] or fixit [2] [1] https://github.com/Instagram/LibCST/ [2] https://github.com/Instagram/Fixit
    comment by nezirus · 2023-01-05 · in Pyright: Static Type Checker for Python
  8. Never used it but it appears that Facebook/Instagram have a format preserving CST library for Python: https://github.com/Instagram/LibCST
  9. Are you sure it wraps the LibCST library ( https://github.com/Instagram/LibCST )? > Bowler builds on top of the Concrete Syntax Tree (CST) provided by lib2to3 in the standard library.
  10. …used by the likes of black and yapf. There’s also a good third party options now in the form of https://github.com/Instagram/LibCST . There’s been talks about adding a CST module to PSL, but I don’t think the proposal went anywhere.…
  11. ▲ 16
    LibCST: A Concrete Syntax Tree Parser and Serializer Library for Python
    story by pipeep · 2019-08-07 · 0 comments