quartic_sdk

Subpackages

Submodules

Package Contents

Classes

APIClient

GraphqlClient

Execute Query.

class quartic_sdk.APIClient(host, username=None, password=None, oauth_token=None, cert_path=None, verify_ssl=True, gql_host=None)
static version()

Return the SDK version

assets(self, query_params={})

Get the assets method :param query_params: Dictionary of filter conditions

context_frames(self, query_params={})

Get the context frames method :param query_params: Dictionary of filter conditions :return: (EntityList) List of context frames

edge_connectors(self, query_params={})

Get the edge connectors method :param query_params: Dictionary of filter conditions

abstract process_units(self)

Get the process units

abstract work_cells(self)

Get the work cells

tags(self, asset_id, query_params={})

Get the tags :param asset_id: ID of the asset :param query_params: Dictionary of filter conditions :return: (EntityList) List of tags belonging to the asset

event_frames(self, query_params={})

Get the Event Frames :param query_params: Dictionary of filter conditions :return: (EntityList) List of Event Frames belonging to the asset

list_models(self, is_active: bool = None, ml_node: int = None, model_type: int = Constants.MODEL_TYPE_TELEMETRY, query_params={})

List models and its parameters accessible by user

Parameters
  • is_active – Boolean Indicator if list should contain active nodes or not

  • ml_node – Ml Node id to filter models deployed to particular node

  • model_type – Ml model type. 0 - All models , 1 - Telemetry models (Default) , 2 - Spectral models

  • query_params – Dictionary of filter conditions

Returns

list of dictionary

products(self, query_params={})

This method is used to fetch list of all product belongs to a particular client :param query_params: Dictionary of filter conditions :return: Product(Product Entity) Objects

sites(self, query_params={})

This method is used to fetch all sites available for a user’s client :param query_params: Dictionary of filter conditions :return: Site(Site Entity) Objects

class quartic_sdk.GraphqlClient(url: str, username: str = None, password: str = None, token: str = None, timeout: Optional[Union[aiohttp.ClientTimeout, float]] = None, verify_ssl: bool = True)

Execute Query.

static version()

Return the SDK version

async _get_client(self)aiohttp.ClientSession

Get aiohttp client session object.

_get_graphql_url(self)str

Generates the graphql endpoint.

async __execute__query(self, query: str, variables: dict = None)

Execute query

execute_query(self, query: str, variables: dict = None)

Execute query with query param. :param query: Query that needs to be executed :param variables: Dictionary of variables that are used inside the query.

async execute_async_query(self, query: str, variables: dict = None)

Execute query asynchronously. :param query: Query that needs to be executed :param variables: Dictionary of variables that are used inside the query. :return:

static get_graphql_client_from_apihelper(api_helper: quartic_sdk.api.api_helper.APIHelper)

Returns an instance of GraphqlClient from provided api_helper instance. :param api_helper: APIHelper instace whose configurations will be used to initialte GraphqlClient :return: new GraphqlCleint instance initiated with existing APIHelper configuration.