taps.data.transform¶
DataTransformerConfig ¶
Data transformer configuration abstract base class.
add_argument_group()
classmethod
¶
add_argument_group(
parser: ArgumentParser,
*,
argv: Sequence[str] | None = None,
required: bool = True
) -> None
Add model fields as arguments of an argument group on the parser.
Parameters:
-
parser(ArgumentParser) –Parser to add a new argument group to.
-
argv(Sequence[str] | None, default:None) –Optional sequence of string arguments.
-
required(bool, default:True) –Mark arguments without defaults as required.
Source code in taps/config.py
get_transformer()
abstractmethod
¶
get_transformer() -> DataTransformer[Any]
DataTransformer ¶
Bases: Protocol[IdentifierT]
Object transformer protocol.
close() ¶
Close the transformer.
The transformer is only closed by the client once the application has finished executing (or raised an exception).
transform() ¶
Transform the object into an identifier.
Parameters:
-
obj(T) –Object to transform.
Returns:
-
IdentifierT–Identifier object that can be used to resolve
obj.