llvmlite
lightweight wrapper around basic LLVM functionality
Decision gist · record as of 2026-08-14
Yes, if you are building a JIT compiler, code generator, or extending a framework like Numba. The package is actively maintained, has no known vulnerabilities, and offers a stable, well-designed alternative to direct LLVM C++ bindings. Install friction is moderate due to the LLVM 22.x.x system dependency, but pre-built wheels are available for common platforms. Not necessary for most application development.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- LLVM 22.x.x must be installed on your system; llvmlite is a binding to the LLVM library, not a standalone compiler.
- Medium install friction due to pre-built wheels across multiple Python versions and architectures, but requires LLVM 22.x.x to be present on your system.
- The package is actively maintained with a recent release and no known vulnerabilities.
License · maintenance · safety
BSD-2-Clause AND Apache-2.0 WITH LLVM-exception (permissive) — Dual-licensed under BSD-2-Clause and Apache-2.0 WITH LLVM-exception (permissive). Both licenses allow commercial and private use with minimal restrictions, making this safe for most projects.
last release 2026-08-11 (3 days) · last repo commit 2026-08-12 · 2,279 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 69,292,894 downloads/mo, #473 on PyPI
Alternatives
Verify before relying
pip install llvmlite
import llvmlite.binding as llvm
from llvmlite import ir
module = ir.Module(name="example")
func_type = ir.FunctionType(ir.IntType(32), [ir.IntType(32)])
func = ir.Function(module, func_type, name="add_one")- Whether pre-built wheels include LLVM 22.x.x or if it must be installed separately via system package manager
- Performance characteristics compared to direct LLVM C API usage for specific workloads
What it is and what it does
llvmlite is a lightweight Python wrapper around LLVM's core compilation infrastructure, designed specifically for building JIT compilers and code generators. Rather than exposing the full LLVM C++ API (which is large and frequently changes), it provides a stable, pure-Python IR builder and ctypes bindings to LLVM's C API for optimization and JIT compilation. The package was originally created for Numba's needs and decouples IR construction from LLVM's internal changes, making it easier to maintain across LLVM versions.
The binding uses a three-layer architecture: a small C wrapper around essential LLVM C++ APIs, a ctypes Python layer for the C API, and pure Python code for the IR builder subset. This approach avoids the memory-management pitfalls of direct C++ bindings and provides better error messages by materializing LLVM modules through the IR parser rather than step-by-step C++ API calls. It requires LLVM 22.x.x and Python 3.10 or later.
Use it for
- Build a custom JIT compiler for a domain-specific language without wrestling with full LLVM C++ API complexity
- Generate optimized machine code at runtime from high-level Python representations of computation
- Extend Numba or create similar ahead-of-time or JIT compilation frameworks for numerical code
- Prototype compiler backends and IR transformations with stable, version-independent LLVM bindings
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building a JIT compiler, code generator, or extending a framework like Numba.
The package is actively maintained, has no known vulnerabilities, and offers a stable, well-designed alternative to direct LLVM C++ bindings. Install friction is moderate due to the LLVM 22.x.x system dependency, but pre-built wheels are available for common platforms. Not necessary for most application development.
Install
llvmlite on PyPI
Before you install
Medium install friction due to pre-built wheels across multiple Python versions and architectures, but requires LLVM 22.x.x to be present on your system. The package is actively maintained with a recent release and no known vulnerabilities.
LLVM 22.x.x must be installed on your system; llvmlite is a binding to the LLVM library, not a standalone compiler.
License in practice
Dual-licensed under BSD-2-Clause and Apache-2.0 WITH LLVM-exception (permissive). Both licenses allow commercial and private use with minimal restrictions, making this safe for most projects.
Quickstart
pip install llvmlite
import llvmlite.binding as llvm
from llvmlite import ir
module = ir.Module(name="example")
func_type = ir.FunctionType(ir.IntType(32), [ir.IntType(32)])
func = ir.Function(module, func_type, name="add_one")
Verify before relying
- Whether pre-built wheels include LLVM 22.x.x or if it must be installed separately via system package manager
- Performance characteristics compared to direct LLVM C API usage for specific workloads
Package facts
| License | BSD-2-Clause AND Apache-2.0 WITH LLVM-exception permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 69,292,894 / month, #473 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Code GeneratorsTopic :: Software Development :: Compilers |
Evidence: llvmlite-0.49.0-cp310-cp310-macosx_12_0_arm64.whl; llvmlite-0.49.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; llvmlite-0.49.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; llvmlite-0.49.0-cp310-cp310-win_amd64.whl; llvmlite-0.49.0-cp311-cp311-macosx_12_0_arm64.whl; llvmlite-0.49.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; llvmlite-0.49.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; llvmlite-0.49.0-cp311-cp311-win_amd64.whl; llvmlite-0.49.0-cp312-cp312-macosx_12_0_arm64.whl; llvmlite-0.49.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; llvmlite-0.49.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; llvmlite-0.49.0-cp312-cp312-win_amd64.whl; llvmlite-0.49.0-cp313-cp313-macosx_12_0_arm64.whl; llvmlite-0.49.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; llvmlite-0.49.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; llvmlite-0.49.0-cp313-cp313-win_amd64.whl; llvmlite-0.49.0-cp314-cp314-macosx_12_0_arm64.whl; llvmlite-0.49.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; llvmlite-0.49.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; llvmlite-0.49.0-cp314-cp314t-macosx_12_0_arm64.whl
Tags
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 › “LLVM Python binding”
- llvmlitellvmlite provides a lightweight Python binding to LLVM's IR builder,…
- llvm-testing-toolsProvides LLVM testing utilities like FileCheck and split-file as…
- clangProvides Python bindings to libclang, allowing you to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Code Generators packages
Proto Plus wraps protocol buffers to provide Python classes that behave like native Python types while maintaining protocol buffer serialization and schema validation.
Install it if you're working with protocol buffers in Python and want a more Pythonic interface, or if you're using Google Cloud libraries that depend on it.
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.
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.
Beartype is a runtime type checker that validates Python type hints at function call time, catching type violations before they cause downstream bugs.
Install it if you want runtime type safety for your annotated code or need to validate type hints on third-party packages.
astor converts Python abstract syntax trees (ASTs) back to readable source code and provides tools for AST manipulation, inspection, and non-recursive tree traversal.
Install it if you need AST round-tripping or advanced tree inspection.
GenSON generates JSON Schema documents from JSON objects and can merge multiple schemas together, inferring a unified schema that describes the common structure of your data.
See also numba · clang · cppyy-cling · libclang · nvidia-nvjitlink · llvm-testing-tools · pybind11-global · lit · ccimport · torch-c-dlpack-ext