Registry / data / simplesat

simplesat

JSON →
library0.9.2pypypi✓ verified 80d ago

Simplesat is a Python library providing a prototype for SAT-based dependency handling, designed for resolving package and software dependencies using satisfiability algorithms. It is currently at version 0.9.2. The release cadence is irregular, with recent updates primarily focusing on Python version compatibility and bug fixes rather than rapid feature additions. The API is explicitly stated as being subject to change.

pip install simplesat
INSTALL
IMPORT
SIG · SIMPLESAT
S
simplesat
datapythonv0.9.2
Install
2.1s avg
Import
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 30.5MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.1s · import 0.000s · 31MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

InstallRequirement
from simplesat import InstallRequirement
from simplesat import Solver
Pool
from simplesat import Pool
Request
from simplesat import Request

This quickstart demonstrates how to define solvables (e.g., software packages), create a repository, add constraints, and use the solver to find a compatible set of solvables.

from simplesat.constraints import EQ, GE from simplesat.repository import Repository, Solvable from simplesat.solver import Solver # Define some solvables (e.g., packages and their versions) foo_1_0 = Solvable("foo", "1.0") foo_1_1 = Solvable("foo", "1.1") bar_1_0 = Solvable("bar", "1.0") # Create a repository of available solvables repo = Repository([foo_1_0, foo_1_1, bar_1_0]) # Initialize the solver with the repository solver = Solver(repo) # Add constraints to the solver solver.add_constraint(EQ("foo", "1.0")) # Require 'foo' version '1.0' solver.add_constraint(GE("bar", "1.0")) # Require 'bar' version '1.0' or greater # Solve the problem try: solution = solver.solve() print(f"Solution found: {solution}") except Exception as e: print(f"Failed to find a solution: {e}")
Debug
Known issues
breakingThe project summary explicitly states: 'This is a work in progress, do not expect any API not to change at this point.' This means breaking changes can occur between minor or even patch versions without a major version increment.
fix
Always pin exact versions of `simplesat` in production. Regularly review the GitHub repository's release notes for breaking changes before upgrading. Test your application thoroughly with new versions.
affects: <1.0.0
gotchaSimplesat is specifically designed for 'SAT-based dependency handling' and might not behave as expected for general-purpose constraint satisfaction problems. Its focus is on package-like dependencies.
fix
Ensure your problem domain aligns with dependency resolution. Review the source code and examples for how 'Solvables' and 'Constraints' are intended to be modeled. For general CSPs, consider other libraries.
affects: All
gotchaIf your set of constraints leads to a cyclic dependency, the solver will likely report an unsatisfiable problem. While version 0.9.2 improved the error message for this specific case, it remains a common pitfall in constraint definition.
fix
Carefully review your constraints for implicit or explicit cycles. Use the more descriptive error messages (available from v0.9.2+) to pinpoint the source of the cycle. Rethink your dependency graph to break cycles.
affects: All
Upgrade
Version history
0.9.2latest on PyPI · released Apr 3, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
24
OpenAI (training)
1
Resources
simplesat — pip install simplesat · libregistry