GUIDE / API CLIENTS
Keep the last page.
The pagination fixture has 103 records. At 20 per page, the sixth page contains three rows. Follow next_offset until null, then verify IDs.
import json
from urllib.request import urlopen
base = "https://lumenfixtures.com"
items, offset = [], 0
while offset is not None:
with urlopen(f"{base}/api/fixtures/pagination?offset={offset}&limit=20", timeout=15) as response:
page = json.load(response)
items.extend(page["items"])
offset = page["next_offset"]
assert len(items) == 103
assert [row["id"] for row in items] == list(range(1, 104))
For a production client, bound retries and honor 429 Retry-After. This example fails visibly on HTTP errors. Fixture contract →