rapidata 1.4.1__py3-none-any.whl → 1.4.2__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.

Potentially problematic release.


This version of rapidata might be problematic. Click here for more details.

@@ -18,6 +18,7 @@ from rapidata.api_client.models.query_orders_model import QueryOrdersModel
18
18
  from rapidata.api_client.models.page_info import PageInfo
19
19
  from rapidata.api_client.models.root_filter import RootFilter
20
20
  from rapidata.api_client.models.filter import Filter
21
+ from rapidata.api_client.models.sort_criterion import SortCriterion
21
22
 
22
23
 
23
24
  class RapidataClient:
@@ -106,12 +107,13 @@ class RapidataClient:
106
107
  name=order.order_name,
107
108
  openapi_service=self.openapi_service)
108
109
 
109
- def find_orders(self, name: str = "", amount: int = 1) -> list[RapidataOrder]:
110
- """Find orders by name. If name is not provided, it will return the most recent order.
110
+ def find_orders(self, name: str = "", amount: int = 1, latest=True) -> list[RapidataOrder]:
111
+ """Find your orders given criteria. If nothing is provided, it will return the most recent order.
111
112
 
112
113
  Args:
113
114
  name (str, optional): The name of the order - matching order will contain the name. Defaults to "" for any order.
114
115
  amount (int, optional): The amount of orders to return. Defaults to 1.
116
+ latest (bool, optional): If True, the most recent orders will be returned. If False, the oldest orders will be returned. Defaults to True.
115
117
 
116
118
  Returns:
117
119
  list[RapidataOrder]: A list of RapidataOrder instances.
@@ -119,7 +121,9 @@ class RapidataClient:
119
121
  try:
120
122
  order_page_result = self.openapi_service.order_api.order_query_get(QueryOrdersModel(
121
123
  page=PageInfo(index=1, size=amount),
122
- filter=RootFilter(filters=[Filter(field="OrderName", operator="Contains", value=name)])))
124
+ filter=RootFilter(filters=[Filter(field="OrderName", operator="Contains", value=name)]),
125
+ sortCriteria=[SortCriterion(direction="Desc" if latest else "Asc", propertyName="OrderDate")]
126
+ ))
123
127
 
124
128
  except BadRequestException as e:
125
129
  raise ValueError(f"Error occured during request. \nError: {e.body} \nTraceid: {e.headers.get('X-Trace-Id') if isinstance(e.headers, HTTPHeaderDict) else 'Unknown'}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rapidata
3
- Version: 1.4.1
3
+ Version: 1.4.2
4
4
  Summary: Rapidata package containing the Rapidata Python Client to interact with the Rapidata Web API in an easy way.
5
5
  License: Apache-2.0
6
6
  Author: Rapidata AG
@@ -343,7 +343,7 @@ rapidata/rapidata_client/metadata/transcription_metadata.py,sha256=THtDEVCON4Ulc
343
343
  rapidata/rapidata_client/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
344
344
  rapidata/rapidata_client/order/rapidata_order.py,sha256=u0VhNgnbT0dn3AJiITqjtqn_OWgdwUcXrgU4iblPXZI,4663
345
345
  rapidata/rapidata_client/order/rapidata_order_builder.py,sha256=QvICzduLAuAkf8qFKxHV3zAag838WnV9lEzWdD4dxI0,15926
346
- rapidata/rapidata_client/rapidata_client.py,sha256=FnuicEG5iCsrOiY5YpPtDKI4P0RBuktCaHtnIB03UYc,6763
346
+ rapidata/rapidata_client/rapidata_client.py,sha256=bW1kwb3EYI5dYftrFoWnQ8bVncSFEzLJezUuRvvmHsU,7134
347
347
  rapidata/rapidata_client/referee/__init__.py,sha256=Ow9MQsONhF4sX2wFK9jbvSBrpcJgtq3OglIQMkBUdIY,167
348
348
  rapidata/rapidata_client/referee/base_referee.py,sha256=bMy7cw0a-pGNbFu6u_1_Jplu0A483Ubj4oDQzh8vu8k,493
349
349
  rapidata/rapidata_client/referee/classify_early_stopping_referee.py,sha256=B5wsqKM3_Oc1TU_MFGiIyiXjwK1LcmaVjhzLdaL8Cgw,1797
@@ -372,7 +372,7 @@ rapidata/service/local_file_service.py,sha256=pgorvlWcx52Uh3cEG6VrdMK_t__7dacQ_5
372
372
  rapidata/service/openapi_service.py,sha256=pGcOCttKZW0PVCSM7Kfehe5loh7CxmmDDbu4UJbamnI,2770
373
373
  rapidata/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
374
374
  rapidata/utils/image_utils.py,sha256=TldO3eJWG8IhfJjm5MfNGO0mEDm1mQTsRoA0HLU1Uxs,404
375
- rapidata-1.4.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
376
- rapidata-1.4.1.dist-info/METADATA,sha256=Ppz47q5U5zWw1YjD6jcZ5DzyUg1uuAhe0-K_9ScQnf0,1012
377
- rapidata-1.4.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
378
- rapidata-1.4.1.dist-info/RECORD,,
375
+ rapidata-1.4.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
376
+ rapidata-1.4.2.dist-info/METADATA,sha256=VwoDi4szkVcBk-fmrFJD9tKTD6wMzfyDGxpQQtlsACM,1012
377
+ rapidata-1.4.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
378
+ rapidata-1.4.2.dist-info/RECORD,,