xplain.Dimension
- class xplain.Dimension(object_name: str, dimension_name: str, ref_session)
Bases:
object
Represents a dimension object with methods to retrieve its attributes.
- Attributes:
object_name (str): Name of the associated object. dimension_name (str): Name of the dimension. _ref_session (Session): Reference to the session object for API interaction.
- get_attribute(attribute_name: str)
Retrieves the attribute instance with the specified name.
- Args:
attribute_name (str): The name of the attribute to retrieve.
- Returns:
xplain.Attribute: An instance of the attribute, or None if not found.
- Raises:
ValueError: If ‘attribute_name’ is not provided or invalid. RuntimeError: If the API call to fetch details fails.
- get_attributes() list
Retrieves the list of attributes attached to this dimension.
- Returns:
list: A list of xplain.Attribute instances.
- Raises:
RuntimeError: If the API call to fetch details fails.
- get_name() str
Returns the dimension name.