:mod:`quartic_sdk` ================== .. py:module:: quartic_sdk Subpackages ----------- .. toctree:: :titlesonly: :maxdepth: 3 api/index.rst core/index.rst model/index.rst utilities/index.rst Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 _version/index.rst api_client/index.rst exceptions/index.rst graphql_client/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: quartic_sdk.APIClient quartic_sdk.GraphqlClient .. class:: APIClient(host, username=None, password=None, oauth_token=None, cert_path=None, verify_ssl=True, gql_host=None) .. method:: version() :staticmethod: Return the SDK version .. method:: assets(self, query_params={}) Get the assets method :param query_params: Dictionary of filter conditions .. method:: context_frames(self, query_params={}) Get the context frames method :param query_params: Dictionary of filter conditions :return: (EntityList) List of context frames .. method:: edge_connectors(self, query_params={}) Get the edge connectors method :param query_params: Dictionary of filter conditions .. method:: process_units(self) :abstractmethod: Get the process units .. method:: work_cells(self) :abstractmethod: Get the work cells .. method:: 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 .. method:: 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 .. method:: 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 :param is_active: Boolean Indicator if list should contain active nodes or not :param ml_node: Ml Node id to filter models deployed to particular node :param model_type: Ml model type. 0 - All models , 1 - Telemetry models (Default) , 2 - Spectral models :param query_params: Dictionary of filter conditions :return: list of dictionary .. method:: 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 .. method:: 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:: 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. .. method:: version() :staticmethod: Return the SDK version .. method:: _get_client(self) -> aiohttp.ClientSession :async: Get aiohttp client session object. .. method:: _get_graphql_url(self) -> str Generates the graphql endpoint. .. method:: __execute__query(self, query: str, variables: dict = None) :async: Execute query .. method:: 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. .. method:: execute_async_query(self, query: str, variables: dict = None) :async: Execute query asynchronously. :param query: Query that needs to be executed :param variables: Dictionary of variables that are used inside the query. :return: .. method:: get_graphql_client_from_apihelper(api_helper: quartic_sdk.api.api_helper.APIHelper) :staticmethod: 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.