{"library":"simplesat","title":"Simplesat","description":"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.","language":"python","status":"maintenance","last_verified":"Fri Apr 17","install":{"commands":["pip install simplesat"],"cli":null},"imports":["from simplesat.solver import Solver","from simplesat.repository import Repository","from simplesat.repository import Solvable","from simplesat.constraints import EQ"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from simplesat.constraints import EQ, GE\nfrom simplesat.repository import Repository, Solvable\nfrom simplesat.solver import Solver\n\n# Define some solvables (e.g., packages and their versions)\nfoo_1_0 = Solvable(\"foo\", \"1.0\")\nfoo_1_1 = Solvable(\"foo\", \"1.1\")\nbar_1_0 = Solvable(\"bar\", \"1.0\")\n\n# Create a repository of available solvables\nrepo = Repository([foo_1_0, foo_1_1, bar_1_0])\n\n# Initialize the solver with the repository\nsolver = Solver(repo)\n\n# Add constraints to the solver\nsolver.add_constraint(EQ(\"foo\", \"1.0\")) # Require 'foo' version '1.0'\nsolver.add_constraint(GE(\"bar\", \"1.0\")) # Require 'bar' version '1.0' or greater\n\n# Solve the problem\ntry:\n    solution = solver.solve()\n    print(f\"Solution found: {solution}\")\nexcept Exception as e:\n    print(f\"Failed to find a solution: {e}\")","lang":"python","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}