kodexa 6.1.1a1__py3-none-any.whl → 6.1.1a2.post4573624930__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
kodexa/platform/client.py CHANGED
@@ -1937,6 +1937,31 @@ class DataStoreEndpoint(StoreEndpoint):
1937
1937
  data_object_page.content]
1938
1938
  return data_object_page
1939
1939
 
1940
+ def get_stream_data_objects_request(self, path: str, query="*", document_family: Optional[DocumentFamily] = None,
1941
+ parent_id: Optional[str] = None):
1942
+ """
1943
+ Stream page request
1944
+ :param path (str): The parent taxon (/ is root)
1945
+ :param query (str): The query to limit results (Default *)
1946
+ :param document_family (Optional[DocumentFamily): Optionally the document family to limit results to
1947
+ :param parent_id (Optional[str]): Optionally the parent ID to limit results to
1948
+ :return:
1949
+ """
1950
+ page_size = 20
1951
+ page = 1
1952
+
1953
+ while True:
1954
+ data_object_response = self.get_data_objects_page_request(self, path, page, page_size, query,
1955
+ document_family, parent_id)
1956
+ if not data_object_response.content:
1957
+ break
1958
+
1959
+ yield data_object_response.content
1960
+ for data_object in data_object_response.content:
1961
+ yield data_object
1962
+
1963
+ page += 1
1964
+
1940
1965
  def create_data_objects(self, data_objects: List[DataObject]) -> List[DataObjectEndpoint]:
1941
1966
  """
1942
1967
  Create data objects in the store
@@ -2079,7 +2104,7 @@ class DocumentStoreEndpoint(StoreEndpoint):
2079
2104
  def download_document_families(self, output_dir: str):
2080
2105
  """Download all the document families in the store to the given directory"""
2081
2106
 
2082
- for document_family in self.query(page_size=9999).content:
2107
+ for document_family in self.stream_query():
2083
2108
  export_bytes = document_family.export()
2084
2109
  with open(os.path.join(output_dir, document_family.id + ".dfm"), 'wb') as f:
2085
2110
  f.write(export_bytes)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 6.1.1a1
3
+ Version: 6.1.1a2.post4573624930
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -11,7 +11,7 @@ kodexa/model/persistence.py,sha256=_d-FEAclxllSTMLqdlQ2-DbGoYaLkAMpB6fPj9xuYZQ,3
11
11
  kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
12
12
  kodexa/pipeline/pipeline.py,sha256=uzxe7HuSW1CKDZOrnV_LRHj3SHhbs14lvmMGJ_DIVdw,19763
13
13
  kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
14
- kodexa/platform/client.py,sha256=FQmxDxrS0wobQ1hLQjS9tCzXbwFftOS0SRvVpA132wA,108476
14
+ kodexa/platform/client.py,sha256=EK_ZnOJK6AGYbxYfKZfXiNbaV-Vo54oZ8QrIeqYsd7s,109544
15
15
  kodexa/platform/kodexa.py,sha256=HcwQh1NKkwSzkngKLp_kEsLW0N_JlzORszoknSDFLT0,27604
16
16
  kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
17
17
  kodexa/selectors/ast.py,sha256=mTAcX_pjDiDy99ELxbMMwAAkzezOqz5uCyui9qz7Q4A,13499
@@ -34,7 +34,7 @@ kodexa/testing/test_components.py,sha256=i_9M6-bfUBdR1uYAzZZzWiW0M1DGKzE5mkNuHq4
34
34
  kodexa/testing/test_utils.py,sha256=HXM3S5FDzarzS6R7jkOHps6d6Ox2UtNqymoK6VCw8Zg,13596
35
35
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
36
36
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- kodexa-6.1.1a1.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
38
- kodexa-6.1.1a1.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
39
- kodexa-6.1.1a1.dist-info/METADATA,sha256=1MNzTz_oXDy5U8R47kzU-m8SIMvep7c9_AzskCyKWCs,3602
40
- kodexa-6.1.1a1.dist-info/RECORD,,
37
+ kodexa-6.1.1a2.post4573624930.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
38
+ kodexa-6.1.1a2.post4573624930.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
39
+ kodexa-6.1.1a2.post4573624930.dist-info/METADATA,sha256=t80OPrqdvCsV5f33oa_dS2AHIY_MlEP5BH6tzt-miNs,3617
40
+ kodexa-6.1.1a2.post4573624930.dist-info/RECORD,,