schemas
Provides schemas used in Plugboard.
This includes:
- Pydantic models for specifying Plugboard objects;
TypeDict
definitions for constructor**kwargs
.
ComponentArgsDict
ComponentArgsSpec
Bases: PlugboardBaseModel
Specification of the Component
constructor arguments.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The name of the |
initial_values |
dict[str, Any]
|
Initial values for the |
parameters |
dict[str, Any]
|
Parameters for the |
constraints |
dict[str, Any]
|
Constraints for the |
ComponentSpec
Bases: PlugboardBaseModel
Specification of a Component
.
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
The type of the |
args |
ComponentArgsSpec
|
The arguments for the |
ConfigSpec
Bases: PlugboardBaseModel
Configuration for a Plugboard simulation.
Attributes:
Name | Type | Description |
---|---|---|
plugboard |
ProcessConfigSpec
|
A |
ConnectorBuilderArgsDict
ConnectorBuilderArgsSpec
Bases: PlugboardBaseModel
Specification of the Connector
constructor arguments.
Attributes:
Name | Type | Description |
---|---|---|
parameters |
dict[str, Any]
|
Parameters for the |
ConnectorBuilderSpec
Bases: PlugboardBaseModel
Specification of a ConnectorBuilder
.
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
The type of the |
args |
ConnectorBuilderArgsSpec
|
Optional; The arguments for the |
ConnectorMode
Bases: StrEnum
Defines the mode of a connector.
Attributes:
Name | Type | Description |
---|---|---|
PIPELINE |
one-in-one-out task queue. |
|
PUBSUB |
one-to-many event distribution. |
ConnectorSocket
Bases: PlugboardBaseModel
ConnectorSocket
defines a source or target connection point on a Connector
.
There are two typical types of connections in use: those between attributes of components;
and those connecting components with events which they either emit or consume. When connecting
two component attributes together, the entity
is the name of the component, and the
descriptor
is the name of the attribute. When connecting components with events, the entity
is the name of the event, and the descriptor
is either "publishers" or "subscribers" as
appropriate.
Attributes:
Name | Type | Description |
---|---|---|
entity |
str
|
The name of the entity. |
descriptor |
str
|
The name of the descriptor on the entity. |
ConnectorSpec
Bases: PlugboardBaseModel
ConnectorSpec
defines a connection between two entities.
Attributes:
Name | Type | Description |
---|---|---|
source |
ConnectorSocket
|
The source endpoint. |
target |
ConnectorSocket
|
The target endpoint. |
mode |
ConnectorMode
|
The mode of the connector. |
Entity
IODirection
ProcessArgsDict
ProcessArgsSpec
Bases: PlugboardBaseModel
Specification of the Process
constructor arguments.
Attributes:
Name | Type | Description |
---|---|---|
components |
Annotated[list[ComponentSpec], Len(min_length=1)]
|
Specifies each |
connectors |
list[ConnectorSpec]
|
Specifies the connections between each |
name |
Optional[str]
|
Unique identifier for |
parameters |
dict[str, Any]
|
Parameters for the |
state |
StateBackendSpec
|
Optional; Specifies the |
ProcessConfigSpec
Bases: PlugboardBaseModel
A ProcessSpec
within a Plugboard configuration.
Attributes:
Name | Type | Description |
---|---|---|
process |
ProcessSpec
|
A |
ProcessSpec
Bases: PlugboardBaseModel
Specification of a Plugboard Process
.
Attributes:
Name | Type | Description |
---|---|---|
args |
ProcessArgsSpec
|
The arguments for the |
type |
Literal['plugboard.process.LocalProcess', 'plugboard.process.RayProcess']
|
The type of |
connector_builder |
ConnectorBuilderSpec
|
The |
StateBackendArgsDict
StateBackendArgsSpec
Bases: PlugboardBaseModel
Specification of the StateBackend
constructor arguments.
Attributes:
Name | Type | Description |
---|---|---|
job_id |
Optional[str]
|
The unique id for the job. |
metadata |
dict[str, Any]
|
Metadata for a run. |
StateBackendSpec
Bases: PlugboardBaseModel
Specification of a Plugboard StateBackend
.
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
The type of the |
args |
StateBackendArgsSpec
|
The arguments for the |