Skip to main content

infrahub_sdk.transforms

Classes

InfrahubTransform

Methods:

client

client(self) -> InfrahubClient

transform

transform(self, data: dict) -> Any

collect_data

collect_data(self) -> dict

Query the result of the GraphQL Query defined in self.query and return the result

run

run(self, data: dict | None = None) -> Any

Execute the transformation after collecting the data from the GraphQL query.

The result of the check is determined based on the presence or not of ERROR log messages.

Args:

  • data: The data on which to run the transform. Data will be queried from the API if not provided

Returns: Transformed data