Skip to main content
Version: 1.3.7

ExpectationSuite

Signature

class great_expectations.ExpectationSuite(name: Optional[str] = None, expectations: Optional[Sequence[Union[dict, ExpectationConfiguration, Expectation]]] = None, suite_parameters: Optional[dict] = None, meta: Optional[dict] = None, notes: str | list[str] | None = None, id: Optional[str] = None)

Set-like collection of Expectations.

Parameters

NameDescription

name

Name of the Expectation Suite

Methods

Signature

add_expectation(expectation: _TExpectation) → _TExpectation

Add an Expectation to the collection.

Signature

delete_expectation(expectation: Expectation) → Expectation

Delete an Expectation from the collection.

Example

>>> suite.delete_expectation(suite.expectations[0])

Raises

TypeDescription

KeyError

Expectation not found in suite.

Signature

save()None

Save this ExpectationSuite.

Signature

to_json_dict() → Dict[str, JSONValues]

Returns a JSON-serializable dict representation of this ExpectationSuite.

Returns

TypeDescription

Dict[str, JSONValues]

A JSON-serializable dict representation of this ExpectationSuite.