Rapidata asset manager
RapidataAssetManager #
Upload media once and reuse the reference across job definitions.
Access this manager via attr:
RapidataClient.asset.
Source code in src/rapidata/rapidata_client/asset/rapidata_asset_manager.py
upload #
upload(asset: str) -> UploadedAsset
Upload a local file or a URL and return a reference to it.
Pass the reference as a datapoint or media context of any
create_*_job_definition; it is not uploaded again. Uploads share the
SDK's upload cache, so uploading the same path or URL twice returns the
same reference without a second upload.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asset
|
str
|
A local file path or an http(s) URL. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UploadedAsset |
UploadedAsset
|
The reference to the uploaded media. |