Utils
Utility functions for Scout web API
- bosdyn.scout.utils.get_credentials() [<class 'str'>, <class 'str'>] [source]
Obtains credentials from either environment variables or terminal inputs
- Returns
username(str): the username for the Scout instance password(str): the password for the Scout instance
Deprecated since version 4.0.0: Please, use get_api_token instead.
- bosdyn.scout.utils.get_latest_created_at_for_run_events(scout_client: bosdyn.scout.client.ScoutClient, params: Dict = {}) datetime [source]
Given a dictionary of query params, returns the max created at time for run events
- Parameters:
scout_client – the client for Scout web API
params – the query params associated with the get request
- Raises:
RequestExceptions – exceptions thrown by the Requests library
UnauthenticatedScoutClientError – indicates that the scout client is not authenticated properly
- Returns:
The max created at time for run events in datetime
Deprecated since version 4.0.0: Scout has been renamed to Orbit. Please, use bosdyn-orbit package instead of bosdyn-scout.
- bosdyn.scout.utils.get_latest_run_capture_resources(scout_client: bosdyn.scout.client.ScoutClient, params: Dict = {}) List [source]
Given a dictionary of query params, returns the latest run capture resources in json format
- Parameters:
scout_client – the client for Scout web API
params – the query params associated with the get request
- Raises:
RequestExceptions – exceptions thrown by the Requests library
UnauthenticatedScoutClientError – indicates that the scout client is not authenticated properly
- Returns:
A list of resources obtained from Scout’s RESTful endpoint
Deprecated since version 4.0.0: Scout has been renamed to Orbit. Please, use bosdyn-orbit package instead of bosdyn-scout.
- bosdyn.scout.utils.get_latest_created_at_for_run_captures(scout_client: bosdyn.scout.client.ScoutClient, params: Dict = {}) datetime [source]
Given a dictionary of query params, returns the max created at time for run captures
- Parameters:
scout_client – the client for Scout web API
params – the query params associated with the get request
- Raises:
RequestExceptions – exceptions thrown by the Requests library
UnauthenticatedScoutClientError – indicates that the scout client is not authenticated properly
- Returns:
The max created at time for run captures in datetime
Deprecated since version 4.0.0: Scout has been renamed to Orbit. Please, use bosdyn-orbit package instead of bosdyn-scout.
- bosdyn.scout.utils.get_latest_run_resource(scout_client: bosdyn.scout.client.ScoutClient, params: Dict = {}) List [source]
Given a dictionary of query params, returns the latest run resource in json format
- Parameters:
scout_client – the client for Scout web API
params – the query params associated with the get request
- Raises:
RequestExceptions – exceptions thrown by the Requests library
UnauthenticatedScoutClientError – indicates that the scout client is not authenticated properly
- Returns:
A list corresponding to a run resource obtained from Scout’s RESTful endpoint in json
Deprecated since version 4.0.0: Scout has been renamed to Orbit. Please, use bosdyn-orbit package instead of bosdyn-scout.
- bosdyn.scout.utils.get_latest_run_in_progress(scout_client: bosdyn.scout.client.ScoutClient, params: Dict = {}) List [source]
Given a dictionary of query params, returns the latest running resource in json format
- Parameters:
scout_client – the client for Scout web API
params – the query params associated with the get request
- Raises:
RequestExceptions – exceptions thrown by the Requests library
UnauthenticatedScoutClientError – indicates that the scout client is not authenticated properly
- Returns:
A list corresponding to a run obtained from Scout’s RESTful endpoint in json
Deprecated since version 4.0.0: Scout has been renamed to Orbit. Please, use bosdyn-orbit package instead of bosdyn-scout.
- bosdyn.scout.utils.get_latest_end_time_for_runs(scout_client: bosdyn.scout.client.ScoutClient, params: Dict = {}) datetime [source]
Given a dictionary of query params, returns the max end time for runs
- Parameters:
scout_client – the client for Scout web API
params – the query params associated with the get request
- Raises:
RequestExceptions – exceptions thrown by the Requests library
UnauthenticatedScoutClientError – indicates that the scout client is not authenticated properly
- Returns:
The max end time for runs in datetime
Deprecated since version 4.0.0: Scout has been renamed to Orbit. Please, use bosdyn-orbit package instead of bosdyn-scout.
- bosdyn.scout.utils.data_capture_urls_from_run_events(scout_client: bosdyn.scout.client.ScoutClient, run_events: List, list_of_channel_names: List = None) List [source]
Given run events and list of desired channel names, returns the list of data capture urls
- Parameters:
scout_client – the client for Scout web API
run_events – a json representation of run events obtained from Scout’s RESTful endpoint
list_of_channel_names – a list of channel names associated with the desired data captures. Defaults to None which returns all the available channels.
- Returns:
a list of urls
- Return type:
data_urls
Deprecated since version 4.0.0: Scout has been renamed to Orbit. Please, use bosdyn-orbit package instead of bosdyn-scout.
- bosdyn.scout.utils.data_capture_url_from_run_capture_resources(scout_client: bosdyn.scout.client.ScoutClient, run_capture_resources: List, list_of_channel_names: List = None) List [source]
Given run capture resources and list of desired channel names, returns the list of data capture urls
- Parameters:
scout_client – the client for Scout web API
run_capture_resources – a list of resources obtained from Scout’s RESTful endpoint
list_of_channel_names – a list of channel names associated with the desired data captures. Defaults to None which returns all the available channels.
- Returns:
a list of urls
- Return type:
data_urls
Deprecated since version 4.0.0: Scout has been renamed to Orbit. Please, use bosdyn-orbit package instead of bosdyn-scout.