Skip to content

sift_py.asset.config

CLASS DESCRIPTION
AssetConfig

Thin wrapper class for an Asset that can be created from an Asset protobuf object.

AssetConfig

Thin wrapper class for an Asset that can be created from an Asset protobuf object. This provides a more Python-friendly interface than the generated protobuf object.

METHOD DESCRIPTION
from_asset

Creates an AssetConfig from an Asset protobuf object.

to_asset

Converts this AssetConfig to an Asset protobuf object.

ATTRIBUTE DESCRIPTION
asset_id

TYPE: str

created_by_user_id

TYPE: str

created_date

TYPE: datetime

metadata

TYPE: Optional[Dict[str, Union[str, float, bool]]]

modified_by_user_id

TYPE: str

modified_date

TYPE: datetime

name

TYPE: str

organization_id

TYPE: str

tags

TYPE: Optional[List[str]]

asset_id instance-attribute

asset_id: str

created_by_user_id instance-attribute

created_by_user_id: str

created_date instance-attribute

created_date: datetime

metadata class-attribute instance-attribute

metadata: Optional[Dict[str, Union[str, float, bool]]] = (
    None
)

modified_by_user_id instance-attribute

modified_by_user_id: str

modified_date instance-attribute

modified_date: datetime

name instance-attribute

name: str

organization_id instance-attribute

organization_id: str

tags class-attribute instance-attribute

tags: Optional[List[str]] = None

from_asset classmethod

from_asset(asset: Asset) -> AssetConfig

Creates an AssetConfig from an Asset protobuf object.

PARAMETER DESCRIPTION
asset

The Asset protobuf object to convert.

TYPE: Asset

RETURNS DESCRIPTION
AssetConfig

An AssetConfig instance with the data from the Asset.

to_asset

to_asset() -> Asset

Converts this AssetConfig to an Asset protobuf object.

RETURNS DESCRIPTION
Asset

An Asset protobuf object with the data from this config.