mex.extractors.igs package¶
Submodules¶
mex.extractors.igs.connector module¶
- class mex.extractors.igs.connector.IGSConnector¶
Bases:
HTTPConnector
Connector class to handle requesting IGS OpenAPI.
- _set_url() None ¶
Set url of the host.
- get_json_from_api() dict[str, Any] ¶
Get json from IGS Open Api.
- Raises:
MExError if IGS Open API returns an error in the response body –
- Returns:
Parsed JSON body of the response
mex.extractors.igs.extract module¶
- mex.extractors.igs.extract.extract_igs_schemas() dict[str, IGSSchemas] ¶
Extract IGS schemas.
- Returns:
IGS schemas by name
mex.extractors.igs.main module¶
mex.extractors.igs.model module¶
- class mex.extractors.igs.model.IGSEnum(*, enum: list[str])¶
Bases:
IGSSchemas
Model class for IGS Enum.
- enum: list[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]] = {'enum': FieldInfo(annotation=list[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.igs.model.IGSProperties(*, properties: dict[str, Any])¶
Bases:
IGSSchemas
Model class for IGS Properties.
- 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]] = {'properties': FieldInfo(annotation=dict[str, Any], 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.
- properties: dict[str, Any]¶
- class mex.extractors.igs.model.IGSSchemas¶
Bases:
BaseModel
Model class for IGS Schemas.
- 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]] = {}¶
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.
mex.extractors.igs.settings module¶
- class mex.extractors.igs.settings.IGSSettings(*, url: str = 'https://igs', mapping_path: AssetsPath = AssetsPath('mappings/igs'))¶
Bases:
BaseModel
IGS settings submodel definition for the IGS extractor.
- mapping_path: AssetsPath¶
- 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]] = {'mapping_path': FieldInfo(annotation=AssetsPath, required=False, default=AssetsPath("mappings/igs"), description='Path to the directory with the IGS mapping files containing the default values, absolute path or relative to `assets_dir`.'), 'url': FieldInfo(annotation=str, required=False, default='https://igs', description='URL of IGS instance')}¶
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.
- url: str¶