Item (autotransform.item.base)

The base class and associated classes for Item components. Can be used as a generic Item.

class autotransform.item.base.Item(*, key: str, extra_data: Dict[str, Any] | None = None)

Bases: NamedComponent

The base for Item components. Returned by Input components and act as the units on which AutoTransform operates.

key

A unique key used to represent this item, such as a file path.

Type:

str

extra_data

Any extra data that needs to be associated with this Item. Should be JSON encodable. Defaults to None.

Type:

Optional[Dict[str, Any]], optional

name

The name of the component.

Type:

ClassVar[ItemName]

extra_data: Dict[str, Any] | None
key: str
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'extra_data': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None), 'key': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

name: ClassVar[ItemName] = 'generic'
class autotransform.item.base.ItemName(value)

Bases: str, Enum

A simple enum for mapping.

FILE = 'file'
GENERIC = 'generic'