facile_rs.utils.radar¶
Module Contents¶
Functions¶
Fetch RADAR token using the RADAR API. |
|
Create a dataset in the given RADAR workspace, using the token provided in headers. |
|
Update a dataset’s metadata in the given RADAR workspace. |
|
Upload assets to a RADAR dataset. |
Data¶
API¶
- logger = 'getLogger(...)'¶
- fetch_radar_token(radar_url, client_id, client_secret, redirect_url, username, password)¶
Fetch RADAR token using the RADAR API.
- Parameters:
radar_url – URL to the RADAR repository
client_id – RADAR client ID
client_secret – RADAR client secret
redirect_url – RADAR redirect URL
username – RADAR username
password – RADAR password
- Returns:
RADAR token for the given user
- create_radar_dataset(radar_url, workspace_id, headers, radar_dict)¶
Create a dataset in the given RADAR workspace, using the token provided in headers.
- Parameters:
radar_url – URL to the RADAR repository
workspace_id – RADAR workspace ID
headers – request headers. Typically the RADAR token, as returned by fetch_radar_token
radar_dict – RADAR metadata dictionary, as returned by RadarMetadata.as_dict()
- Returns:
RADAR dataset ID
- prepare_radar_dataset(radar_url, dataset_id, headers)¶
” Prepare a dataset for review in RADAR.
- Parameters:
radar_url – URL to the RADAR repository
dataset_id – RADAR dataset ID
headers – request headers. Typically the RADAR token, as returned by fetch_radar_token
- Returns:
RADAR response to the request
- update_radar_dataset(radar_url, dataset_id, headers, radar_dict)¶
Update a dataset’s metadata in the given RADAR workspace.
- Parameters:
radar_url – URL to the RADAR repository
dataset_id – RADAR dataset ID
headers – request headers. Typically the RADAR token, as returned by fetch_radar_token
radar_dict – RADAR metadata dictionary, as returned by RadarMetadata.as_dict()
- Returns:
RADAR dataset ID
- upload_radar_assets(radar_url, dataset_id, headers, assets, path)¶
Upload assets to a RADAR dataset.
- Parameters:
radar_url – URL to the RADAR repository
dataset_id – RADAR dataset ID
headers – request headers. Typically the RADAR token, as returned by fetch_radar_token
assets (list) – locations of assets to upload
path – location where the assets are collected before upload