skillfed

claripy

An abstraction layer for constraint solvers

claripy v9.3.2 900.4K downloads/30d#4,774 on PyPI334
Permissive license BSD-2-Clause Active released

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 claripy

uv

uv add claripy

poetry

poetry add claripy

Installing 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

Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

constraint solver wrappersymbolic execution constraintsz3 abstraction layerbit-vector constraint solvingsolver-agnostic constraints
symbolic-executionconstraint-solvingprogram-analysis

More Mathematics packages