Requesting more than 500 speckle objects using pyspeckle

Hi all,

I’ve been using pyspeckle’s client.streams.list_objects() to get Speckle data inside python.
It seems the request can get a maximum of 500 elements per call and I’m wondering how to specify that I want the next “batch” of speckle elements, for example element 501 until 1000 with another api call.
Does anyone know how?
Thanks!

Daan

Hi @Daan - are we talking V1 or V2? It looks like V1, in which case you can pass in a query parameter of ?offset=500&limit=500 to list_objects(). Not sure how you would do that with the SDK properly, but those are the main lines. @izzylys might know more!

Hi @dimitrie, that works! thanks
Adding the solution in case anyone ever runs into the same issue:

client.streams.list_objects(stream_id, query={'limit': '100', 'offset':'100'})
2 Likes