python-sat
A Python library for prototyping with SAT oracles
What it is and what it does
PySAT is a Python wrapper around state-of-the-art Boolean satisfiability solvers, designed for researchers and developers who need to prototype algorithms that rely on SAT solving. It abstracts the complexity of calling low-level solver implementations by providing a simple Python interface, and includes support for cardinality and pseudo-Boolean constraint encodings. The package is intended for building higher-level tools—MaxSAT solvers, MUS/MCS extractors, or domain-specific applications—that repeatedly invoke a SAT oracle as part of their logic.
The library depends only on six and is actively maintained. Installation requires compilation of native wheels, which are available across macOS, Linux, and Windows architectures. It has no known security vulnerabilities and carries a permissive MIT license.
Use it for:
- Prototype a MaxSAT solver that iteratively calls a SAT oracle to find optimal assignments
- Extract minimal unsatisfiable subsets or minimal correction sets from constraint problems
- Encode cardinality constraints and solve combinatorial optimization problems in Python
- Build a verification or model-checking tool that relies on SAT solving as a core component
- Experiment with SAT-based algorithms for planning, scheduling, or configuration problems
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PySAT wraps modern Boolean satisfiability solvers and provides cardinality and pseudo-Boolean encodings, letting you call SAT oracles from Python code.
Yes, if you need to prototype SAT-based algorithms or build tools that rely on SAT solving. The package is actively maintained, has no known vulnerabilities, and carries a permissive license. Medium install friction from native compilation is a minor trade-off for access to modern solvers. Not recommended if you only need a pure-Python SAT solver or have no need for low-level solver integration.
Install
python-sat on PyPI
pip
pip install python-satuv
uv add python-satpoetry
poetry add python-satInstalling python-sat
Before you install
Medium install friction due to compiled wheel distributions across multiple Python versions and platforms. The package is actively maintained with a recent release and a stable repository.
License in practice
MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions.
Quickstart
pip install python-sat
import python_sat
# Create and solve a SAT problem
# See https://pysathq.github.io for detailed usage examples
Requires a C compiler and build tools to compile native wheels for your platform during installation.
Verify before relying
- Which specific SAT solvers are bundled or available through the package
- Whether the package supports incremental solving workflows
- Performance characteristics compared to calling solvers directly
- Concrete API examples for cardinality and pseudo-Boolean encodings
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — six |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 281,820/month — #8,092 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_sat-1.9.dev14-cp310-cp310-macosx_10_9_x86_64.whl; python_sat-1.9.dev14-cp310-cp310-macosx_11_0_arm64.whl; python_sat-1.9.dev14-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_sat-1.9.dev14-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_sat-1.9.dev14-cp310-cp310-musllinux_1_2_aarch64.whl; python_sat-1.9.dev14-cp310-cp310-musllinux_1_2_x86_64.whl; python_sat-1.9.dev14-cp310-cp310-win_amd64.whl; python_sat-1.9.dev14-cp311-cp311-macosx_10_9_x86_64.whl; python_sat-1.9.dev14-cp311-cp311-macosx_11_0_arm64.whl; python_sat-1.9.dev14-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_sat-1.9.dev14-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_sat-1.9.dev14-cp311-cp311-musllinux_1_2_aarch64.whl; python_sat-1.9.dev14-cp311-cp311-musllinux_1_2_x86_64.whl; python_sat-1.9.dev14-cp311-cp311-win_amd64.whl; python_sat-1.9.dev14-cp312-cp312-macosx_10_13_x86_64.whl; python_sat-1.9.dev14-cp312-cp312-macosx_11_0_arm64.whl; python_sat-1.9.dev14-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_sat-1.9.dev14-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_sat-1.9.dev14-cp312-cp312-musllinux_1_2_aarch64.whl; python_sat-1.9.dev14-cp312-cp312-musllinux_1_2_x86_64.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
pycosatProvides efficient Python bindings to PicoSAT,…
permissive · top 15,000 on PyPI
simplesatSolves package dependency resolution using…
permissive · top 15,000 on PyPI
PyBoolectorPython wrapper around Boolector, a…
permissive · top 15,000 on PyPI
python-constraintSolves constraint satisfaction problems (CSPs)…
permissive · top 15,000 on PyPI
cvc5cvc5 is a satisfiability modulo theories (SMT)…
unclear · top 15,000 on PyPI
qpsolversProvides a unified Python interface to solve…
copyleft · top 5,000 on PyPI
claripyClaripy is an abstraction layer for constraint…
permissive · top 5,000 on PyPI
clingoClingo is a Python binding to the clingo Answer…
permissive · top 15,000 on PyPI
z3-solverZ3 is a theorem prover and SMT (satisfiability…
permissive · top 5,000 on PyPI
ortoolsOR-Tools provides constraint programming,…
permissive · top 5,000 on PyPI