File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,3 +30,25 @@ client.set_timeout(
3030```
3131
3232_ Timeouts support integer and float values, you can also set either value to ` None ` to disable timeout for connect or read separately_
33+
34+ ## Trust Discogs per page value
35+
36+ When accessing paginated results by index (e.g. ` results[42] ` ),
37+ python3-discogs-client uses the ` per_page ` value from the API response to
38+ calculate which page contains the item directly. This is fast, but assumes the
39+ API always returns exactly ` per_page ` items per page.
40+
41+ If the API returns fewer items per page than the reported ` per_page ` value,
42+ this calculation can be off. In such cases, disable this behaviour to fall
43+ back to a sequential page walk:
44+
45+ ``` python
46+ >> > import discogs_client
47+ >> > d = discogs_client.Client(' ExampleApplication/0.1' )
48+ >> > d.trust_per_page = False
49+ ```
50+
51+ :::{attention}
52+ The sequential fallback is slower for large result sets, as it must fetch pages
53+ one by one until it reaches the requested index.
54+ :::
You can’t perform that action at this time.
0 commit comments