Skip to content

cmem_client.repositories.base.paged_list¤

Repository implementation for paginated API endpoints.

This module provides PagedListRepository, a repository implementation that handles paginated API responses commonly used in eccenca Corporate Memory’s DataPlatform (explore) APIs. It automatically fetches all pages of results and provides a unified dictionary-like interface.

The PagedListRepository is typically used for endpoints that return results in a paginated format with metadata about page size, number, and totals.

Classes:

PagedListRepository¤

Bases: Repository

Repository that uses a paged list endpoint.

Attributes:

  • _dict (dict[str, PagedListRepository[ItemType]]) – Cached contents of the repository, mapping the key of each item to the item itself. Backs the Mapping interface and is populated by fetch_data().
  • _client (Client) – Corporate Memory client used for the HTTP requests of this repository.
  • _config (RepositoryConfig) – Describes which paged endpoint the repository fetches its data from.

Functions:

  • fetch_data – Fetch a paged list from a JSON endpoint via a type adapter.
  • items – Get the items of the repository
  • keys – Get the keys of the repository
  • values – Get the values of the repository

fetch_data¤

fetch_data()

Fetch a paged list from a JSON endpoint via a type adapter.

Use this method to fetch data if your result set is a pageable spring endpoint.

items¤

items()

Get the items of the repository

keys¤

keys()

Get the keys of the repository

logger¤

logger: logging.Logger

Gets the client logger

values¤

values()

Get the values of the repository

Comments