Utils#

class gordo_client.utils.PredictionResult(name, predictions, error_messages)#

Bases: tuple

Create new instance of PredictionResult(name, predictions, error_messages)

error_messages#

Alias for field number 2

name#

Alias for field number 0

predictions#

Alias for field number 1

gordo_client.utils.influx_client_from_uri(uri: str, api_key: str | None = None, api_key_header: str | None = 'Ocp-Apim-Subscription-Key', recreate: bool = False, dataframe_client: bool = False, proxies: Dict[str, str] = {'http': '', 'https': ''}) InfluxDBClient | DataFrameClient#

Get a InfluxDBClient or DataFrameClient from a SqlAlchemy like URI.

Todo

Remove this function. Use gordo_core.utils.influx_client_from_uri instead.

Parameters:
  • uri – Connection string format: <username>:<password>@<host>:<port>/<optional-path>/<db_name>

  • api_key – Any api key required for the client connection

  • api_key_header – The name of the header the api key should be assigned

  • recreate – Re/create the database named in the URI

  • dataframe_client – Return DataFrameClient instead of a standard InfluxDBClient

  • proxies – A mapping of any proxies to pass to the influx client

gordo_client.utils.parse_module_path(module_path) Tuple[str | None, str]#

Click custom types. Inherited from click.ParamType

class gordo_client.cli.custom_types.DataProviderParam#

Bases: ParamType

Load a DataProvider from JSON/YAML representation or from a JSON/YAML file.

convert(value, param, ctx)#

Convert the value for data provider.

name: str = 'data-provider'#

the descriptive name of this type

class gordo_client.cli.custom_types.IsoFormatDateTime#

Bases: ParamType

Parse a string into an ISO formatted datetime object.

convert(value, param, ctx)#

Convert the value for iso date.

name: str = 'iso-datetime'#

the descriptive name of this type

gordo_client.cli.custom_types.key_value_par(val) Tuple[str, str]#

Split input of ‘key,val’.