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