def __init__()

in pydeequ/checks.py [0:0]


    def __init__(self, spark_session: SparkSession, level: CheckLevel, description: str, constraints: list = None):
        """ "

        :param SparkSession spark_session: SparkSession
        :param CheckLevel level: Assertion level of the check group. If any of the constraints fail this level is used for
                the status of the check.
        :param str description: The name describes the check block. Generally it will be used to show in the logs.
        :param list constraints: The constraints to apply when this check is run. New ones can be added
                and will return a new object
        """
        self._spark_session = spark_session
        self._sc = spark_session.sparkContext
        self._jvm = spark_session._jvm
        self.level = level
        self._java_level = self.level._get_java_object(self._jvm)
        self._check_java_class = self._jvm.com.amazon.deequ.checks.Check
        self.description = description
        self._Check = self._check_java_class(
            self._java_level, self.description, getattr(self._check_java_class, "apply$default$3")()
        )
        self.constraints = constraints or []
        for constraint in self.constraints:
            self.addConstraint(constraint)