AssetBucket.is_consistent#
- AssetBucket.is_consistent(assets, violations=False)[source]
Check if the asset belongs to the interval [lower_bound, upper_bound].
- Parameters:
assets (dict[str, Any]) – The assets to be checked.
violations (bool, optional) – If True, return a dictionary containing only the violated keys and their asset/constraint values. If False (default), return a boolean indicating overall satisfaction.
- Returns:
- If violations=False: True if all constraints are satisfied,
False otherwise.
- If violations=True: A dictionary of violations,
empty if all assets are consistent.
- Return type:
bool | dict[str, Any]