movai_core_shared.messages package
Submodules
movai_core_shared.messages.alert_data module
Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential
Developers: - Erez Zomer (erez@mov.ai) - 2023
- class movai_core_shared.messages.alert_data.AlertActivationData(*, args: str | None, activation_date: str)
Bases:
BaseModel- activation_date: str
- args: str | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'activation_date': FieldInfo(annotation=str, required=True), 'args': FieldInfo(annotation=Union[str, NoneType], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class movai_core_shared.messages.alert_data.AlertData(*, deactivation_date: str, deactivation_type: Literal['requested'] | Literal['auto_cleared'], args: str | None, activation_date: str, alert_id: str)
Bases:
AlertActivationData,AlertDeactivationData- alert_id: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'activation_date': FieldInfo(annotation=str, required=True), 'alert_id': FieldInfo(annotation=str, required=True), 'args': FieldInfo(annotation=Union[str, NoneType], required=True), 'deactivation_date': FieldInfo(annotation=str, required=True), 'deactivation_type': FieldInfo(annotation=Union[Literal['requested'], Literal['auto_cleared']], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class movai_core_shared.messages.alert_data.AlertDeactivationData(*, deactivation_date: str, deactivation_type: Literal['requested'] | Literal['auto_cleared'])
Bases:
BaseModel- deactivation_date: str
- deactivation_type: Literal['requested'] | Literal['auto_cleared']
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'deactivation_date': FieldInfo(annotation=str, required=True), 'deactivation_type': FieldInfo(annotation=Union[Literal['requested'], Literal['auto_cleared']], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
movai_core_shared.messages.command_data module
Command data message definition.
- class movai_core_shared.messages.command_data.Command(*, command_data: CommandData, dst: Destination)
Bases:
BaseModel- command_data: CommandData
- dst: Destination
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'command_data': FieldInfo(annotation=CommandData, required=True), 'dst': FieldInfo(annotation=Destination, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class movai_core_shared.messages.command_data.CommandData(*, command: str, flow: str | None = '', node: str | None = '', port: str | None = '', data: dict | None = {})
Bases:
BaseModel- command: str
- data: dict | None
- flow: str | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'command': FieldInfo(annotation=str, required=True), 'data': FieldInfo(annotation=Union[dict, NoneType], required=False, default={}), 'flow': FieldInfo(annotation=Union[str, NoneType], required=False, default=''), 'node': FieldInfo(annotation=Union[str, NoneType], required=False, default=''), 'port': FieldInfo(annotation=Union[str, NoneType], required=False, default='')}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- node: str | None
- port: str | None
- class movai_core_shared.messages.command_data.CommandReq(*, req_id: str | None = None, req_type: str, created: int, response_required: bool, robot_info: RobotInfo, req_data: Command)
Bases:
Request- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'created': FieldInfo(annotation=int, required=True), 'req_data': FieldInfo(annotation=Command, required=True), 'req_id': FieldInfo(annotation=Union[str, NoneType], required=False), 'req_type': FieldInfo(annotation=str, required=True), 'response_required': FieldInfo(annotation=bool, required=True), 'robot_info': FieldInfo(annotation=RobotInfo, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class movai_core_shared.messages.command_data.Destination(*, ip: str, host: str, id: str)
Bases:
BaseModel- host: str
- id: str
- ip: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'host': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'ip': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
movai_core_shared.messages.email_data module
Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential
Developers: - Moawiya Mograbi (moawiya@mov.ai) - 2023
- class movai_core_shared.messages.email_data.EmailData(*, recipients: List[EmailStr], notification_type: str = 'smtp', subject: str | None = None, body: str, attachment_data: str | None = None, sender: str = 'UNDEFINED_ROBOT_NAME movai')
Bases:
BaseModela base dataclass based on pydantic basemodel in order to support validation and check for missing fields or wrong values.
- attachment_data: str | None
- body: str
- model_config: ClassVar[ConfigDict] = {'frozen': False}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'attachment_data': FieldInfo(annotation=Union[str, NoneType], required=False), 'body': FieldInfo(annotation=str, required=True), 'notification_type': FieldInfo(annotation=str, required=False, default='smtp'), 'recipients': FieldInfo(annotation=List[pydantic.networks.EmailStr], required=True), 'sender': FieldInfo(annotation=str, required=False, default='UNDEFINED_ROBOT_NAME movai'), 'subject': FieldInfo(annotation=Union[str, NoneType], required=False)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- notification_type: str
- classmethod notification_type_valid(value)
Validates the notification_type field
- Parameters:
value (str) – Which notification to use.
- Raises:
ValueError – In case notification is diffenrent from smtp.
- Returns:
The given value.
- Return type:
str
- recipients: List[EmailStr]
- sender: str
- subject: str | None
movai_core_shared.messages.general_data module
Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential
Developers: - Erez Zomer (erez@mov.ai) - 2023
- class movai_core_shared.messages.general_data.Request(*, req_id: str | None = None, req_type: str, created: int, response_required: bool, robot_info: RobotInfo)
Bases:
BaseModel- created: int
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'created': FieldInfo(annotation=int, required=True), 'req_id': FieldInfo(annotation=Union[str, NoneType], required=False), 'req_type': FieldInfo(annotation=str, required=True), 'response_required': FieldInfo(annotation=bool, required=True), 'robot_info': FieldInfo(annotation=RobotInfo, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- req_id: str | None
- req_type: str
- response_required: bool
- class movai_core_shared.messages.general_data.RobotInfo(*, fleet: str, robot: str, service: str, id: str)
Bases:
BaseModela base dataclass based on pydantic basemodel in order to support validation and check for missing fields or wrong values.
- fleet: str
- id: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'fleet': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'robot': FieldInfo(annotation=str, required=True), 'service': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- robot: str
- service: str
- movai_core_shared.messages.general_data.print_dict(message: dict, space_count: int)
movai_core_shared.messages.log_data module
Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential
Developers: - Erez Zomer (erez@mov.ai) - 2023
- class movai_core_shared.messages.log_data.LogFields(*, module: str, funcName: str, lineno: int, message: str, args: str | None = None)
Bases:
BaseModel- args: str | None
- format() → str
Format log message.
- Returns:
The formatted log message.
- Return type:
str
- funcName: str
- lineno: int
- message: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'args': FieldInfo(annotation=Union[str, NoneType], required=False), 'funcName': FieldInfo(annotation=str, required=True), 'lineno': FieldInfo(annotation=int, required=True), 'message': FieldInfo(annotation=str, required=True), 'module': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- module: str
- class movai_core_shared.messages.log_data.LogTags(*, robot: str, level: str, service: str, runtime: bool = False, **extra_data: Any)
Bases:
BaseModel- level: str
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'level': FieldInfo(annotation=str, required=True), 'robot': FieldInfo(annotation=str, required=True), 'runtime': FieldInfo(annotation=bool, required=False, default=False), 'service': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- robot: str
- runtime: bool
- service: str
movai_core_shared.messages.metric_data module
movai_core_shared.messages.notification_data module
Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential
Developers: - Moawiya Mograbi (moawiya@mov.ai) - 2023
- class movai_core_shared.messages.notification_data.NotificationDataFactory
Bases:
object- classmethod create(notification_type: str, notification_data: dict)
create an Object according to the type of the notification
- Parameters:
notification_type (str) – the notificaiton type.
notification_data (dict) – the notification data.
- Returns:
dataclass like obj representing the notification data
- Return type:
Obj
movai_core_shared.messages.sms_data module
Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential
Developers: - Moawiya Mograbi (moawiya@mov.ai) - 2023
- class movai_core_shared.messages.sms_data.SMSData(*, recipients: List[str], msg: str, notification_type: str)
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'msg': FieldInfo(annotation=str, required=True), 'notification_type': FieldInfo(annotation=str, required=True), 'recipients': FieldInfo(annotation=List[str], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- msg: str
- notification_type: str
- recipients: List[str]
movai_core_shared.messages.user_data module
Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential
Developers: - Moawiya Mograbi (moawiya@mov.ai) - 2023
- class movai_core_shared.messages.user_data.UserData(*, notification_type: str = 'user', msg: str, robot_id: str, robot_name: str)
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'msg': FieldInfo(annotation=str, required=True), 'notification_type': FieldInfo(annotation=str, required=False, default='user'), 'robot_id': FieldInfo(annotation=str, required=True), 'robot_name': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- msg: str
- notification_type: str
- robot_id: str
- robot_name: str