Skip to main content
Version: 1.2.3

ExpectationSuite

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
  • name – Name of the Expectation Suite

  • expectations – Expectation Configurations to associate with this Expectation Suite.

  • suite_parameters – Suite parameters to be substituted when evaluating Expectations.

  • meta – Metadata related to the suite.

  • id – Great Expectations Cloud id for this Expectation Suite.

add_expectation(expectation: _TExpectation) _TExpectation#

Add an Expectation to the collection.

delete_expectation(expectation: Expectation) Expectation#

Delete an Expectation from the collection.

Example

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

KeyError – Expectation not found in suite.

save() None#

Save this ExpectationSuite.

to_json_dict() Dict[str, JSONValues]#

Returns a JSON-serializable dict representation of this ExpectationSuite.

Returns

A JSON-serializable dict representation of this ExpectationSuite.