Skip to content

webknossos.client.api_client

class WkApiClient(webknossos.client.api_client._abstract_api_client.AbstractApiClient):

Helper class that provides a standard way to create an ABC using inheritance.

WkApiClient( base_wk_url: str, timeout_seconds: float, headers: Union[Dict[str, str], NoneType] = None, webknossos_api_version: int = 6)
webknossos_api_version
base_wk_url
url_prefix: str
def health(self) -> None:
def build_info(self) -> webknossos.client.api_client.models.ApiWkBuildInfo:
def dataset_info( self, organization_name: str, dataset_name: str, sharing_token: Union[str, NoneType] = None) -> webknossos.client.api_client.models.ApiDataset:
def dataset_list( self, is_active: Union[bool, NoneType], organization_name: Union[str, NoneType]) -> List[webknossos.client.api_client.models.ApiDataset]:
def dataset_update_teams( self, organization_name: str, dataset_name: str, team_ids: List[str]) -> None:
def dataset_update( self, organization_name: str, dataset_name: str, updated_dataset: webknossos.client.api_client.models.ApiDataset) -> None:
def dataset_sharing_token( self, organization_name: str, dataset_name: str) -> webknossos.client.api_client.models.ApiSharingToken:
def dataset_is_valid_new_name( self, organization_name: str, dataset_name: str) -> webknossos.client.api_client.models.ApiDatasetIsValidNewNameResponse:
def datastore_list(self) -> List[webknossos.client.api_client.models.ApiDataStore]:
def project_info_by_name( self, project_name: str) -> webknossos.client.api_client.models.ApiProject:
def project_info_by_id(self, project_id: str) -> webknossos.client.api_client.models.ApiProject:
def task_infos_by_project_id_paginated( self, project_id: str, limit: Union[int, NoneType], page_number: Union[int, NoneType]) -> Tuple[List[webknossos.client.api_client.models.ApiTask], int]:
def annotation_info( self, annotation_id: str) -> webknossos.client.api_client.models.ApiAnnotation:
def annotation_download(self, annotation_id: str, skip_volume_data: bool) -> Tuple[bytes, str]:
def annotation_upload( self, file_body: bytes, filename: str, createGroupForEachFile: bool) -> webknossos.client.api_client.models.ApiAnnotationUploadResult:
def annotation_infos_by_task( self, task_id: str) -> List[webknossos.client.api_client.models.ApiAnnotation]:
def task_info(self, task_id: str) -> webknossos.client.api_client.models.ApiTask:
def folder_tree(self) -> List[webknossos.client.api_client.models.ApiFolderWithParent]:
def user_by_id(self, user_id: str) -> webknossos.client.api_client.models.ApiUser:
def user_current(self) -> webknossos.client.api_client.models.ApiUser:
def user_list(self) -> List[webknossos.client.api_client.models.ApiUser]:
def user_logged_time( self, user_id: str) -> webknossos.client.api_client.models.ApiLoggedTimeGroupedByMonth:
def team_list(self) -> List[webknossos.client.api_client.models.ApiTeam]:
def token_generate_for_data_store(self) -> webknossos.client.api_client.models.ApiDataStoreToken:
def tasks_create( self, task_parameters: List[webknossos.client.api_client.models.ApiTaskParameters]) -> webknossos.client.api_client.models.ApiTaskCreationResult:
def tasks_create_from_files( self, nml_task_parameters: webknossos.client.api_client.models.ApiNmlTaskParameters, annotation_files: List[Tuple[str, bytes]]) -> webknossos.client.api_client.models.ApiTaskCreationResult:
Inherited Members
webknossos.client.api_client._abstract_api_client.AbstractApiClient
headers
timeout_seconds
url_from_route
post_multipart_with_json_response
class DatastoreApiClient(webknossos.client.api_client._abstract_api_client.AbstractApiClient):

Helper class that provides a standard way to create an ABC using inheritance.

DatastoreApiClient( datastore_base_url: str, timeout_seconds: float, headers: Union[Dict[str, str], NoneType] = None)
datastore_base_url
url_prefix: str
def dataset_finish_upload( self, upload_information: webknossos.client.api_client.models.ApiDatasetUploadInformation, token: Union[str, NoneType], retry_count: int) -> None:
def dataset_reserve_upload( self, reserve_upload_information: webknossos.client.api_client.models.ApiReserveDatasetUploadInformation, token: Union[str, NoneType], retry_count: int) -> None:
def dataset_get_raw_data( self, organization_name: str, dataset_name: str, data_layer_name: str, mag: str, token: Union[str, NoneType], x: int, y: int, z: int, width: int, height: int, depth: int) -> Tuple[bytes, str]:
Inherited Members
webknossos.client.api_client._abstract_api_client.AbstractApiClient
headers
timeout_seconds
url_from_route
post_multipart_with_json_response
class ApiClientError(builtins.Exception):

Common base class for all non-exit exceptions.

def message_for_response_body(self, response: httpx.Response) -> str:
check_version_hint = 'If this is unexpected, please double-check your WEBKNOSSOS URL and credentials.\nIf the error persists, it might be caused by a version mismatch of the python client and the WEBKNOSSOS server API version.\nSee https://github.com/scalableminds/webknossos-libs/releases for current releases.'
def request_label(self, response: httpx.Response) -> str:
Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
args