API reference

client

class zgw_consumers.client.APIKeyAuth(header: str, key: str)[source]

API Key based requests.auth.AuthBase implementation.

class zgw_consumers.client.ServiceConfigAdapter(service: Service)[source]

An implementation of ape_pie.ConfigAdapter that will extract session kwargs from a given zgw_consumers.models.Service.

class zgw_consumers.client.ZGWAuth(service: Service)[source]

requests.auth.AuthBase implementation for ZGW APIs auth.

zgw_consumers.client.build_client(service: ~zgw_consumers.models.services.Service, client_factory: type[~zgw_consumers.client.ClientT] = <class 'zgw_consumers.nlx.NLXClient'>, **kwargs) ClientT[source]

Build a client for a given zgw_consumers.models.Service.

nlx

class zgw_consumers.nlx.NLXClient(*args, nlx_base_url: str = '', **kwargs)[source]

A ape_pie.APIClient implementation that will take care of rewriting URLs with an event hook.

zgw_consumers.nlx.get_nlx_services() list[tuple[dict[str, str], list[dict[str, str]]]][source]

utils

class zgw_consumers.utils.PaginatedResponseData[source]
zgw_consumers.utils.pagination_helper(client: APIClient, paginated_data: PaginatedResponseData, max_requests: int | None = None, **kwargs)[source]

Fetch results from a paginated API endpoint, and optionally limit the number of requests to perform when fetching new pages by specifying the max_requests argument