skillfed

python-sat

A Python library for prototyping with SAT oracles

python-sat v1.9.dev14 281.8K downloads/30d#8,092 on PyPI460
Permissive license MIT Active released

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-sat

uv

uv add python-sat

poetry

poetry add python-sat

Installing 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

SAT solver pythonboolean satisfiability libraryMaxSAT solverMUS extractorconstraint satisfaction pythonSAT oracle wrappercardinality encoding
sat-solvingconstraint-satisfactionresearch-tool

More Mathematics packages