BlueConic client

class Client
__init__(*, host=None, client_id=None, client_secret=None, objective_ids=None, ip='', port='', notebook_id=None, locale=None, use_as_default=True, blueconic_headers=None, access_token=None)

This class initializes the authentication for interfacing with the BlueConic bulk API for AI Workbench. If no parameters are given, credentials are requested from the server. Otherwise the host, client id, and client secret should all be given. If one of them is empty an exception is raised.

Parameters:
  • host (str, optional) – Host url

  • client_id (str, optional) – The client id generated by the BlueConic Plugin API

  • client_secret (str, optional) – The client secret generated by the BlueConic Plugin API

  • objective_ids ([str], optional) – The IDs of the objectives as a list

  • notebook_id (str, optional) – The ID of the notebook. Used to identify this notebook and find metadata. If empty, Jupyter is called to extract the notebook ID.

  • locale (str, optional) – The default locale to retrieve if possible

  • use_as_default (bool, optional) – Whether this client is set as the default client for this thread.

  • blueconic_headers (Mapping[str, str], optional) – Additional headers to add to every request to BlueConic

  • access_token (str, optional) – An existing OAuth access token. When given, it is used as the bearer token for every request: no token is fetched with the client credentials, and the token is never refreshed. host and access_token are then required, and client_id and client_secret are optional.

Usage - Without parameters:
>>> from blueconic import Client
>>> bc = Client()
<blueconic.client.Client>
Usage - With parameters:
>>> from blueconic import Client
>>> HOST = "localhost:3737"
>>> CLIENT_ID = "testKey"
>>> CLIENT_SECRET = "testSecret1234"
>>> bc = Client(host=HOST, client_id=CLIENT_ID, client_secret=CLIENT_SECRET)
<blueconic.client.Client>