vantage6.client.subclients.store.rule.StoreRuleSubClient

class StoreRuleSubClient(parent)

Bases: SubClient

Subclient for the rules from the algorithm store.

__init__(parent)

Methods

__init__(parent)

list([name, operation, role, username, ...])

List algorithms

list(name=None, operation=None, role=None, username=None, serverUrl=None, page=1, per_page=10)

List algorithms

Parameters:
  • name (str, optional) – Filter by name (with LIKE operator).

  • operation (str, optional) – Filter by operation (view, create, update, delete, or review).

  • role (int, optional) – Filter by role id.

  • username (str, optional) – Filter by user using the username. Used in combination with ‘serverUrl’ to identify a user.

  • serverUrl (str, optional) – Filter by user. Used in combination with ‘username’ to identify a user. If not given, defaults to the server this client is connected to.

  • field (str, optional) – Which data field to keep in the result. For instance, “field=’name’” will only return the name of the rules. Default is None.

  • fields (list[str]) – Which data fields to keep in the result. For instance, “fields=[‘name’, ‘id’]” will only return the name and id of the rules. Default is None.

  • filter (tuple[str, str], optional) – Filter the result on key-value pairs. For instance, “filter_=(‘name’, ‘my_name’)” will only return the rules with the name ‘my_name’. Default is None.

  • filters (list[tuple[str, str]], optional) – Filter the result on multiple key-value pairs. For instance, “filters=[(‘name’, ‘my_name’), (‘id’, 1)]” will only return the rules with the name ‘my_name’ and id 1. Default is None.

  • page (int, optional) – Page number for pagination (default=1)

  • per_page (int, optional) – Number of items per page (default=10)

Returns:

List of rules

Return type:

list[dict]