The Virtual Brain Project

Table Of Contents

This Page

commons Package

decoders

class tvb.interfaces.rest.commons.decoders.CustomDecoder(*args, **kargs)[source]

Bases: json.decoder.JSONDecoder

static custom_hook(d)[source]

dtos

class tvb.interfaces.rest.commons.dtos.AlgorithmDto(algorithm=None, **kwargs)[source]

Bases: tvb.interfaces.rest.commons.dtos.BaseDto

class tvb.interfaces.rest.commons.dtos.BaseDto[source]

Bases: builtins.object

update(kwargs)[source]

This method is setting object fields starting from a dictionary :param kwargs: fields dictionary (rest server response)

class tvb.interfaces.rest.commons.dtos.DataTypeDto(datatype=None, **kwargs)[source]

Bases: tvb.interfaces.rest.commons.dtos.BaseDto

class tvb.interfaces.rest.commons.dtos.OperationDto(operation=None, **kwargs)[source]

Bases: tvb.interfaces.rest.commons.dtos.BaseDto

description[source]
displayname[source]
class tvb.interfaces.rest.commons.dtos.ProjectDto(project=None, **kwargs)[source]

Bases: tvb.interfaces.rest.commons.dtos.BaseDto

class tvb.interfaces.rest.commons.dtos.UserDto(user=None, **kwargs)[source]

Bases: tvb.interfaces.rest.commons.dtos.BaseDto

exceptions

exception tvb.interfaces.rest.commons.exceptions.AuthorizationRequestException(message=None, code=401)[source]

Bases: tvb.interfaces.rest.commons.exceptions.BaseRestException

get_default_message()[source]
exception tvb.interfaces.rest.commons.exceptions.BadRequestException(message, payload=None)[source]

Bases: tvb.interfaces.rest.commons.exceptions.BaseRestException

get_default_message()[source]
exception tvb.interfaces.rest.commons.exceptions.BaseRestException(message=None, code=None, payload=None)[source]

Bases: tvb.basic.exceptions.TVBException

get_default_message()[source]
to_dict()[source]
exception tvb.interfaces.rest.commons.exceptions.ClientException(message, code=400)[source]

Bases: tvb.interfaces.rest.commons.exceptions.BaseRestException

get_default_message()[source]
exception tvb.interfaces.rest.commons.exceptions.InvalidIdentifierException(message=None, payload=None)[source]

Bases: tvb.interfaces.rest.commons.exceptions.BaseRestException

get_default_message()[source]
exception tvb.interfaces.rest.commons.exceptions.InvalidInputException(message=None, payload=None)[source]

Bases: tvb.interfaces.rest.commons.exceptions.BadRequestException

get_default_message()[source]
exception tvb.interfaces.rest.commons.exceptions.ServiceException(message, code=500, payload=None)[source]

Bases: tvb.interfaces.rest.commons.exceptions.BaseRestException

get_default_message()[source]
message_prefix = 'Something went wrong on the server side'

files_helper

tvb.interfaces.rest.commons.files_helper.create_temp_folder()[source]
tvb.interfaces.rest.commons.files_helper.save_file(file_path, response)[source]
tvb.interfaces.rest.commons.files_helper.save_temporary_file(file, destination_folder=None)[source]

status_codes

strings

class tvb.interfaces.rest.commons.strings.FormKeyInput[source]

Bases: enum.Enum

An enumeration.

CODE = <FormKeyInput.CODE: 'code'>
CREATE_PROJECT_DESCRIPTION = <FormKeyInput.CREATE_PROJECT_DESCRIPTION: 'project_description'>
CREATE_PROJECT_NAME = <FormKeyInput.CREATE_PROJECT_NAME: 'project_name'>
KEYCLOAK_REFRESH_TOKEN = <FormKeyInput.KEYCLOAK_REFRESH_TOKEN: 'refresh_token'>
NEW_MEMBERS_GID = <FormKeyInput.NEW_MEMBERS_GID: 'new_members_gid'>
REDIRECT_URI = <FormKeyInput.REDIRECT_URI: 'redirect_uri'>
class tvb.interfaces.rest.commons.strings.LinkPlaceholder[source]

