claripy
An abstraction layer for constraint solvers
What it is and what it does
Claripy is a constraint-solving abstraction layer that sits between your code and underlying solvers like Z3. It provides a unified interface for building and solving symbolic constraints over bit-vectors and other domains, shielding you from solver-specific APIs. The package is part of the angr ecosystem and is commonly used in symbolic execution, program analysis, and formal verification workflows.
You define symbolic variables and concrete values, add constraints to a solver, and then query the solver for satisfying assignments. The abstraction lets you swap solvers or combine multiple backends without rewriting constraint-building logic. With active maintenance, support for modern Python versions, and only two runtime dependencies, it integrates cleanly into analysis pipelines.
Use it for:
- Symbolic execution: Build and solve path constraints in program analysis without solver-specific code.
- Formal verification: Express and verify properties of systems using bit-vector constraints and symbolic reasoning.
- Constraint-based testing: Generate test inputs by solving constraints over program variables.
- Program analysis: Reason about reachability and feasibility of code paths in static or dynamic analysis.
- Reverse engineering: Solve for inputs that satisfy observed program behavior or constraints.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Claripy is an abstraction layer for constraint solvers that wraps Z3 and other backends, letting you build and solve symbolic constraints over bit-vectors and other domains without being tied to a specific solver implementation.
Yes, if you need constraint solving in program analysis, symbolic execution, or formal verification. The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. It is well-suited for researchers and practitioners working with symbolic reasoning or the angr framework. Not necessary for general-purpose applications.
Install
claripy on PyPI
pip
pip install claripyuv
uv add claripypoetry
poetry add claripyInstalling claripy
Before you install
Installation is straightforward with only two runtime dependencies (cachetools and z3-solver). The package is actively maintained with a recent release and steady commit activity, supporting current Python versions (3.12, 3.13, 3.14).
License in practice
BSD-2-Clause is a permissive license allowing broad use, modification, and distribution with minimal restrictions—suitable for most projects including commercial ones.
Quickstart
pip install claripy
import claripy
a = claripy.BVV(3, 32)
b = claripy.BVS('var_b', 32)
s = claripy.Solver()
s.add(b > a)
print(s.eval(b, 1)[0])
Requires Python 3.12 or later; z3-solver must be installed as a runtime dependency.
Verify before relying
- Whether claripy supports constraint solvers other than Z3 as backends, or if Z3 is the primary/only solver currently wrapped.
- Performance characteristics when solving large constraint systems or handling complex symbolic expressions.
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — cachetools, z3-solver |
| Maintenance | actively maintained — 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 900,429/month — #4,774 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: claripy-9.3.2-py3-none-any.whl
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
z3-solverZ3 is a theorem prover and SMT (satisfiability…
permissive · top 5,000 on PyPI
optlangOptlang formulates and solves linear,…
permissive · top 15,000 on PyPI
python-constraintSolves constraint satisfaction problems (CSPs)…
permissive · top 15,000 on PyPI
PyBoolectorPython wrapper around Boolector, a…
permissive · top 15,000 on PyPI
nab-resolverA generic PubGrub-style dependency resolver…
permissive · top 15,000 on PyPI
ailmentAILment provides the intermediate language (IL)…
permissive · top 15,000 on PyPI
clingoClingo is a Python binding to the clingo Answer…
permissive · top 15,000 on PyPI
ortoolsOR-Tools provides constraint programming,…
permissive · top 5,000 on PyPI
cvxpy-basecvxpy-base provides compiled solver kernels for…
permissive · top 15,000 on PyPI