I'm using the following Python (v3.8.10) code with the latest version of the Office365-REST-Python-Client to access an MS-List on my Sharepoint site:
sp_lists = ctx.web.lists
s_list = sp_lists.get_by_title(staff_list)
l_items = s_list.get_items()
ctx.load(l_items)
ctx.execute_query()
It works except only the 1st 100 records are returned. This seems to be a well known issue, but after searching I can't find the code changes required to enable all records to be returned up to the limit (5000 I believe?).
Any help with this is most appreciated. Many thanks in advance.
Found the answer - in case this is useful to anyone
[Courtesy of] [1]: https://github.com/vgrem/Office365-REST-Python-Client/blob/master/examples/sharepoint/lists/read_large_list.py