Bases: enum.Enum

An enumeration.

ALG_CLASSNAME = <LinkPlaceholder.ALG_CLASSNAME: 'algorithm_classname'>
ALG_MODULE = <LinkPlaceholder.ALG_MODULE: 'algorithm_module'>
DATATYPE_GID = <LinkPlaceholder.DATATYPE_GID: 'datatype_gid'>
OPERATION_GID = <LinkPlaceholder.OPERATION_GID: 'operation_gid'>
PROJECT_GID = <LinkPlaceholder.PROJECT_GID: 'project_gid'>
USERNAME = <LinkPlaceholder.USERNAME: 'username'>
class tvb.interfaces.rest.commons.strings.RequestFileKey[source]

Bases: enum.Enum

An enumeration.

LAUNCH_ANALYZERS_MODEL_FILE = <RequestFileKey.LAUNCH_ANALYZERS_MODEL_FILE: 'model_file'>
SIMULATION_FILE_KEY = <RequestFileKey.SIMULATION_FILE_KEY: 'simulation_zip_file'>
SIMULATION_FILE_NAME = <RequestFileKey.SIMULATION_FILE_NAME: 'SimulationData.zip'>

Bases: enum.Enum

An enumeration.

DATATYPE_EXTRA_INFO = <RestLink.DATATYPE_EXTRA_INFO: '/{datatype_gid}/extra_info'>
DATATYPE_OPERATIONS = <RestLink.DATATYPE_OPERATIONS: '/{datatype_gid}/operations'>
DATA_IN_PROJECT = <RestLink.DATA_IN_PROJECT: '/{project_gid}/data'>
FIRE_SIMULATION = <RestLink.FIRE_SIMULATION: '/{project_gid}'>
GET_DATATYPE = <RestLink.GET_DATATYPE: '/{datatype_gid}'>
LAUNCH_OPERATION = <RestLink.LAUNCH_OPERATION: '/{project_gid}/algorithm/{algorithm_module}/{algorithm_classname}'>
LOGIN = <RestLink.LOGIN: '/login'>
OPERATIONS_IN_PROJECT = <RestLink.OPERATIONS_IN_PROJECT: '/{project_gid}/operations'>
OPERATION_RESULTS = <RestLink.OPERATION_RESULTS: '/{operation_gid}/results'>
OPERATION_STATUS = <RestLink.OPERATION_STATUS: '/{operation_gid}/status'>
PROJECTS = <RestLink.PROJECTS: '/logged/projects'>
PROJECT_MEMBERS = <RestLink.PROJECT_MEMBERS: '/{project_gid}/members'>
USEFUL_URLS = <RestLink.USEFUL_URLS: '/kc-urls'>
compute_url(include_namespace=False, values=None)[source]
class tvb.interfaces.rest.commons.strings.RestNamespace[source]

Bases: enum.Enum

An enumeration.

DATATYPES = <RestNamespace.DATATYPES: '/datatypes'>
OPERATIONS = <RestNamespace.OPERATIONS: '/operations'>
PROJECTS = <RestNamespace.PROJECTS: '/projects'>
SIMULATION = <RestNamespace.SIMULATION: '/simulation'>
USERS = <RestNamespace.USERS: '/users'>
class tvb.interfaces.rest.commons.strings.Strings[source]

Bases: enum.Enum

An enumeration.

ACCOUNT_URL = <Strings.ACCOUNT_URL: 'account_url'>
AUTH_HEADER = <Strings.AUTH_HEADER: 'Authorization'>
AUTH_URL = <Strings.AUTH_URL: 'auth_url'>
BASE_PATH = <Strings.BASE_PATH: 'api'>
BEARER = <Strings.BEARER: 'Bearer '>
PAGE_NUMBER = <Strings.PAGE_NUMBER: 'page'>