python-constraint is a module implementing support for handling CSPs
(Constraint Solving Problems) over finite domains