mxcubecore.model.protocols.exporter

Models the exporter section of YAML hardware configuration file.

Provides an API to read configured exporter channels and commands.

Classes

Address(*[, commands, channels])

Configuration of an exporter end point.

Channel(*[, attribute])

Exporter channel configuration.

Command(*[, name])

Exporter command configuration.

ExporterConfig([root])

The 'exporter' section of the hardware object's YAML configuration file.

class mxcubecore.model.protocols.exporter.Address(*, commands: Dict[str, Command | None] | None = None, channels: Dict[str, Channel | None] | None = None)[source]

Bases: BaseModel

Configuration of an exporter end point.

Parameters:
get_channels() → Iterable[Tuple[str, Channel]][source]

Get all channels configured for this exporter address.

This method will fill in optional configuration properties for channels.

Return type:

Iterable[Tuple[str, Channel]]

get_commands() → Iterable[tuple[str, Command]][source]

Get all commands configured for this exporter address.

This method will fill in optional configuration properties the commands.

Return type:

Iterable[tuple[str, Command]]

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class mxcubecore.model.protocols.exporter.Channel(*, attribute: str | None = None)[source]

Bases: BaseModel

Exporter channel configuration.

Parameters:

attribute (str | None)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class mxcubecore.model.protocols.exporter.Command(*, name: str | None = None)[source]

Bases: BaseModel

Exporter command configuration.

Parameters:

name (str | None)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class mxcubecore.model.protocols.exporter.ExporterConfig(root: RootModelRootType = PydanticUndefined)[source]

Bases: RootModel[Dict[str, Address]]

The ‘exporter’ section of the hardware object’s YAML configuration file.

Parameters:

root (RootModelRootType)

get_addresses() → Iterable[Tuple[str, Address]][source]

Get all exporter addresses specified in this section.

Return type:

Iterable[Tuple[str, Address]]

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].