Source code for tvb.interfaces.rest.commons.strings

# -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Framework Package. This package holds all Data Management, and 
# Web-UI helpful to run brain-simulations. To use it, you also need to download
# TheVirtualBrain-Scientific Package (for simulators). See content of the
# documentation-folder for more details. See also http://www.thevirtualbrain.org
#
# (c) 2012-2023, Baycrest Centre for Geriatric Care ("Baycrest") and others
#
# This program is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.  See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along with this
# program.  If not, see <http://www.gnu.org/licenses/>.
#
#
#   CITATION:
# When using The Virtual Brain for scientific publications, please cite it as explained here:
# https://www.thevirtualbrain.org/tvb/zwei/neuroscience-publications
#
#

from enum import Enum


[docs]class Strings(Enum): PAGE_NUMBER = "page" BASE_PATH = "api" BEARER = "Bearer " AUTH_HEADER = "Authorization" AUTH_URL = "auth_url" ACCOUNT_URL = "account_url"
[docs]class RequestFileKey(Enum): SIMULATION_FILE_KEY = "simulation_zip_file" SIMULATION_FILE_NAME = "SimulationData.zip" LAUNCH_ANALYZERS_MODEL_FILE = "model_file"
[docs]class FormKeyInput(Enum): CREATE_PROJECT_NAME = 'project_name' CREATE_PROJECT_DESCRIPTION = 'project_description' CODE = 'code' REDIRECT_URI = 'redirect_uri' KEYCLOAK_REFRESH_TOKEN = 'refresh_token' NEW_MEMBERS_GID = 'new_members_gid'
[docs]class RestNamespace(Enum): USERS = "/users" PROJECTS = "/projects" DATATYPES = "/datatypes" OPERATIONS = "/operations" SIMULATION = "/simulation"
[docs]class LinkPlaceholder(Enum): USERNAME = "username" PROJECT_GID = "project_gid" DATATYPE_GID = "datatype_gid" OPERATION_GID = "operation_gid" ALG_MODULE = "algorithm_module" ALG_CLASSNAME = "algorithm_classname"
_namespace_url_dict = { RestNamespace.USERS: [RestLink.LOGIN, RestLink.PROJECTS, RestLink.USEFUL_URLS], RestNamespace.PROJECTS: [RestLink.DATA_IN_PROJECT, RestLink.OPERATIONS_IN_PROJECT, RestLink.PROJECT_MEMBERS], RestNamespace.DATATYPES: [RestLink.IS_DATA_ENCRYPTED, RestLink.GET_DATATYPE, RestLink.DATATYPE_OPERATIONS, RestLink.DATATYPE_EXTRA_INFO], RestNamespace.OPERATIONS: [RestLink.LAUNCH_OPERATION, RestLink.OPERATION_STATUS, RestLink.OPERATION_RESULTS], RestNamespace.SIMULATION: [RestLink.FIRE_SIMULATION] }