Constraint#

from tmlt.analytics import Constraint
class tmlt.analytics.Constraint#

Bases: ABC

Base class representing a known, enforceable fact about a table.

Constraints provide information about the contents of a table to help produce differentially-private results. For example, a constraint might say that each ID in a table corresponds to no more than two rows in that table (the MaxRowsPerID constraint). Constraints are applied via the QueryBuilder.enforce() method.

This class is a base class for all constraints, and cannot be used directly.