vantage6.client.subclients.store.algorithm_store.AlgorithmStoreSubClient#
- class AlgorithmStoreSubClient(parent)#
Bases:
SubClient
Subclient for the algorithm store.
- __init__(parent)#
Methods
__init__
(parent)create
(algorithm_store_url, name[, ...])Link an algorithm store to one or more collaborations.
delete
([id_])Delete an algorithm store.
get
(id_)Get an algorithm store by its id.
list
([name, url, collaboration, page, per_page])List all algorithm stores.
set
(id_)"
update
([id_, name, collaboration, ...])Update an algorithm store.
- create(algorithm_store_url, name, collaboration=None, all_collaborations=False, force=False)#
Link an algorithm store to one or more collaborations.
- Parameters:
algorithm_store_url (str) – The url of the algorithm store.
name (str) – The name of the algorithm store.
collaboration (int, optional) – The id of the collaboration to link the algorithm store to. If not given and client.setup_collaboration() was called, the collaboration id from the setup is used. If neither is the case, all_collaborations must be set to True explicitly.
all_collaborations (bool, optional) – If True, the algorithm store is linked to all collaborations. If False, the collaboration_id must be given.
force (bool, optional) – If True, the algorithm store will be linked to the collaboration even for localhost urls - which is not recommended in production scenarios for security reasons.
- Returns:
The algorithm store.
- Return type:
dict
- delete(id_=None)#
Delete an algorithm store.
- Parameters:
id (int) – The id of the algorithm store. If not given, the algorithm store must be set with client.store.set().
- Returns:
The deleted algorithm store.
- Return type:
dict
- get(id_)#
Get an algorithm store by its id.
- Parameters:
id (int) – The id of the algorithm store.
- Returns:
The algorithm store.
- Return type:
dict
- list(name=None, url=None, collaboration=None, page=1, per_page=10)#
List all algorithm stores.
- Parameters:
name (str, optional) – Filter by name (with LIKE operator)
url (str, optional) – Filter by algorithm store url (with LIKE operator)
collaboration (int, optional) – Filter by collaboration id. If not given and client.setup_collaboration() was called, the collaboration id from the setup is used. Otherwise, all algorithm stores are returned.
page (int, optional) – The page number to retrieve.
per_page (int, optional) – The number of items to retrieve per page.
- Returns:
The algorithm stores.
- Return type:
list[dict]
- set(id_)#
” Set the algorithm store to use for the client.
- Parameters:
id (int) – The id of the algorithm store.
- Returns:
The algorithm store.
- Return type:
dict
- update(id_=None, name=None, collaboration=None, all_collaborations=None)#
Update an algorithm store.
- Parameters:
id (int) – The id of the algorithm store. If not given, the algorithm store must be set with client.store.set().
name (str, optional) – The name of the algorithm store.
collaboration (int, optional) – The id of the collaboration to link the algorithm store to.
all_collaborations (bool, optional) – If True, the algorithm store is linked to all collaborations. If False, the collaboration_id must be given.
- Returns:
The updated algorithm store.
- Return type:
dict