oapen_books.oapen_models¶
Attributes¶
Classes¶
A single metadata field entry from the OAPEN DSpace REST API. |
|
A single item (book) record as returned by the OAPEN DSpace REST API. |
|
Root model for the OAPEN DSpace REST API search response (a JSON array). |
Module Contents¶
- oapen_books.oapen_models.OAPEN_LICENSE_TO_SPDX: types.MappingProxyType[str, str]¶
- oapen_books.oapen_models.OAPEN_BASE_URL = 'https://library.oapen.org'¶
- class oapen_books.oapen_models.OapenMetadataEntry(/, **data: Any)¶
Bases:
pydantic.BaseModelA single metadata field entry from the OAPEN DSpace REST API.
- key: str = None¶
- value: str = None¶
- language: str = None¶
- class oapen_books.oapen_models.OapenItem(/, **data: Any)¶
Bases:
pydantic.BaseModelA single item (book) record as returned by the OAPEN DSpace REST API.
Endpoint: GET https://library.oapen.org/rest/search?query=<q>&expand=metadata
- model_config¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- uuid: str = None¶
- name: str = None¶
- handle: str = None¶
- type: str = None¶
- link: str = None¶
- last_modified: str = None¶
- metadata: list[OapenMetadataEntry] = None¶
- get_metadata_values(key: str) list[str]¶
Return all values for a given Dublin Core key.
- get_metadata_value(key: str, default: str = '') str¶
Return the first value for a given Dublin Core key, or default.
- property source_url: str¶
Return the canonical OAPEN handle URL for this item.
- property spdx_license: str¶
Translate the dc.rights value to an SPDX expression.
- class oapen_books.oapen_models.OapenSearchResponse¶
Bases:
pydantic.RootModel[list[OapenItem]]Root model for the OAPEN DSpace REST API search response (a JSON array).
- oapen_books.oapen_models.here¶