Asset¶
The Asset class enables access to the UP42 assets in the storage. Assets are results of orders or results of jobs with download blocks.
Use an existing asset:
asset = up42.initialize_asset(asset_id="8c2dfb4d-bd35-435f-8667-48aea0dce2da")
Source code in up42/asset.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
Functions¶
download(output_directory=None, unpacking=True)
¶
Downloads the asset. Unpacking the downloaded file will happen as default.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
output_directory |
Union[str, Path, None]
|
The file output directory, defaults to the current working directory. |
None
|
unpacking |
bool
|
By default the final result which is in TAR or ZIP archive format will be unpacked. |
True
|
Returns:
Type | Description |
---|---|
List[str]
|
List of the downloaded asset filepaths. |
Source code in up42/asset.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
info()
property
¶
Gets and updates the asset metadata information.
Source code in up42/asset.py
42 43 44 45 46 47 48 49 50 |
|
source()
property
¶
Gets the source of the Asset. One of TASKING
, ORDER
, BLOCK
, UPLOAD
.
Source code in up42/asset.py
52 53 54 55 56 57 58 59 |
|