From a7b508d7d90c18cd60018aef9c47e365dd76a2f5 Mon Sep 17 00:00:00 2001 From: Hrishabh Tiwari Date: Wed, 6 Mar 2024 17:01:27 +0530 Subject: [PATCH] Modified generator to yield 1000 records at a time --- qbosdk/apis/api_base.py | 3 +-- setup.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/qbosdk/apis/api_base.py b/qbosdk/apis/api_base.py index dbd105f..f843603 100644 --- a/qbosdk/apis/api_base.py +++ b/qbosdk/apis/api_base.py @@ -113,8 +113,7 @@ def _query_get_all_generator(self, object_type: str, url: str) -> Generator[Dict if not query_response or object_type not in query_response: break - for obj in query_response[object_type]: - yield obj + yield query_response[object_type] start_position += 1000 diff --git a/setup.py b/setup.py index ef4cdec..442ccfc 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name='qbosdk', - version='0.17.1', + version='0.17.2', author='Shwetabh Kumar', author_email='shwetabh.kumar@fyle.in', description='Python SDK for accessing Quickbooks Online APIs',