mex.extractors.rdmo.models package¶
Submodules¶
mex.extractors.rdmo.models.person module¶
- class mex.extractors.rdmo.models.person.RDMOPerson(*, id: int, username: str, first_name: str | None = None, last_name: str | None = None, email: str | None = None)¶
Bases:
BaseModel
Model class for RDMO persons.
- email: str | None¶
- first_name: str | None¶
- id: int¶
- last_name: str | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_max_length': 100000, 'str_min_length': 0, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_default': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'first_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=int, required=True), 'last_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'username': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- username: str¶
mex.extractors.rdmo.models.question module¶
- class mex.extractors.rdmo.models.question.RDMOOption(*, key: str)¶
Bases:
BaseModel
Partial model for RDMO options used in multiple-choice questions.
- key: str¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_max_length': 100000, 'str_min_length': 1, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_default': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'key': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class mex.extractors.rdmo.models.question.RDMOQuestion(*, uri: str, uri_prefix: str)¶
Bases:
BaseModel
Partial model for RDMO question objects.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_max_length': 100000, 'str_min_length': 1, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_default': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'uri': FieldInfo(annotation=str, required=True), 'uri_prefix': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- uri: str¶
- uri_prefix: str¶
- class mex.extractors.rdmo.models.question.RDMOValue(*, attribute: int, text: str | None, option: int | None)¶
Bases:
BaseModel
Partial model for RDMO values (questionnaire answers).
- attribute: int¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_max_length': 100000, 'str_min_length': 0, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_default': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'attribute': FieldInfo(annotation=int, required=True), 'option': FieldInfo(annotation=Union[int, NoneType], required=True), 'text': FieldInfo(annotation=Union[str, NoneType], required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- option: int | None¶
- text: str | None¶
mex.extractors.rdmo.models.source module¶
- class mex.extractors.rdmo.models.source.RDMOSource(*, id: int, title: str, description: str | None = None, catalog: int | None = None, parent: int | None = None, owners: list[RDMOPerson] = [], question_answer_pairs: dict[str, str] = {})¶
Bases:
BaseModel
Model class for RDMO sources.
- catalog: int | None¶
- description: str | None¶
- id: int¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_max_length': 100000, 'str_min_length': 0, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_default': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'catalog': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=int, required=True), 'owners': FieldInfo(annotation=list[RDMOPerson], required=False, default=[]), 'parent': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'question_answer_pairs': FieldInfo(annotation=dict[str, str], required=False, default={}), 'title': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- owners: list[RDMOPerson]¶
- parent: int | None¶
- question_answer_pairs: dict[str, str]¶
- title: str¶