{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/7"}],"enrichment":{"capability":"Provides efficient Python bindings to PicoSAT, a C-based Boolean satisfiability (SAT) solver, allowing you to solve constraint satisfaction problems by finding variable assignments that satisfy logical clauses.","skillfed_tags":["sat-solver","constraint-satisfaction","c-extension"],"use_cases":["Solve constraint satisfaction problems like Sudoku or logic puzzles by encoding them as CNF clauses and finding valid variable assignments.","Enumerate all possible solutions to a satisfiability problem using itersolve() to explore solution spaces efficiently.","Validate software configurations or dependency constraints by encoding them as logical clauses and checking satisfiability.","Build automated reasoning or planning systems that need to find variable assignments satisfying a set of logical constraints.","Prototype SAT-based algorithms without the overhead of calling an external solver process."],"what_it_does":"pycosat wraps PicoSAT, a mature C-based SAT solver, into Python bindings that run at the C level. When you import pycosat, the solver becomes part of your Python process, avoiding subprocess overhead. The package includes the picosat source code (from picosat-965.tar.gz) so no external installation is needed, but compilation during install is required.\n\nYou represent constraint problems as clauses\u2014lists of integers where the sign indicates negation and the absolute value identifies a variable. The main API consists of `solve()`, which returns a single satisfying assignment or \"UNSAT\"/\"UNKNOWN\", and `itersolve()`, which yields all solutions as an iterator. Both support propagation limits, variable counts, and verbosity control. This makes it suitable for problems like configuration validation, logic puzzles, and constraint-based reasoning where you need to find or enumerate satisfying assignments.","worth_installing":"Yes, if you need a lightweight SAT solver integrated directly into Python and are willing to compile a C extension. The package is mature, actively maintained, permissively licensed, and has no known vulnerabilities. High install friction due to compilation is the main trade-off; avoid it if you prefer pure-Python dependencies or already have a preferred SAT solver."},"id":"pycosat","links":{"html":"https://skillfed.io/packages/pycosat","md":"https://skillfed.io/packages/pycosat.md","pypi":"https://pypi.org/project/pycosat/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2023-10-03","license_spdx":null,"license_treatment":"permissive","name":"pycosat","python_support":"unspecified","summary":"bindings to picosat (a SAT solver)"},"popularity":{"monthly_downloads":241612,"position":8873,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.6.6"}
