Qctrl

class Qctrl(email=None, password=None, api_root=None, oidc_url=None, env_namespace=None, skip_version_check=False, client=None)

A mediator class. Used to authenticate with Q-CTRL and access Q-CTRL features.

Creating an instance of this class requires authentication with Q-CTRL’s API.

The recommended method of authentication is through the interactive authentication method. This method can be invoked by simply calling Qctrl() without any arguments. This method will also create an authentication file that will be used for subsequent authentications when using the package.

qctrl = Qctrl()

You can also access toolkits provided by Boulder Opal through the corresponding namespaces of the Qctrl object. See the reference for details.

Deprecated since version 15.4.4: Email and password based authentication has been removed in favour of url based authentication. To authenticate simply call qctrl = Qctrl() without any additional arguments.

Parameters
  • email (str, optional) – The email address for a Q-CTRL account. [This field has been deprecated] (Default value = None)

  • password (str, optional) – The password for a Q-CTRL account. [This field has been deprecated] (Default value = None)

  • api_root (str, optional) – The URL of the Q-CTRL API. (Default value = None)

  • oidc_url (str, optional) – The URL of the Q-CTRL OIDC. (Default value = None)

  • env_namespace (str, optional) – The environment namespace of the Q-CTRL stack. (Default value = None)

  • skip_version_check (bool, optional) – Option for disabling the version check. (Default value = False)

  • client (gql.Client, optional) – A GraphQL client that provides access to a Q-CTRL GraphQL endpoint. You can pass this parameter to use Q-CTRL features provided by a non-standard Q-CTRL API implementation, for example, one running locally or in a private cloud. If you pass this parameter, do not pass email, password, or api_root. (Default value = None)

Variables
Raises

QctrlApiException

Methods

activity_monitor

Prints a list of previously run actions to the console and their statuses.

create_graph

Creates a graph object for representing remote computations.

get_result

This function is used to return the results of a previously run function.

is_collecting

Checks if the object is in collection mode.

parallel

Context manager for executing multiple function calls in parallel.

start_collection_mode

Starts collection mode.

stop_collection_mode

Stops collection mode.