Skip to content

Add get_table_data_iter and get_table_data_all_iter#10

Merged
stefur merged 1 commit into
stefur:mainfrom
frehoy:streaming-responses
Jun 9, 2026
Merged

Add get_table_data_iter and get_table_data_all_iter#10
stefur merged 1 commit into
stefur:mainfrom
frehoy:streaming-responses

Conversation

@frehoy

@frehoy frehoy commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

The new methods are iterators that yield from the response chunks
from .fetch without collecting the full response into a list, thus saving memory
for large responses.

Changes get_table_data and get_table_data_all to be thin wrappers around
their corresponding _iter methods that only collect the full result
into a list.

Should fix #9

The new methods are iterators that yield from the response chunks
from .fetch without collecting the full into a list, thus saving memory
for large responses.

Changes get_table_data and get_table_data_all to be thin wrappers around
their corresponding _iter methods that only collect the full result
into a list.
@stefur

stefur commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Nice! I'll give it a test drive and then merge (CI failing unrelated).

@stefur

stefur commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Works great, I just had to remember to also turn off the requests cache and the RAM usage was dramatically lower as expected. I should probably put that into the documentation. :)
Thanks a lot for this!

@stefur stefur merged commit b249554 into stefur:main Jun 9, 2026
0 of 3 checks passed
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.

Streaming to reduce memory usage

2 participants