Skip to content

base

mainsequence.client.base

BaseObjectOrm

filter(timeout=None, **kwargs) classmethod

Fetches all pages from a DRF-paginated endpoint. Accumulates results from each page until 'next' is None.

Returns a list of cls objects (not just one page).

DRF's typical paginated response looks like: { "count": , "next": , "previous": , "results": [ ...items... ] }

get(pk=None, timeout=None, **filters) classmethod

Retrieves exactly one object by primary key: GET /base_url// Raises DoesNotExist if 404 or the response is empty. Raises Exception if multiple or unexpected data is returned.