vantage6.client.subclients.store.user.StoreUserSubClient#
- class StoreUserSubClient(parent)#
Bases:
SubClient
Subclient for the user registrations in the algorithm store.
- __init__(parent)#
Methods
__init__
(parent)delete
(id_)Delete a user registration by id
get
(id_)Get a user registration by id
list
([username, role, page, per_page])List algorithms
register
(username, roles)Register a vantage6 user in this algorithm store.
update
(id_, roles)Update a user registration by id
- delete(id_)#
Delete a user registration by id
- Parameters:
id (int) – The id of the user registration
- Return type:
dict
- get(id_)#
Get a user registration by id
- Parameters:
id (int) – The id of the user registration
- Returns:
The user
- Return type:
dict
- list(username=None, role=None, page=1, per_page=10)#
List algorithms
- Parameters:
username (str) – Filter by username (with LIKE operator).
role (int) – Filter by role id.
page (int) – Page number for pagination (default=1)
per_page (int) – Number of items per page (default=10)
- Returns:
List of user registrations
- Return type:
list[dict]
- register(username, roles)#
Register a vantage6 user in this algorithm store.
- Parameters:
username (str) – The username of the user
roles (list[int]) – The roles of the user in this algorithm store
- Returns:
The user registration
- Return type:
dict
- update(id_, roles)#
Update a user registration by id
- Parameters:
id (int) – The id of the user registration
roles (list[int]) – The new roles of the user in this algorithm store
- Return type:
dict