Skip to content

Conversation

@copperwall
Copy link

get_all_serial is used to iterate through a paginated response from
shipwire's API. Previously it would add each batch of items to a list
and then return that list once there were no more results to get.

This changes get_all_serial to be a generator, so that the program only
has to keep a single batch's worth of items in memory at a time. This is
especially helpful for grabbing large datasets from shipwire, because
you can begin processing resource items from shipwire while there are still items
to be fetched.

get_all_serial is used to iterate through a paginated response from
shipwire's API. Previously it would add each batch of items to a list
and then return that list once there were no more results to get.

This changes get_all_serial to be a generator, so that the program only
has to keep a single batch's worth of items in memory at a time. This is
especially helpful for grabbing large datasets from shipwire, because
you can begin processing items from shipwire while there are still items
to be requested.
@copperwall copperwall force-pushed the use-generator-for-get-all-serial branch from ae85f12 to c3b7e7a Compare January 16, 2018 05:19
@coveralls
Copy link

coveralls commented Jan 16, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling c3b7e7a on copperwall:use-generator-for-get-all-serial into 65783bc on soylentme:master.

1 similar comment
@coveralls
Copy link

coveralls commented Jan 16, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling c3b7e7a on copperwall:use-generator-for-get-all-serial into 65783bc on soylentme:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants