mex.extractors.open_data.models package¶
Submodules¶
mex.extractors.open_data.models.source module¶
- class mex.extractors.open_data.models.source.OpenDataCreatorsOrContributors(*, name: str | None = None)¶
Bases:
BaseModel
Model subclass for Zenodo metadata Creators or Contributors.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
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.
- name: str | None¶
- class mex.extractors.open_data.models.source.OpenDataFiles(*, id: str | None = None)¶
Bases:
BaseModel
Model subclass for Zenodo file id.
- id: str | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
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.open_data.models.source.OpenDataLicense(*, id: str | None = None)¶
Bases:
BaseModel
Model subclass for Zenodo metadata license.
- id: str | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
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.open_data.models.source.OpenDataMetadata(*, title: str | None = None, description: str | None = None, creators: list[OpenDataCreatorsOrContributors] = [], contributors: list[OpenDataCreatorsOrContributors] = [], keywords: list[str] = [], related_identifiers: list[OpenDataRelateditdentifiers] = [], language: str | None = None, license: OpenDataLicense | None = None)¶
Bases:
BaseModel
Model subclass for Zenodo metadata dict.
- contributors: list[OpenDataCreatorsOrContributors]¶
- creators: list[OpenDataCreatorsOrContributors]¶
- description: str | None¶
- keywords: list[str]¶
- language: str | None¶
- license: OpenDataLicense | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'contributors': FieldInfo(annotation=list[OpenDataCreatorsOrContributors], required=False, default=[]), 'creators': FieldInfo(annotation=list[OpenDataCreatorsOrContributors], required=False, default=[]), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'keywords': FieldInfo(annotation=list[str], required=False, default=[]), 'language': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'license': FieldInfo(annotation=Union[OpenDataLicense, NoneType], required=False, default=None), 'related_identifiers': FieldInfo(annotation=list[OpenDataRelateditdentifiers], required=False, default=[]), 'title': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
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.
- title: str | None¶
- class mex.extractors.open_data.models.source.OpenDataParentResource(*, conceptrecid: str, id: int, modified: str | None = None, conceptdoi: str | None = None, metadata: OpenDataMetadata | None = None)¶
Bases:
BaseModel
Model class for a Zenodo record as resource parent.
- conceptdoi: str | None¶
- conceptrecid: str¶
- id: int¶
- metadata: OpenDataMetadata | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'conceptdoi': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'conceptrecid': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=int, required=True), 'metadata': FieldInfo(annotation=Union[OpenDataMetadata, NoneType], required=False, default=None), 'modified': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
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.
- modified: str | None¶
- class mex.extractors.open_data.models.source.OpenDataRelateditdentifiers(*, identifier: str | None = None, relation: str | None = None)¶
Bases:
BaseModel
Model subclass for Zenodo metadata related identifiers.
- identifier: str | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'identifier': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'relation': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
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.
- relation: str | None¶
- class mex.extractors.open_data.models.source.OpenDataResourceVersion(*, id: int, conceptrecid: str, created: str | None = None, doi_url: str | None = None, metadata: OpenDataMetadata | None = None, files: list[OpenDataFiles] = [], modified: str | None = None)¶
Bases:
BaseModel
Model class for Versions of a record.
- conceptrecid: str¶
- created: str | None¶
- doi_url: str | None¶
- files: list[OpenDataFiles]¶
- id: int¶
- metadata: OpenDataMetadata | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'conceptrecid': FieldInfo(annotation=str, required=True), 'created': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'doi_url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'files': FieldInfo(annotation=list[OpenDataFiles], required=False, default=[]), 'id': FieldInfo(annotation=int, required=True), 'metadata': FieldInfo(annotation=Union[OpenDataMetadata, NoneType], required=False, default=None), 'modified': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
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.
- modified: str | None¶