connection_store#

class predict_backend.store.connection_store.ConnectionStore(**kwargs)#

Bases: Store

create_connection(name, item)#

Create a connection, if connection already exists with the supplied name return an error.

Parameters:
  • name (str) – A unique name to describe the connection.

  • item (dict) – Dictionary of connection information (host, port, user name, etc).

Return type:

bool

Returns:

True/False if successful.

get_connection(name)#

Get a connection from the store by name and decrypt its contents.

Parameters:

name (str) – Connection name.

Return type:

dict

Returns:

Dictionary of decrypted connection information.

name = 'connection'#