Asset Base class
- class starfish.asset.AssetBase(metadata_text: str, did: Optional[str] = None)
Bases:
abc.ABC
,Generic
[starfish.types.AssetBase
]- Parameters
- static calc_asset_id(metadata_text)
- is_asset_type(type_name: str) bool
Returns if this metadata has the correct type
- Parameters
type_name (str) – name of the asset type stored in the metadata
- Returns
True if the metadata type is equal to type_name
- Type
boolean
- property is_bundle: bool
Return True if this asset is a bundle asset and can contain sub assets ( Asset Bundle )
- Returns
True if sub assets can be held within this asset
- Type
boolean
- property is_new: bool
Return True if this asset has not been saved, and can be changed.
- Returns
True if no did has been set
- property metadata: Any
WARNING: The read only version for this metadata, use set_metadata to assign a new metadata. Once you change metadata, the asset id is changed and the did is set to None.
- Returns
The metadata for this asset
- Type