Back to bricks list
Introduction Getting Started
Architecture
Technical Documentation
Other Classes
AbstractDbManager AgentFactory AudioView AuthService BadRequestException BarPlotView Base BaseEnvShell BaseHTTPException BaseModelDTO BaseTestCase BaseTestCaseLight BashCodeParam BoolParam BoolRField BoolValidator BoxPlotView BrickMigration BrickService CheckBeforeTaskResult CommunityService Compress CondaShellProxy Config ConfigParams Connector ConnectorPartSpec ConnectorSpec ConverterRunner Credentials CredentialsDataBasic CredentialsDataLab CredentialsDataOther CredentialsDataS3 CredentialsParam CredentialsType CurrentUserService Dashboard DashboardType DataframeAggregatorHelper DataframeDataFilterHelper DataframeFilterHelper DataFrameRField DataframeScalerHelper datetime DateTimeUTC DbConfig DictRField DictValidator DispatchedMessage DynamicInputs DynamicOutputs EntityNavigator EntityNavigatorNote EntityNavigatorResource EntityNavigatorScenario EntityNavigatorService EntityNavigatorView EntityTag EntityType Enum ExceptionHandler ExceptionResponse ExpressionBuilder ExternalApiService ExternalSpaceCreateFolder FileDownloader FileHelper FileRField FloatParam FloatRField FloatValidator ForbiddenException FrontService FrontTheme FSNodeModel FsNodeService GwsCorePackages GWSException GzipCompress HeatmapView HistogramView ImageView InPort Inputs InputSpec InputSpecs InterfaceSpec IntParam IntRField IntValidator IO IOface Job JsonCodeParam JSONField JSONView JuliaCodeParam KVStore LazyViewParam LinePlot2DView ListParam ListRField ListValidator Logger LoggerMessageObserver MailService MambaShellProxy MessageDispatcher MessageLevel MessageObserver Model ModelRfield ModelService Monitor MonitorService MultiViews NetworkView Note Notebook NoteParam NoteSearchBuilder NoteService NoteTemplate NoteTemplateParam NoteTemplateService NotFoundException NumericHelper NumericParam NumericValidator OpenAiChat OpenAiChatMessage OpenAiChatParam OpenAiHelper OutPort Outputs OutputSpec OutputSpecs PackageHelper Paginator ParamSet ParamSpec PerlCodeParam PipShellProxy PlotlyRField PlotlyView PoolDb Port PrimitiveRField Process ProcessFactory ProcessModel ProcessProxy ProcessSpec ProgressBar ProgressBarMessageObserver ProgressBarService ProtocolModel ProtocolProxy ProtocolService ProtocolTyping PythonCodeParam Queue QueueService RCodeParam Requests ResourceDownloaderBase ResourceModel ResourceOrigin ResourceRField ResourceSearchBuilder ResourceService ResourceTransfertService ResourceTyping RField RichText RichTextBlock RichTextBlockModificationDTO RichTextBlockModificationWithUserDTO RichTextBlockType RichTextDTO RichTextFigureData RichTextFileData RichTextFormulaData RichTextListData RichTextListItem RichTextModificationDifferenceDTO RichTextModificationsDTO RichTextModificationType RichTextNoteResourceViewData RichTextObjectType RichTextParagraphData RichTextParagraphHeaderData RichTextParagraphHeaderLevel RichTextParagraphListData RichTextParagraphListItemData RichTextParagraphText RichTextResourceViewData RichTextTimestampData RichTextUserDTO RichTextVariableData RichTextView RichTextViewFileData S3Bucket ScatterPlot2DView Scenario ScenarioCreationType ScenarioProcessStatus ScenarioProxy ScenarioRunService ScenarioSaveDTO ScenarioSearchBuilder ScenarioService ScenarioStatus ScenarioTemplate ScenarioTemplateFactory ScenarioTransfertService SearchBuilder SerializableObjectJson SerializableRField Settings ShellProxy ShellProxyFactory SimpleTextView SpaceFolder SpaceService SqlMigrator StackedBarPlotView StreamlitApp StreamlitAppManager StreamlitProcess StringHelper StrParam StrRField StrValidator SysProc TableAnnotatorHelper TableColumnSelector TableColumnTagToRowExtractor TableColumnTagUnfolder TableConcatHelper TableHeaderInfo TableOperationHelper TableRowSelector TableRowTagToColumnExtractor TableRowTagUnfolder TableScalerHelper TableTagAggregatorHelper TableUnfolderHelper TableView TabularView Tag TagHelper TagKeyModel TagList TagService TagsParam TagValueModel TarCompress TarGzCompress TaskFileDownloader TaskHelper TaskInputs TaskModel TaskProxy TaskRunner TaskService TaskTyping TechnicalInfo TextParam TextView TextViewData Typing TypingDeprecated TypingIconColor TypingIconType TypingManager TypingStyle UnauthorizedException URLValidator User UserCredentialsDTO UserGroup UserService Utils UUIDRField Validator VennDiagramView Version View ViewConfig ViewTester ViewType YamlCodeParam ZipCompress
Version

ProtocolProxy

This class can be used in a Jupyter Notebook to create and configure a protocol

To create it use the add_protocol method on another protocol

Functions
__INIT__

Initialize self. See help(type(self)) for accurate signature.

Parameters:
NameTypeDefault valueDescription
protocol_modelProtocolModel
ADD_CONNECTOR

Add a connector between to process of this protocol

Exemple : protocol.add_connector(create.get_output_port('robot'), sub_proto.get_input_port('robot_i')) OR protocol.add_connector(create >> 'robot', sub_proto << 'robot_i')

Parameters:
NameTypeDefault valueDescription
out_portProcessWithPort
in_portProcessWithPort
ADD_CONNECTOR_NEW

