kodexa 7.4.413792657062__py3-none-any.whl → 7.4.413902283427__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
@@ -23,6 +23,7 @@ from pydantic import BaseModel, Field, ConfigDict
23
23
  from pydantic_yaml import to_yaml_str
24
24
 
25
25
  from kodexa.model import Document
26
+ from kodexa.model.model import Ref
26
27
  from kodexa.model.objects import (
27
28
  PageUser,
28
29
  PageMembership,
@@ -4669,6 +4670,23 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
4669
4670
  process_response(response)
4670
4671
  self.change_sequence = response.json()["changeSequence"]
4671
4672
 
4673
+ def rename(self, new_name: str):
4674
+ """
4675
+ Rename the document family.
4676
+
4677
+ Args:
4678
+ name (str): The new name of the document family.
4679
+
4680
+ Returns:
4681
+ None
4682
+ """
4683
+ ref_helper = Ref(self.store_ref)
4684
+ url = f"/api/stores/{ref_helper.org_slug}/{ref_helper.slug}/fs"
4685
+ params = {"rename": new_name, "path": self.path}
4686
+ response = self.client.put(url, params=params)
4687
+ process_response(response)
4688
+ self.change_sequence = response.json()["changeSequence"]
4689
+
4672
4690
  def lock(self):
4673
4691
  """
4674
4692
  Lock the document family.
@@ -5775,7 +5793,7 @@ class DocumentStoreEndpoint(StoreEndpoint):
5775
5793
  document_family_response.json()
5776
5794
  ).set_client(self.client)
5777
5795
 
5778
- def stream_query(self, query: str = "*", sort=None, limit=None):
5796
+ def stream_query(self, query: str = "*", sort=None, limit=None, page_size=5):
5779
5797
  """
5780
5798
  Stream the query for the document family.
5781
5799
 
@@ -5783,11 +5801,11 @@ class DocumentStoreEndpoint(StoreEndpoint):
5783
5801
  query (str, optional): The query to run. Defaults to "*".
5784
5802
  sort (str, optional): Sorting order of the query. Defaults to None.
5785
5803
  limit (int, optional): The maximum number of items to return. Defaults to None.
5804
+ page_size (int, optional): Pagination size for the streaming
5786
5805
 
5787
5806
  Returns:
5788
5807
  generator: A generator of the document families.
5789
5808
  """
5790
- page_size = 5
5791
5809
  page = 1
5792
5810
  number_of_items = 0
5793
5811
 
@@ -5841,7 +5859,7 @@ class DocumentStoreEndpoint(StoreEndpoint):
5841
5859
  get_response.json()
5842
5860
  ).set_client(self.client)
5843
5861
 
5844
- def stream_filter(self, filter_string: str = "", sort=None, limit=None):
5862
+ def stream_filter(self, filter_string: str = "", sort=None, limit=None, page_size=5):
5845
5863
  """
5846
5864
  Stream the filter for the document family.
5847
5865
 
@@ -5849,11 +5867,11 @@ class DocumentStoreEndpoint(StoreEndpoint):
5849
5867
  filter_string (str, optional): The filter string to use. Defaults to "".
5850
5868
  sort (str, optional): Sorting order of the query. Defaults to None.
5851
5869
  limit (int, optional): The maximum number of items to return. Defaults to None.
5870
+ page_size (int, optional): The pagination size for the streaming
5852
5871
 
5853
5872
  Returns:
5854
5873
  generator: A generator of the document families.
5855
5874
  """
5856
- page_size = 5
5857
5875
  page = 1
5858
5876
  count = 0
5859
5877
  if not sort:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.4.413792657062
3
+ Version: 7.4.413902283427
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -19,7 +19,7 @@ kodexa/model/utils.py,sha256=YEG3f8YzBil06D0P3_dfx2S9GnHREzyrjnlWwQ7oPlU,3038
19
19
  kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
20
20
  kodexa/pipeline/pipeline.py,sha256=zyNEpA7KlGhPs_l-vgV6m-OCb16dbxQhl8QezeylugA,25540
21
21
  kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
22
- kodexa/platform/client.py,sha256=TzcpWtkkD_h7Jf4O4eRFgSZL7GC5NaA8TgCiubhlfaI,234255
22
+ kodexa/platform/client.py,sha256=pxupPbBfknLHx8s0DrjIvrPc1dhruNWCR1syZDsnHlU,234976
23
23
  kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
24
24
  kodexa/platform/kodexa.py,sha256=MUkJx0g-92R0JxoOTUubFqDP4YriXreCSLy6s46XPmo,35102
25
25
  kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
@@ -44,7 +44,7 @@ kodexa/testing/test_utils.py,sha256=v44p__gE7ia67W7WeHN2HBFCWSCUrCZt7G4xBNCmwf8,
44
44
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
45
45
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
46
  kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
47
- kodexa-7.4.413792657062.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
48
- kodexa-7.4.413792657062.dist-info/METADATA,sha256=JjrJDLtcTt_QrGBo_n2VeNSOJw1F4uL-B5Jzkom4ggI,2813
49
- kodexa-7.4.413792657062.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
50
- kodexa-7.4.413792657062.dist-info/RECORD,,
47
+ kodexa-7.4.413902283427.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
48
+ kodexa-7.4.413902283427.dist-info/METADATA,sha256=J6xLxe-IRbkSTIlcdn_hsLDXLN8Wy0eRNmmS8cypTKw,2813
49
+ kodexa-7.4.413902283427.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
50
+ kodexa-7.4.413902283427.dist-info/RECORD,,