wizata-dsapi 2.1.0.dev20__tar.gz → 2.1.0.dev21__tar.gz
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.
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/PKG-INFO +1 -1
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/api_config.py +10 -0
- wizata_dsapi-2.1.0.dev21/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/wizata_dsapi_client.py +55 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-2.1.0.dev20/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/LICENSE.txt +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/README.rst +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/setup.cfg +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/setup.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/dashboard.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/deployment.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/edge_config.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/edge_device.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/edge_module.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/execution_log.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/graylog_log.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/mobile_asset.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/notification.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/plots/theme.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/search.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/template_config.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/twin.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/user.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -32,6 +32,16 @@ from .edge_device import EdgeDevice
|
|
|
32
32
|
# by the platform internally (the 12.1 adopt-triggers migration reads them through
|
|
33
33
|
# `ApiDataManager.backend_api`, which never consults this registry). What goes is
|
|
34
34
|
# the ability to schedule through the public client.
|
|
35
|
+
|
|
36
|
+
#: Entities the API paginates instead of listing.
|
|
37
|
+
#
|
|
38
|
+
# ``lists()`` fetches ``GET /<route>/``, and for these there is no such route — only
|
|
39
|
+
# ``POST /<route>/search``. Declaring 'lists' without this set was worse than not
|
|
40
|
+
# declaring it: the client advertised the operation and answered 404, and the
|
|
41
|
+
# documentation shipped a sample nobody could run. Listing now gathers the pages
|
|
42
|
+
# from the search endpoint, so the caller gets what the operation promised.
|
|
43
|
+
_LISTS_VIA_SEARCH = {Deployment}
|
|
44
|
+
|
|
35
45
|
_retired = {
|
|
36
46
|
"triggers": (
|
|
37
47
|
Trigger,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.0.dev21"
|
|
@@ -361,6 +361,10 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
|
|
|
361
361
|
:return: list of all elements with at least the id property.
|
|
362
362
|
"""
|
|
363
363
|
dto_class = self._get_class(entity=entity, operation="lists")
|
|
364
|
+
from .api_config import _LISTS_VIA_SEARCH
|
|
365
|
+
if dto_class in _LISTS_VIA_SEARCH:
|
|
366
|
+
# No GET /<route>/ exists for these; the API paginates them instead.
|
|
367
|
+
return self._list_via_search(dto_class)
|
|
364
368
|
return self._process_request(
|
|
365
369
|
method="GET",
|
|
366
370
|
route=dto_class.route() + "/",
|
|
@@ -368,6 +372,32 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
|
|
|
368
372
|
result_type="list"
|
|
369
373
|
)
|
|
370
374
|
|
|
375
|
+
def _list_via_search(self, dto_class) -> list:
|
|
376
|
+
"""
|
|
377
|
+
Every record of an entity the API only paginates.
|
|
378
|
+
|
|
379
|
+
Walks the pages rather than trusting one to hold everything: a caller asking
|
|
380
|
+
to list is asking for all of them, and silently returning the first fifty is
|
|
381
|
+
the kind of wrong that looks right until an estate grows.
|
|
382
|
+
"""
|
|
383
|
+
results, page = [], 1
|
|
384
|
+
while True:
|
|
385
|
+
search_query = SearchQuery()
|
|
386
|
+
search_query.page = page
|
|
387
|
+
search_query.size = 100
|
|
388
|
+
response = requests.post(
|
|
389
|
+
self.__url() + dto_class.route() + "/search",
|
|
390
|
+
headers=self.__header(),
|
|
391
|
+
data=json.dumps(search_query.to_dict())
|
|
392
|
+
)
|
|
393
|
+
if response.status_code != 200:
|
|
394
|
+
raise self.__raise_error(response)
|
|
395
|
+
paged = PagedQueryResult.from_dict(response.json(), dto_class=dto_class)
|
|
396
|
+
results.extend(paged.results or [])
|
|
397
|
+
if not paged.results or len(results) >= (paged.total or 0):
|
|
398
|
+
return results
|
|
399
|
+
page += 1
|
|
400
|
+
|
|
371
401
|
def get(self,
|
|
372
402
|
obj=None,
|
|
373
403
|
id: uuid.UUID = None,
|
|
@@ -2337,6 +2367,31 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
|
|
|
2337
2367
|
"""
|
|
2338
2368
|
return self._deployment_action(deployment, "retry")
|
|
2339
2369
|
|
|
2370
|
+
def search_deployments(self, search_query=None) -> PagedQueryResult:
|
|
2371
|
+
"""
|
|
2372
|
+
Search deployments using a paged query.
|
|
2373
|
+
|
|
2374
|
+
The only way to ask what is deployed: there is no GET /deployments/, because
|
|
2375
|
+
a deployment is not created by posting one — it is the result of deploying a
|
|
2376
|
+
pipeline — and the estate is paginated rather than listed.
|
|
2377
|
+
|
|
2378
|
+
:param search_query: SearchQuery instance or dict with filters, sort, page, size.
|
|
2379
|
+
:return: PagedQueryResult with Deployment results.
|
|
2380
|
+
"""
|
|
2381
|
+
if search_query is None:
|
|
2382
|
+
search_query = SearchQuery()
|
|
2383
|
+
elif isinstance(search_query, dict):
|
|
2384
|
+
search_query = SearchQuery.from_dict(search_query)
|
|
2385
|
+
response = requests.post(
|
|
2386
|
+
self.__url() + "deployments/search",
|
|
2387
|
+
headers=self.__header(),
|
|
2388
|
+
data=json.dumps(search_query.to_dict())
|
|
2389
|
+
)
|
|
2390
|
+
if response.status_code == 200:
|
|
2391
|
+
return PagedQueryResult.from_dict(response.json(), dto_class=Deployment)
|
|
2392
|
+
else:
|
|
2393
|
+
raise self.__raise_error(response)
|
|
2394
|
+
|
|
2340
2395
|
def await_deployment(self,
|
|
2341
2396
|
deployment,
|
|
2342
2397
|
timeout: int = 900,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.0.dev20"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wizata_dsapi-2.1.0.dev20 → wizata_dsapi-2.1.0.dev21}/wizata_dsapi.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|