mindmeld.components.schemas module

class mindmeld.components.schemas.DialogueResponseSchema(*, only: Union[Sequence[str], Set[str]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Dict = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: str = None)[source]

Bases: marshmallow.schema.Schema

opts = <marshmallow.schema.SchemaOpts object>
class mindmeld.components.schemas.FormEntitySchema(*, only: Union[Sequence[str], Set[str]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Dict = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: str = None)[source]

Bases: marshmallow.schema.Schema

deserialize_value(value)[source]
serialize_value(form)[source]
opts = <marshmallow.schema.SchemaOpts object>
class mindmeld.components.schemas.FormSchema(*, only: Union[Sequence[str], Set[str]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Dict = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: str = None)[source]

Bases: marshmallow.schema.Schema

opts = <marshmallow.schema.SchemaOpts object>
class mindmeld.components.schemas.LanguageCodeField(*, default: Any = <marshmallow.missing>, missing: Any = <marshmallow.missing>, data_key: str = None, attribute: str = None, validate: Union[Callable[[Any], Any], Iterable[Callable[[Any], Any]]] = None, required: bool = False, allow_none: bool = None, load_only: bool = False, dump_only: bool = False, error_messages: Dict[str, str] = None, **metadata)[source]

Bases: marshmallow.fields.String

class mindmeld.components.schemas.LocaleCodeField(*, default: Any = <marshmallow.missing>, missing: Any = <marshmallow.missing>, data_key: str = None, attribute: str = None, validate: Union[Callable[[Any], Any], Iterable[Callable[[Any], Any]]] = None, required: bool = False, allow_none: bool = None, load_only: bool = False, dump_only: bool = False, error_messages: Dict[str, str] = None, **metadata)[source]

Bases: marshmallow.fields.String

class mindmeld.components.schemas.ParamsSchema(*, only: Union[Sequence[str], Set[str]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Dict = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: str = None)[source]

Bases: marshmallow.schema.Schema

class Meta[source]

Bases: object

unknown = 'exclude'
deserialize_allowed_intents(allowed_intents: List[str]) → List[str][source]
deserialize_dynamic_resource(value)[source]
deserialize_target_dialogue_state(target_dialogue_state: str) → Optional[str][source]
serialize_allowed_intents(params) → List[str][source]
serialize_dynamic_resource(params)[source]
serialize_target_dialogue_state(params) → Optional[str][source]
opts = <marshmallow.schema.SchemaOpts object>
class mindmeld.components.schemas.RequestSchema(*, only: Union[Sequence[str], Set[str]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Dict = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: str = None)[source]

Bases: marshmallow.schema.Schema

deserialize_list_of_list_of_immutable_maps(values)[source]
deserialize_list_of_maps(value)[source]
deserialize_map(value)[source]
serialize_confidences(request)[source]
serialize_context(request)[source]
serialize_entities(request)[source]
serialize_form(request)[source]
serialize_frame(request)[source]
serialize_history(request)[source]
serialize_nbest_aligned_entities(request)[source]
serialize_nbest_transcripts_entities(request)[source]
opts = <marshmallow.schema.SchemaOpts object>
class mindmeld.components.schemas.TimeZoneField(*, default: Any = <marshmallow.missing>, missing: Any = <marshmallow.missing>, data_key: str = None, attribute: str = None, validate: Union[Callable[[Any], Any], Iterable[Callable[[Any], Any]]] = None, required: bool = False, allow_none: bool = None, load_only: bool = False, dump_only: bool = False, error_messages: Dict[str, str] = None, **metadata)[source]

Bases: marshmallow.fields.String

class mindmeld.components.schemas.TimestampField(*, strict: bool = False, **kwargs)[source]

Bases: marshmallow.fields.Integer

mindmeld.components.schemas.deserialize_to_list_immutable_maps(value)[source]

Custom attrs converter. Converts a list of elements into a list of immutables.Map objects.

mindmeld.components.schemas.deserialize_to_lists_of_list_of_immutable_maps(values)[source]

Custom attrs converter. Converts a list of elements into a list of immutables.Map objects.

mindmeld.components.schemas.serialize_to_list_of_dicts(values)[source]

Custom attrs converter. Converts a list of elements into a list of immutables.Map objects.

mindmeld.components.schemas.serialize_to_lists_of_list_of_dicts(values)[source]

Custom attrs converter. Converts a list of elements into a list of immutables.Map objects.

mindmeld.components.schemas.validate_language_code(value: Optional[str]) → Optional[str][source]

Validates language code parameters :param value: The language code parameter :type value: str

Returns:A validated language code or None if unvalidated
Return type:str
mindmeld.components.schemas.validate_locale_code(value: Optional[str]) → Optional[str][source]

Validates the locale code parameters :param value: The locale code parameter :type value: str

Returns:A validated locale code or None if unvalidated
Return type:str
mindmeld.components.schemas.validate_locale_code_with_ref_language_code(locale: Optional[str], reference_language_code: str) → Optional[str][source]

This function makes sure the locale is consistent with the app's language code

mindmeld.components.schemas.validate_timestamp(value: Union[int, float, str]) → int[source]