Client

Scout Client is a client for a single Scout instance. The client uses the Scout web API to send HTTPs requests to a number of REStful endpoints using the Requests library.

class bosdyn.scout.client.ScoutClient(hostname, verify=True, cert=None)[source]

Bases: object

Client for Scout web API

authenticate_with_password(username=None, password=None)[source]

Authorizes the client with username and password. Must call before using other client functions. If username and password are not provided, the function obtains credentials from either environment variables or terminal inputs. - Args:

  • username(str): the username for the Scout instance

  • password(str): the password for the Scout instance

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

  • Returns:
    • requests.Response(Response object): the response associated with the login request

get_resource(path, **kwargs)[source]

Base function for getting a resource in /api/v0/ - Args:

  • path(str): the path appended to /api/v0/

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

post_resource(path, **kwargs)[source]

Base function for posting a resource in /api/v0/ - Args:

  • path(str): the path appended to /api/v0/

  • kwargs(**): a variable number of keyword arguments for the post request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • The response associated with the the post request

delete_resource(path, **kwargs)[source]

Base function for deleting a resource in /api/v0/ - Args:

  • path(str): the path appended to /api/v0/

  • kwargs(**): a variable number of keyword arguments for the delete request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • The response associated with the the delete request

get_scout_version(**kwargs)[source]

Retrieves info about a scout . - Args:

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_scout_system_time(**kwargs)[source]

Returns scout’s current system time. - Args:

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_robots(**kwargs)[source]

Returns robots on the specified scout instance. - Args:

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_robot_by_hostname(hostname, **kwargs)[source]

Returns a robot on given a hostname of a specific robot. - Args:

  • hostname(str): the IP address associated with the desired robot on the Scout instance

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_site_walks(**kwargs)[source]

Returns site walks on the specified scout instance - Args:

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_site_walk_by_id(uuid)[source]

Given a site walk uuid, returns a site walk on the specified scout instance - Args:

  • uuid(str): the ID associated with the site walk

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_site_elements(**kwargs)[source]

Returns site elements on the specified scout instance - Args:

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_site_element_by_id(uuid, **kwargs)[source]

Given a site element uuid, returns a site element on the specified scout instance - Args:

  • uuid(str): the ID associated with the site element

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_site_docks(**kwargs)[source]

Returns site docks on the specified scout instance - Args:

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_site_dock_by_id(uuid, **kwargs)[source]

Given a site dock uuid, returns a site dock on the specified scout instance - Args:

  • uuid(str): the ID associated with the site dock

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_calendar(**kwargs)[source]

Returns calendar events on the specified scout instance - Args:

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_run_events(**kwargs)[source]

Given a dictionary of query params, returns run events - Args:

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_run_event_by_id(uuid, **kwargs)[source]

Given a runEventUuid, returns a run event - Args:

  • uuid(str): the ID associated with the run event

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_run_captures(**kwargs)[source]

Given a dictionary of query params, returns run captures - Args:

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_run_capture_by_id(uuid, **kwargs)[source]

Given a runCaptureUuid, returns a run capture - Args:

  • uuid(str): the ID associated with the run capture

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_runs(**kwargs)[source]

Given a dictionary of query params, returns runs - Args:

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_run_by_id(uuid, **kwargs)[source]

Given a runUuid, returns a run - Args:

  • uuid(str): the ID associated with the run

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_run_archives_by_id(uuid, **kwargs)[source]

Given a runUuid, returns run archives - Args:

  • uuid(str): the ID associated with the run

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the get request

get_image(url, **kwargs)[source]

Given a data capture url, returns a raw image - Args:

  • url(str): the url associated with the data capture

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response: the raw response associated with the the get request

post_export_as_walk(site_walk_uuid, **kwargs)[source]

Given a site walk uuid, it exports the walks_pb2.Walk equivalent - Args:

  • uuid(str): the ID associated with the site walk

  • kwargs(**): a variable number of keyword arguments for the get request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the post request

post_import_from_walk(**kwargs)[source]

Given a walk data, imports it to the specified scout instance - Args:

  • kwargs(**): a variable number of keyword arguments for the post request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the post request

post_site_element(**kwargs)[source]

Create a site element - Args:

  • kwargs(**): a variable number of keyword arguments for the post request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the post request

post_site_walk(**kwargs)[source]

Create a site walk - Args:

  • kwargs(**): a variable number of keyword arguments for the post request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the post request

post_site_dock(**kwargs)[source]

Create a site element - Args:

  • kwargs(**): a variable number of keyword arguments for the post request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the post request

post_robot(**kwargs)[source]

Add a robot to the specified scout instance - Args:

  • kwargs(**): a variable number of keyword arguments for the post request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the post request

post_calendar_event(**kwargs)[source]

Create a calendar event to play a mission - Args:

  • kwargs(**): a variable number of keyword arguments for the post request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the post request

delete_site_walk(uuid, **kwargs)[source]

Given a site walk uuid, deletes the site walk associated with the uuid on the specified scout instance - Args:

  • uuid(str): the ID associated with the desired site walk

  • kwargs(**): a variable number of keyword arguments for the delete request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the delete request

delete_robot(robotHostname, **kwargs)[source]

Given a robotHostname, deletes the robot associated with the hostname on the specified scout instance - Args:

  • hostname(str): the IP address associated with the robot

  • kwargs(**): a variable number of keyword arguments for the delete request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the delete request

delete_calendar_event(**kwargs)[source]

Delete the specified calendar event on the specified scout instance - Args:

  • kwargs(**): a variable number of keyword arguments for the delete request

  • Raises:
    • RequestExceptions: exceptions thrown by the Requests library

    • UnauthenticatedScoutClientError: indicates that the scout client is not authenticated properly

  • Returns
    • requests.Response(Response object): the response associated with the the delete request