astroid
Abstract syntax tree library for Python with semantic inference for code analysis.
Languages, types and runtimes PyPI LGPL-2.1-or-later
How astroid is used
astroid is a dependency in 3 of the 6,208 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983); counting those, it appears in 72 projects, and what it is used with below comes from all of them. The most used alternative in our scan is parso (7 projects). Projects that use it most often also use isort (97.2%), McCabe (95.8%), Click (94.4%).
astroid popularity over time
Gid Score 50: downloads 85, use in agent projects 46, GitHub stars 3, downloads trend 54 (each 0-100). How it is calculated.
Often used with astroid
| isort | 97.2% of astroid projects · 172.4× more than average |
|---|---|
| McCabe | 95.8% of astroid projects · 743.7× more than average |
| Click | 94.4% of astroid projects · 37.8× more than average |
| MarkupSafe | 93.1% of astroid projects · 125.6× more than average |
| packaging | 93.1% of astroid projects · 63.5× more than average |
| Jinja2 | 90.3% of astroid projects · 41.5× more than average |
| attrs | 88.9% of astroid projects · 128.3× more than average |
| NumPy | 88.9% of astroid projects · 15.2× more than average |
From all 72 projects in our scan that use astroid, including the dependency samples.
How astroid is funded
Install
| Package | pip install astroid |
|---|---|
| Main stacks | Python (72) |
| Example projects | rsanshierli/EasyBert, wandb/llm-leaderboard, AbhilashPal/MuseNet, fw-ai-external/aiml, Flex-lang/transpiler |
Alternatives to astroid
Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside astroid are not listed here; they are in "Often used with".
| Tool | Gid Score | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|---|
| parso pypi Python parser library for syntax analysis and AST generation. |
60 | 7 (0.4%) | 24.8M | 679 | MIT |
More in Languages, types and runtimes: TypeScript tsx ts-node jiti vue-tsc Cloudflare Workers Types mypy tsconfig-paths