antimatter.capsule
#
Module Contents#
Classes#
- class antimatter.capsule.CapsuleBindings(capsule_session: antimatter_engine.PySessionCapsule, failed: List[str])#
- read_extras(read_params: Dict[List[str], List[str]]) List[str] #
Get the extras field stored in the capsule.
- Parameters:
read_params – The parameters for reading the capsule’s data.
- Returns:
The extras string.
- read_all(read_params: Dict) Tuple[List[str], List[List[bytes]], str] #
Get the column definitions, redacted data and extras from the underlying capsule.
- Parameters:
read_params – The parameters for reading the capsule’s data.
- Returns:
The column definition list, a 2D list of list of string containing the redacted data, and the extras string.
- read_all_with_tags(read_params: Dict) Tuple[List[antimatter_engine.PyTag], List[str], List[List[antimatter_engine.PyTag]], List[List[List[bytes]]], List[List[List[antimatter_engine.PySpanTag]]], str] #
Get the tag information (capsule, column, etc.), column definitions, redacted data and extras from the underlying capsule. This method is meant to provide insight into what is being tagged along with the corresponding tag that was applied.
- Parameters:
read_params – The parameters for reading the capsule’s data.
- Returns:
The list of capsule tags, column definition list, list of column tags, a 2D list of list of string containing the redacted data, a list of data span tags, and the extras string.
- capsule_ids() List[str] #
Get a list capsule IDs associated with this CapsuleBinding.
- domain_id() str #
Get the domain ID associated with the capsule.
- class antimatter.capsule.CapsuleMeta#
- datatype_in: antimatter.datatype.datatypes.Datatype#
- extra: Dict[str, Any]#
- class antimatter.capsule.Capsule(capsule_binding: CapsuleBindings)#
- property capsule: CapsuleBindings#
Get the capsule binding for the underlying Antimatter Capsule.
- Returns:
The Antimatter Capsule binding.
- data(read_params: Dict[str, str] = None, **kwargs) Any #
Get the data from the underlying Antimatter Capsule using the supplied read parameters. This will raise an error if the capsule is sealed.
- Parameters:
read_params – The parameters for reading the capsule’s data.
kwargs – The extra arguments to pass to the data handler.
- Returns:
The data in its default format.
- data_as(dt: antimatter.datatype.datatypes.Datatype | str, read_params: Dict[str, str] = None, **kwargs) Any #
Get the data from the underlying Antimatter Capsule using the supplied read parameters. This will raise an error if the capsule is sealed.
- Parameters:
read_params – The parameters for reading the capsule’s data.
dt – The datatype to use for reading data.
kwargs – The extra arguments to pass to the data handler.
- Returns:
The data in the specified format.
- data_with_tags(read_params: Dict[str, str] = None, column_major: bool = False, inline=False, **kwargs) List[List[Dict]] #
Get the data and related tag information from the underlying Antimatter Capsule using the supplied read parameters. This will raise an error if the capsule is sealed.
- Parameters:
read_params – The parameters for reading the capsule’s data.
column_major – The orientation to use for the return list. A value of True results in data being grouped together by column versus a value of False which results in data being grouped together by row.
inline – The option to markup the data with SpanTag information similar to applying HTML blocks.
kwargs – The extra arguments to pass to the data handler.
- Returns:
The list of dictionaries providing insight to the Tags that were found within a data item.
- capsule_ids() List[str] #
Get a list capsule IDs associated with this capsule bundle.
- domain_id() str #
Get the domain ID associated with this capsule.