$npx skillfedfor your agent

clang

libclang python bindings

With conditionsPyPI CompilersReleased Dec 20251.1M downloads / moApache-2.0 with LLVM exceptionPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — clang-21.1.7-py3-none-any.whl
v21.1.7 · released 2025-12-18

Yes, if you need programmatic C/C++ code analysis in Python and have libclang available on your system. The package is stable and permissively licensed, but verify that your system has libclang installed and that the binding supports your Python version before committing to it. Maintenance is aging, so expect infrequent updates.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires libclang system library to be installed separately; the package contains only Python bindings.
  • Low install friction with a pure-Python wheel.
  • Last release was 239 days ago; maintenance status is aging, suggesting infrequent updates.

License · maintenance · safety

Apache-2.0 with LLVM exception (permissive) — Licensed under Apache-2.0 with LLVM exception, a permissive license that permits commercial and private use with minimal restrictions.

last release 2025-12-18 (239 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,123,027 downloads/mo, #4,331 on PyPI

Verify before relying

pip install clang==21.1.7

import clang.cindex
clang.cindex.conf.set_library_file('/path/to/libclang.so')
index = clang.cindex.Index.create()
tu = index.parse('file.c')
  • Exact Python version compatibility (requires_python is unspecified in metadata)
  • Whether the bindings support the full libclang API surface or a subset
  • How to locate or configure libclang on different operating systems
Same gist for agents: .md · .json

What it is and what it does

Clang is a Python wrapper around LLVM's libclang library, providing direct access to clang's C/C++ parsing and analysis capabilities. It exposes libclang's API as Python objects, letting you build tools that understand C and C++ code structure without reimplementing a parser. The package contains only the Python bindings—you must have libclang installed separately on your system for it to work.

Typical use cases include static analysis tools, code refactoring scripts, IDE plugins, and compiler-adjacent utilities that need to inspect or manipulate C/C++ source code. Since it wraps the official LLVM bindings, it stays aligned with clang's evolution, though updates are infrequent.

Use it for

  • Build static analysis tools that inspect C/C++ code structure and semantics without parsing from scratch
  • Write code refactoring or transformation scripts that need to understand and modify C/C++ source files
  • Develop IDE plugins or language servers that require accurate C/C++ parsing and symbol resolution
  • Analyze codebases to extract metrics, dependencies, or API surfaces from compiled C/C++ projects

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need programmatic C/C++ code analysis in Python and have libclang available on your system.

The package is stable and permissively licensed, but verify that your system has libclang installed and that the binding supports your Python version before committing to it. Maintenance is aging, so expect infrequent updates.

Install

clang on PyPI

Before you install

Low install friction with a pure-Python wheel. Last release was 239 days ago; maintenance status is aging, suggesting infrequent updates.

Requires libclang system library to be installed separately; the package contains only Python bindings.

License in practice

Licensed under Apache-2.0 with LLVM exception, a permissive license that permits commercial and private use with minimal restrictions.

Quickstart

pip install clang==21.1.7

import clang.cindex
clang.cindex.conf.set_library_file('/path/to/libclang.so')
index = clang.cindex.Index.create()
tu = index.parse('file.c')

Verify before relying

  • Exact Python version compatibility (requires_python is unspecified in metadata)
  • Whether the bindings support the full libclang API surface or a subset
  • How to locate or configure libclang on different operating systems

Package facts

LicenseApache-2.0 with LLVM exception permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 239 days since the last release
First released
Downloads1,123,027 / month, #4,331 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Topic :: Software Development :: Compilers

Evidence: clang-21.1.7-py3-none-any.whl

Tags

Capabilities
libclang python bindingsclang c++ code analysisllvm python interfaceparse c code programmaticallyclang ast python
Topics
code-analysisllvmc-cpp
PyPI keywords
llvmclanglibclang

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “clang c++ code analysis”

  • clangProvides Python bindings to libclang, allowing you to…
  • scan-buildRuns the Clang static analyzer on C/C++ projects using a compilation…
  • libclangProvides Python bindings to Clang's C API, bundled with prebuilt…

Give your agent the search over MCP, or paste the wish link into any chat.

More Compilers packages

pyparsing Worth it
PyPI · Text Processing · released Jan 2026

pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.

Install it if you need to parse text or define grammars programmatically.

MITpure Python · 3.9+
412.7Mdownloads / mo
Cython Worth it
PyPI · Python Modules · released Jul 2026

Cython is a source code translator that compiles Python code to C, enabling optional static typing and direct C/C++ interoperability to generate efficient native extensions.

Install it if you need to optimize Python performance, wrap C/C++ libraries, or build fast native extensions.

permissive licensepure Python · 3.8+
136.1Mdownloads / mo
asttokens Worth it
PyPI · Python Modules · released Jul 2026

Annotates Python abstract syntax trees with the positions of tokens and source code text, enabling tools to map AST nodes back to their originating code for refactoring, analysis, and transformation.

permissive licensepure Python · 3.8+
134.8Mdownloads / mo
numba Unrated
PyPI · Compilers · released Aug 2026

Numba is a just-in-time compiler that accelerates numerically-focused Python code by compiling it to machine code via LLVM, with support for NumPy functions, loop parallelization, and GPU code generation.

BSD-3-Clausecompiled wheel · 3.10+
86.0Mdownloads / mo
tree-sitter Worth it
PyPI · Linguistic · released Jun 2026

Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.

MITcompiled wheel · 3.10+
79.0Mdownloads / mo
llvmlite With conditions
PyPI · Code Generators · released Aug 2026

llvmlite provides a lightweight Python binding to LLVM's IR builder, optimizer, and JIT compiler APIs, enabling you to write JIT compilers and code generators without needing the full LLVM C++ API surface.

BSD-2-Clause AND Apache-2.0 WITH LLVM-exceptioncompiled wheel · 3.10+
69.3Mdownloads / mo

See also libclang · cppyy-cling · clangd-tidy · ziglang · clang-tidy · clang-format · swig · scan-build · lit