kiwisolver
A fast implementation of the Cassowary constraint solver
Decision gist · record as of 2026-08-14
Yes. kiwisolver is a mature, actively maintained library (first release 2014-01-10, latest 2026-03-09) with no known vulnerabilities, permissive licensing, and strong platform coverage. Install friction is moderate due to C++ compilation, but precompiled wheels are available for all common platforms and Python versions 3.10–3.14. Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; precompiled wheels available for most platforms, but installation may require a C++ compiler on unsupported architectures.
- Medium install friction due to compiled C++ bindings, but well-supported across Python 3.10–3.14 and multiple platforms (Linux, macOS, Windows, ARM).
- Repository is active with recent commits and no known vulnerabilities.
License · maintenance · safety
permissive license (permissive) — Modified BSD License (permissive): you may use, modify, and distribute kiwisolver freely in commercial and open-source projects, provided you retain the copyright notice and license text.
last release 2026-03-09 (158 days) · last repo commit 2026-08-04 · 778 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 205,513,810 downloads/mo, #199 on PyPI
Alternatives
Verify before relying
pip install kiwisolver
import kiwisolver
# Create a solver and variables, add constraints, solve
# See https://kiwisolver.readthedocs.io/en/latest/ for full API- Whether the Python API fully exposes all Cassowary solver features or if some are C++-only.
- Performance characteristics for large constraint systems (number of variables/constraints at which solver becomes impractical).
- Whether the package supports incremental constraint solving or requires full re-solve on each update.
- Concrete Python API signatures and usage patterns beyond the C++ examples in the description.
What it is and what it does
kiwisolver wraps a high-performance C++ implementation of the Cassowary constraint-solving algorithm, which solves systems of linear equality and inequality constraints. The description notes improvements of 10x to 500x over the original Cassowary solver, with typical cases gaining 40x improvement and memory savings exceeding 5x. The package ships with hand-rolled Python bindings, making the solver accessible from Python code without sacrificing performance.
You use kiwisolver by creating a Solver instance, defining Variables, adding Constraints that relate those variables, and then calling updateVariables() to compute the solution. This is commonly used in layout engines, UI frameworks, and any system where you need to automatically determine values that satisfy a set of linear relationships and preferences.
Use it for
- Building responsive UI layout engines that automatically position and size elements based on constraints.
- Solving systems of linear equations where you want to express relationships declaratively rather than procedurally.
- Implementing constraint-based animation or graphics systems that maintain geometric relationships.
- Optimizing resource allocation problems expressed as linear constraints and preferences.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
kiwisolver is a mature, actively maintained library (first release 2014-01-10, latest 2026-03-09) with no known vulnerabilities, permissive licensing, and strong platform coverage. Install friction is moderate due to C++ compilation, but precompiled wheels are available for all common platforms and Python versions 3.10–3.14. Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
Install
kiwisolver on PyPI
Before you install
Medium install friction due to compiled C++ bindings, but well-supported across Python 3.10–3.14 and multiple platforms (Linux, macOS, Windows, ARM). Repository is active with recent commits and no known vulnerabilities.
Requires Python 3.10 or later; precompiled wheels available for most platforms, but installation may require a C++ compiler on unsupported architectures.
License in practice
Modified BSD License (permissive): you may use, modify, and distribute kiwisolver freely in commercial and open-source projects, provided you retain the copyright notice and license text.
Quickstart
pip install kiwisolver
import kiwisolver
# Create a solver and variables, add constraints, solve
# See https://kiwisolver.readthedocs.io/en/latest/ for full API
Verify before relying
- Whether the Python API fully exposes all Cassowary solver features or if some are C++-only.
- Performance characteristics for large constraint systems (number of variables/constraints at which solver becomes impractical).
- Whether the package supports incremental constraint solving or requires full re-solve on each update.
- Concrete Python API signatures and usage patterns beyond the C++ examples in the description.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 158 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 205,513,810 / month, #199 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: GraalPyProgramming Language :: Python :: Implementation :: PyPy |
Evidence: kiwisolver-1.5.0-cp310-cp310-macosx_10_9_universal2.whl; kiwisolver-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl; kiwisolver-1.5.0-cp310-cp310-macosx_11_0_arm64.whl; kiwisolver-1.5.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl; kiwisolver-1.5.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; kiwisolver-1.5.0-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl; kiwisolver-1.5.0-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl; kiwisolver-1.5.0-cp310-cp310-musllinux_1_2_aarch64.whl; kiwisolver-1.5.0-cp310-cp310-musllinux_1_2_ppc64le.whl; kiwisolver-1.5.0-cp310-cp310-musllinux_1_2_s390x.whl; kiwisolver-1.5.0-cp310-cp310-musllinux_1_2_x86_64.whl; kiwisolver-1.5.0-cp310-cp310-win_amd64.whl; kiwisolver-1.5.0-cp310-cp310-win_arm64.whl; kiwisolver-1.5.0-cp311-cp311-macosx_10_9_universal2.whl; kiwisolver-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl; kiwisolver-1.5.0-cp311-cp311-macosx_11_0_arm64.whl; kiwisolver-1.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; kiwisolver-1.5.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; kiwisolver-1.5.0-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl; kiwisolver-1.5.0-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.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 › “cassowary algorithm”
- kiwisolverkiwisolver is a Python binding to a fast C++ implementation of the…
- munkresImplements the Munkres algorithm (Hungarian algorithm) to solve the…
- squarifyComputes treemap layout rectangles from a list of values using the…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
Provides NVIDIA's NCCL runtime library for GPU collective communication operations including all-reduce, all-gather, reduce, broadcast, and reduce-scatter.
Install only if your system has compatible NVIDIA GPUs and CUDA 12 already installed.
See also claripy · python-constraint · quadprog · optlang · clingo · nab-resolver · proxsuite · PuLP · swiglpk · pyvcg