Add a connector between to process of this protocol

Exemple : protocol.add_connector('create', 'robot', 'sub_proto','robot_i')

Parameters:
NameTypeDefault valueDescription
from_process_namestr
from_port_namestr
to_process_namestr
to_port_namestr
ADD_CONNECTORS

Add multiple connector inside the protocol

Exemple : protocol.add_connectors([ (create >> 'robot', sub_proto << 'robot_i'), (sub_proto.get_output_port('robot_o'), robot_travel.get_input_port('robot')) ])

Parameters:
NameTypeDefault valueDescription
connectorsList
ADD_EMPTY_PROTOCOL

Add an empty protocol to this protocol

Parameters:
NameTypeDefault valueDescription
instance_namestr
Return type:
ProtocolProxy
ADD_INTERFACE

Add an interface to link an input of the protocol to the input of one of the protocol's process

Parameters:
NameTypeDefault valueDescription
namestr Name of the interface
from_process_namestr
process_input_namestr Name of the process input to plug
ADD_OUTERFACE

Add an outerface to link the output of one of the protocol's process to the output of the protocol

Parameters:
NameTypeDefault valueDescription
namestr Name of the interface
to_process_namestr
process_ouput_namestr Name of the process output to plug
ADD_OUTPUT

Add an output task to the protocol that receive the out_port resource

Parameters:
NameTypeDefault valueDescription
instance_namestr Instance name of the task
out_portProcessWithPort Out_port connect to connect to the output task outport
flag_resourcebool True Flag the resource, defaults to true , optional
Return type:
TaskProxy
ADD_PROCESS

Add a process (task or protocol) to this protocol. This process is automatically saved in the database

Parameters:
NameTypeDefault valueDescription
process_typeType
instance_namestr
config_paramsDict
Return type:
ProcessProxy
ADD_PROTOCOL

Add a protocol from a protocol type

Parameters:
NameTypeDefault valueDescription
protocol_typeType
instance_namestr
config_paramsDict
Return type:
ProtocolProxy
ADD_RESOURCE

Add a resource to the protocol and connected it to the in_port

Parameters:
NameTypeDefault valueDescription
instance_namestr Instance name of the task
resource_model_idstr The id of the resource model the source will provided as input
in_portProcessWithPort The in port that should receive the resource. if none, the resource is added to the protocol without connection inport
Return type:
TaskProxy
ADD_SINK

Add an output task to the protocol that receive the out_port resource

Parameters:
NameTypeDefault valueDescription
instance_namestr Instance name of the task
out_portProcessWithPort Out_port connect to connect to the output task outport
flag_resourcebool True Flag the resource, defaults to true , optional
Return type:
TaskProxy
ADD_SOURCE

Add a Source task to the protocol and connected it to the in_port

Parameters:
NameTypeDefault valueDescription
instance_namestr Instance name of the task
resource_model_idstr The id of the resource model the source will provided as input
in_portProcessWithPort The in port that should receive the resource inport
Return type:
TaskProxy
ADD_TASK

Add a task to this

Parameters:
NameTypeDefault valueDescription
task_typeType
instance_namestr
config_paramsDict
Return type:
TaskProxy
DELETE_INTERFACE

Delete an interface of the protocol

Parameters:
NameTypeDefault valueDescription
namestr
DELETE_OUTERFACE

Delete an outerface of the protocol

Parameters:
NameTypeDefault valueDescription
namestr
DELETE_PROCESS
Parameters:
NameTypeDefault valueDescription
instance_namestr
GET_FIRST_INPORT
Return type:
ProcessWithPort
GET_FIRST_OUTPORT
Return type:
ProcessWithPort
GET_INPUT

retrieve the resource of the input

Parameters:
NameTypeDefault valueDescription
namestr [description]
Return type:
Resource
GET_INPUT_PORT

Access input port information of a process to create connectors in protocol

Parameters:
NameTypeDefault valueDescription
port_namestr
Return type:
ProcessWithPort
GET_INPUT_RESOURCE_MODEL

retrieve the resource model of the input

Parameters:
NameTypeDefault valueDescription
namestr [description]
Return type:
ResourceModel
GET_MODEL
Return type:
ProtocolModel
GET_MODEL_ID
Return type:
str
GET_OUTPUT

retrieve the resource of the output

Parameters:
NameTypeDefault valueDescription
namestr [description]
Return type:
Resource
GET_OUTPUT_PORT

Access output port information of a process to create connectors in protocol

Parameters:
NameTypeDefault valueDescription
port_namestr
Return type:
ProcessWithPort
GET_OUTPUT_RESOURCE_MODEL

retrieve the resource model of the output

Parameters:
NameTypeDefault valueDescription
namestr [description]
Return type:
ResourceModel
GET_PARAM
Parameters:
NameTypeDefault valueDescription
namestr
Return type:
Any
GET_PROCESS

retreive a protocol or a task in this protocol

:raises Exception: [description]

Parameters:
NameTypeDefault valueDescription
instance_namestr [description]
Return type:
ProcessProxy
GET_PROCESS_TYPE
Return type:
Type[Process]
REFRESH
Return type:
ProcessProxy
RESET_CONFIG
SET_CONFIG_PARAMS

Set the config param values

Parameters:
NameTypeDefault valueDescription
config_paramsDict
SET_INPUT

Set the resource of an input. If you want to manually set the input resource of a process

Parameters:
NameTypeDefault valueDescription
namestr [description]
resourceResource [description]
SET_PARAM

Set the param value

Parameters:
NameTypeDefault valueDescription
param_namestr
valueAny
GET_BY_ID - @classmethod
Parameters:
NameTypeDefault valueDescription
idstr
Return type:
ProtocolProxy