The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
LibCST Alternatives
Similar projects and alternatives to LibCST
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
semgrep
Lightweight static analysis for many languages. Find bug variants with patterns that look like source code.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
asmoses
MOSES Machine Learning: Meta-Optimizing Semantic Evolutionary Search for the AtomSpace (https://github.com/opencog/atomspace)
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
LibCST reviews and mentions
- Show HN: Codemodder – A new codemod library for Java and Python
-
Package that graphs and exports jpeg of CST/AST?
LibCST: Seems to only show in terminal.
-
How to approach modifying source code programmatically?
While you can do this using ANTLR or any other lexing/parsing tool, it's honestly a bit of a pain. Whitespace and comments can go almost anywhere, even in the middle of expressions, so the grammar ends up becoming fairly messy. So, I'd recommend using a library that handles this for you, if at all possible. For example, if I wanted to code-mod Python I'd prob just use the LibCST library.
-
ruff is a fast Python linter written in Rust
I recommend https://github.com/Instagram/LibCST (which is currently implementing rust bindings)
-
How to handle line endings when writing files depending on OS?
I've been roughly copying some of the logic from the LibCST project. This struct in particular- https://github.com/Instagram/LibCST/blob/main/native/libcst/src/tokenizer/text_position/char_width.rs does a good job of normalizing the line endings of a str. The long way around you could mimic this construct, transform the str to normalized line endings, and then split on "\n" or make a somewhat more complicated transformer which turns a large str into a Vec (or Vec).
-
We're the core team behind the popular Python autoformatter: Black. AMA!
I myself am working on upgrading LibCST's parser engine to support the new syntax, and then am hoping we can rewrite Black's formatting rules in terms of LibCST's API. That's not a small amount of work, which is why we can't confidently say that's going to be the way forward.
-
Our Engineering Team Used Python's AST to Patch 100,000s of Lines of Code
Never used it but it appears that Facebook/Instagram have a format preserving CST library for Python: https://github.com/Instagram/LibCST
-
A note from our sponsor - WorkOS
workos.com | 29 Apr 2024
Stats
Instagram/LibCST is an open source project licensed under GNU General Public License v3.0 or later which is an OSI approved license.
The primary programming language of LibCST is Python.
Sponsored