ouster.sdk.util.studio module

save_tokens(keycloak_url, realm_name, client_id, base_url, token)[source]
delete_tokens_file()[source]
load_tokens()[source]
class KeycloakPKCETokenProviderV1(client_id, base_url, keycloak_url, realm_name, organization_id)[source]

Bases: object

code_verifier()[source]
current()[source]
auth()[source]

Call to refresh the tokens and initiate the authorization process.

make_handler(outer_self)[source]
get_token()[source]
init_tokens(client=None)[source]

Initialize the token provider.

exchange_code_for_token(code)[source]
refresh_tokens()[source]
get_authorization_url()[source]
exception RetryableException[source]

Bases: Exception

Exception used for driving retries in the requests. Internal use.

exception UnAuthorizedException[source]

Bases: Exception

Exception used when user’s Access token is invalid. Internal use.

exception TokenExpiredException[source]

Bases: Exception

class BearerTokenRedirectAdapter(token_provider, *args, **kwargs)[source]

Bases: HTTPAdapter

Custom adapter to ensure the bearer token is passed along in redirects.

send(request, **kwargs)[source]

Sends PreparedRequest object. Returns Response object.

Parameters:
  • request – The PreparedRequest being sent.

  • stream – (optional) Whether to stream the request content.

  • timeout (float or tuple or urllib3 Timeout object) – (optional) How long to wait for the server to send data before giving up, as a float, or a (connect timeout, read timeout) tuple.

  • verify – (optional) Either a boolean, in which case it controls whether we verify the server’s TLS certificate, or a string, in which case it must be a path to a CA bundle to use

  • cert – (optional) Any user-provided SSL certificate to be trusted.

  • proxies – (optional) The proxies dictionary to apply to the request.

Return type:

requests.Response

get_common_headers(token_provider)[source]
check_and_raise(response, token_provider)[source]
get_json(response)[source]

Helper for getting json out of response. If the response is not json or the json is invalid it returns None

Parameters:

response (Response) – Response from the API

Returns:

json response

Return type:

dict

get(url, *, params=None, token_provider)[source]
post(url, *, data, token_provider)[source]
get_session_with_redirect(token_provider)[source]
class DataAppFile(id, recording_url, client, output_type, type)[source]

Bases: object

property url
get_signed_url()[source]
class DataAppClient(org_id)[source]

Bases: object

get(url, *, params=None)[source]
post(url, *, data=None)[source]
get_url_from_id(id)[source]
auth()[source]

Authenticates

get_output_files(id)[source]

Get output file information about a specific drive.

get_drive(id)[source]

Gets information about a specific drive.

Parameters:

link (str)

Get OSF download link for a data-app drive link

Parameters:

link (str)