pyegeria 5.3.9.4__py3-none-any.whl → 5.3.9.5__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.
- pyegeria/data_designer_omvs.py +161 -66
- pyegeria/mermaid_utilities.py +1 -1
- {pyegeria-5.3.9.4.dist-info → pyegeria-5.3.9.5.dist-info}/METADATA +1 -1
- {pyegeria-5.3.9.4.dist-info → pyegeria-5.3.9.5.dist-info}/RECORD +7 -7
- {pyegeria-5.3.9.4.dist-info → pyegeria-5.3.9.5.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.9.4.dist-info → pyegeria-5.3.9.5.dist-info}/WHEEL +0 -0
- {pyegeria-5.3.9.4.dist-info → pyegeria-5.3.9.5.dist-info}/entry_points.txt +0 -0
pyegeria/data_designer_omvs.py
CHANGED
@@ -596,7 +596,7 @@ r replace_all_properties: bool, default = False
|
|
596
596
|
async def _async_link_member_data_field(self, parent_data_struct_guid: str, member_data_field_guid: str,
|
597
597
|
body: dict = None) -> None:
|
598
598
|
"""
|
599
|
-
Connect a data structure to a data class.
|
599
|
+
Connect a data structure to a data class. Async version.
|
600
600
|
|
601
601
|
Parameters
|
602
602
|
----------
|
@@ -655,7 +655,7 @@ r replace_all_properties: bool, default = False
|
|
655
655
|
def link_member_data_field(self, parent_data_struct_guid: str, member_data_field_guid: str,
|
656
656
|
body: dict = None) -> None:
|
657
657
|
"""
|
658
|
-
Connect a data structure to a data class.
|
658
|
+
Connect a data structure to a data class.
|
659
659
|
|
660
660
|
Parameters
|
661
661
|
----------
|
@@ -1157,7 +1157,7 @@ r replace_all_properties: bool, default = False
|
|
1157
1157
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
1158
1158
|
|
1159
1159
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
1160
|
-
if type(elements) is
|
1160
|
+
if type(elements) is str:
|
1161
1161
|
return NO_ELEMENTS_FOUND
|
1162
1162
|
|
1163
1163
|
if output_format != 'JSON': # return a simplified markdown representation
|
@@ -1364,7 +1364,8 @@ r replace_all_properties: bool, default = False
|
|
1364
1364
|
return self.generate_data_structure_output(element, filter, output_format)
|
1365
1365
|
return element
|
1366
1366
|
|
1367
|
-
def get_data_structures_by_guid(self, guid: str, body: str = None,
|
1367
|
+
def get_data_structures_by_guid(self, guid: str, body: str = None,
|
1368
|
+
output_format: str = "DICT") -> list | str:
|
1368
1369
|
""" Get the data structure metadata element with the specified unique identifier..
|
1369
1370
|
|
1370
1371
|
Parameters
|
@@ -2227,7 +2228,7 @@ r replace_all_properties: bool, default = False
|
|
2227
2228
|
loop = asyncio.get_event_loop()
|
2228
2229
|
loop.run_until_complete(self._async_delete_data_field(data_field_guid, body))
|
2229
2230
|
|
2230
|
-
async def _async_find_all_data_fields(self, start_from: int = 0, page_size: int = max_paging_size, ) -> list | str:
|
2231
|
+
async def _async_find_all_data_fields(self, start_from: int = 0, page_size: int = max_paging_size, output_format: str = "DICT") -> list | str:
|
2231
2232
|
"""Returns a list of all known data fields. Async version.
|
2232
2233
|
|
2233
2234
|
Parameters
|
@@ -2236,6 +2237,9 @@ r replace_all_properties: bool, default = False
|
|
2236
2237
|
- index of the list to start from (0 for start).
|
2237
2238
|
page_size
|
2238
2239
|
- maximum number of elements to return.
|
2240
|
+
output_format: str, default = "DICT"
|
2241
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2242
|
+
|
2239
2243
|
|
2240
2244
|
Returns
|
2241
2245
|
-------
|
@@ -2263,12 +2267,14 @@ r replace_all_properties: bool, default = False
|
|
2263
2267
|
response: Response = await self._async_make_request("POST", url)
|
2264
2268
|
|
2265
2269
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
2266
|
-
if type(elements) is
|
2267
|
-
|
2268
|
-
|
2270
|
+
if type(elements) is str:
|
2271
|
+
return NO_ELEMENTS_FOUND
|
2272
|
+
if output_format != 'JSON': # return other representations
|
2273
|
+
return self.generate_data_field_output(elements, filter, output_format)
|
2269
2274
|
return elements
|
2270
2275
|
|
2271
|
-
|
2276
|
+
|
2277
|
+
def find_all_data_fields(self, start_from: int = 0, page_size: int = max_paging_size, output_format: str = "DICT") -> list | str:
|
2272
2278
|
""" Returns a list of all known data fields.
|
2273
2279
|
|
2274
2280
|
Parameters
|
@@ -2277,6 +2283,8 @@ r replace_all_properties: bool, default = False
|
|
2277
2283
|
- index of the list to start from (0 for start).
|
2278
2284
|
page_size
|
2279
2285
|
- maximum number of elements to return.
|
2286
|
+
output_format: str, default = "DICT"
|
2287
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2280
2288
|
|
2281
2289
|
Returns
|
2282
2290
|
-------
|
@@ -2295,12 +2303,12 @@ r replace_all_properties: bool, default = False
|
|
2295
2303
|
"""
|
2296
2304
|
|
2297
2305
|
loop = asyncio.get_event_loop()
|
2298
|
-
response = loop.run_until_complete(self._async_find_all_data_fields(start_from, page_size))
|
2306
|
+
response = loop.run_until_complete(self._async_find_all_data_fields(start_from, page_size, output_format))
|
2299
2307
|
return response
|
2300
2308
|
|
2301
2309
|
async def _async_find_data_fields_w_body(self, body: dict, start_from: int = 0, page_size: int = max_paging_size,
|
2302
2310
|
starts_with: bool = True, ends_with: bool = False,
|
2303
|
-
ignore_case: bool = True) -> list | str:
|
2311
|
+
ignore_case: bool = True, output_format: str = "DICT") -> list | str:
|
2304
2312
|
""" Retrieve the list of data class metadata elements that contain the search string.
|
2305
2313
|
Async version.
|
2306
2314
|
|
@@ -2318,6 +2326,9 @@ r replace_all_properties: bool, default = False
|
|
2318
2326
|
- if True, the search string filters from the end of the string.
|
2319
2327
|
ignore_case: bool, default = True
|
2320
2328
|
- If True, the case of the search string is ignored.
|
2329
|
+
output_format: str, default = "DICT"
|
2330
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2331
|
+
|
2321
2332
|
|
2322
2333
|
Returns
|
2323
2334
|
-------
|
@@ -2361,14 +2372,15 @@ r replace_all_properties: bool, default = False
|
|
2361
2372
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
2362
2373
|
|
2363
2374
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
2364
|
-
if type(elements) is
|
2365
|
-
|
2366
|
-
|
2375
|
+
if type(elements) is str:
|
2376
|
+
return NO_ELEMENTS_FOUND
|
2377
|
+
if output_format != 'JSON': # return other representations
|
2378
|
+
return self.generate_data_field_output(elements, filter, output_format)
|
2367
2379
|
return elements
|
2368
2380
|
|
2369
2381
|
def find_data_fields_w_body(self, body: dict, start_from: int = 0, page_size: int = max_paging_size,
|
2370
2382
|
starts_with: bool = True, ends_with: bool = False,
|
2371
|
-
ignore_case: bool = True) -> list | str:
|
2383
|
+
ignore_case: bool = True, output_format: str = "DICT") -> list | str:
|
2372
2384
|
""" Retrieve the list of data class metadata elements that contain the search string.
|
2373
2385
|
|
2374
2386
|
Parameters
|
@@ -2385,6 +2397,9 @@ r replace_all_properties: bool, default = False
|
|
2385
2397
|
- if True, the search string filters from the end of the string.
|
2386
2398
|
ignore_case: bool, default = True
|
2387
2399
|
- If True, the case of the search string is ignored.
|
2400
|
+
output_format: str, default = "DICT"
|
2401
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2402
|
+
|
2388
2403
|
|
2389
2404
|
Returns
|
2390
2405
|
-------
|
@@ -2418,12 +2433,14 @@ r replace_all_properties: bool, default = False
|
|
2418
2433
|
|
2419
2434
|
loop = asyncio.get_event_loop()
|
2420
2435
|
response = loop.run_until_complete(
|
2421
|
-
self._async_find_data_fields_w_body(body, start_from, page_size, starts_with,
|
2436
|
+
self._async_find_data_fields_w_body(body, start_from, page_size, starts_with,
|
2437
|
+
ends_with, ignore_case, output_format))
|
2422
2438
|
return response
|
2423
2439
|
|
2424
2440
|
async def _async_find_data_fields(self, filter: str, start_from: int = 0, page_size: int = max_paging_size,
|
2425
2441
|
starts_with: bool = True, ends_with: bool = False,
|
2426
|
-
ignore_case: bool = True
|
2442
|
+
ignore_case: bool = True,
|
2443
|
+
output_format: str = "DICT") -> list | str:
|
2427
2444
|
""" Find the list of data class elements that contain the search string.
|
2428
2445
|
Async version.
|
2429
2446
|
|
@@ -2441,6 +2458,9 @@ r replace_all_properties: bool, default = False
|
|
2441
2458
|
- if True, the search string filters from the end of the string.
|
2442
2459
|
ignore_case: bool, default = True
|
2443
2460
|
- If True, the case of the search string is ignored.
|
2461
|
+
output_format: str, default = "DICT"
|
2462
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2463
|
+
|
2444
2464
|
|
2445
2465
|
Returns
|
2446
2466
|
-------
|
@@ -2470,13 +2490,15 @@ r replace_all_properties: bool, default = False
|
|
2470
2490
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
2471
2491
|
|
2472
2492
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
2473
|
-
if type(elements) is
|
2474
|
-
|
2475
|
-
|
2493
|
+
if type(elements) is str:
|
2494
|
+
return NO_ELEMENTS_FOUND
|
2495
|
+
if output_format != 'JSON': # return other representations
|
2496
|
+
return self.generate_data_field_output(elements, filter, output_format)
|
2476
2497
|
return elements
|
2477
2498
|
|
2478
2499
|
def find_data_fields(self, filter: str, start_from: int = 0, page_size: int = max_paging_size,
|
2479
|
-
starts_with: bool = True, ends_with: bool = False,
|
2500
|
+
starts_with: bool = True, ends_with: bool = False,
|
2501
|
+
ignore_case: bool = True, output_format: str = "DICT") -> list | str:
|
2480
2502
|
""" Retrieve the list of data fields elements that contain the search string filter.
|
2481
2503
|
|
2482
2504
|
Parameters
|
@@ -2493,6 +2515,9 @@ r replace_all_properties: bool, default = False
|
|
2493
2515
|
- if True, the search string filters from the end of the string.
|
2494
2516
|
ignore_case: bool, default = True
|
2495
2517
|
- If True, the case of the search string is ignored.
|
2518
|
+
output_format: str, default = "DICT"
|
2519
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2520
|
+
|
2496
2521
|
|
2497
2522
|
Returns
|
2498
2523
|
-------
|
@@ -2513,11 +2538,13 @@ r replace_all_properties: bool, default = False
|
|
2513
2538
|
|
2514
2539
|
loop = asyncio.get_event_loop()
|
2515
2540
|
response = loop.run_until_complete(
|
2516
|
-
self._async_find_data_fields(filter, start_from, page_size, starts_with,
|
2541
|
+
self._async_find_data_fields(filter, start_from, page_size, starts_with,
|
2542
|
+
ends_with, ignore_case, output_format))
|
2517
2543
|
return response
|
2518
2544
|
|
2519
2545
|
async def _async_get_data_fields_by_name(self, filter: str, body: dict = None, start_from: int = 0,
|
2520
|
-
page_size: int = max_paging_size
|
2546
|
+
page_size: int = max_paging_size,
|
2547
|
+
output_format: str = "DICT") -> list | str:
|
2521
2548
|
""" Get the list of data class metadata elements with a matching name to the search string filter.
|
2522
2549
|
Async version.
|
2523
2550
|
|
@@ -2531,6 +2558,9 @@ r replace_all_properties: bool, default = False
|
|
2531
2558
|
- index of the list to start from (0 for start).
|
2532
2559
|
page_size
|
2533
2560
|
- maximum number of elements to return.
|
2561
|
+
output_format: str, default = "DICT"
|
2562
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2563
|
+
|
2534
2564
|
|
2535
2565
|
Returns
|
2536
2566
|
-------
|
@@ -2571,13 +2601,14 @@ r replace_all_properties: bool, default = False
|
|
2571
2601
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
2572
2602
|
|
2573
2603
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
2574
|
-
if type(elements) is
|
2575
|
-
|
2576
|
-
|
2604
|
+
if type(elements) is str:
|
2605
|
+
return NO_ELEMENTS_FOUND
|
2606
|
+
if output_format != 'JSON': # return other representations
|
2607
|
+
return self.generate_data_field_output(elements, filter, output_format)
|
2577
2608
|
return elements
|
2578
2609
|
|
2579
2610
|
def get_data_fields_by_name(self, filter: str, body: dict = None, start_from: int = 0,
|
2580
|
-
page_size: int = max_paging_size) -> list | str:
|
2611
|
+
page_size: int = max_paging_size, output_format: str = "DICT") -> list | str:
|
2581
2612
|
""" Get the list of data class elements with a matching name to the search string filter.
|
2582
2613
|
|
2583
2614
|
Parameters
|
@@ -2590,6 +2621,9 @@ r replace_all_properties: bool, default = False
|
|
2590
2621
|
- index of the list to start from (0 for start).
|
2591
2622
|
page_size
|
2592
2623
|
- maximum number of elements to return.
|
2624
|
+
output_format: str, default = "DICT"
|
2625
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2626
|
+
|
2593
2627
|
|
2594
2628
|
Returns
|
2595
2629
|
-------
|
@@ -2623,10 +2657,11 @@ r replace_all_properties: bool, default = False
|
|
2623
2657
|
"""
|
2624
2658
|
|
2625
2659
|
loop = asyncio.get_event_loop()
|
2626
|
-
response = loop.run_until_complete(self._async_get_data_fields_by_name(filter, body, start_from,
|
2660
|
+
response = loop.run_until_complete(self._async_get_data_fields_by_name(filter, body, start_from,
|
2661
|
+
page_size, output_format))
|
2627
2662
|
return response
|
2628
2663
|
|
2629
|
-
async def _async_get_data_field_by_guid(self, guid: str, body: dict = None) -> list | str:
|
2664
|
+
async def _async_get_data_field_by_guid(self, guid: str, body: dict = None, output_format: str = "DICT") -> list | str:
|
2630
2665
|
""" Get the data class elements for the specified GUID.
|
2631
2666
|
Async version.
|
2632
2667
|
|
@@ -2636,6 +2671,9 @@ r replace_all_properties: bool, default = False
|
|
2636
2671
|
- unique identifier of the data class metadata element.
|
2637
2672
|
body: dict, optional
|
2638
2673
|
- optional request body.
|
2674
|
+
output_format: str, default = "DICT"
|
2675
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2676
|
+
|
2639
2677
|
Returns
|
2640
2678
|
-------
|
2641
2679
|
[dict] | str
|
@@ -2650,6 +2688,7 @@ r replace_all_properties: bool, default = False
|
|
2650
2688
|
UserNotAuthorizedException
|
2651
2689
|
the requesting user is not authorized to issue this request.
|
2652
2690
|
|
2691
|
+
|
2653
2692
|
Notes
|
2654
2693
|
----
|
2655
2694
|
|
@@ -2670,13 +2709,14 @@ r replace_all_properties: bool, default = False
|
|
2670
2709
|
else:
|
2671
2710
|
response: Response = await self._async_make_request("POST", url)
|
2672
2711
|
|
2673
|
-
elements = response.json().get("
|
2674
|
-
if type(elements) is
|
2675
|
-
|
2676
|
-
|
2712
|
+
elements = response.json().get("element", NO_ELEMENTS_FOUND)
|
2713
|
+
if type(elements) is str:
|
2714
|
+
return NO_ELEMENTS_FOUND
|
2715
|
+
if output_format != 'JSON': # return other representations
|
2716
|
+
return self.generate_data_field_output(elements, filter, output_format)
|
2677
2717
|
return elements
|
2678
2718
|
|
2679
|
-
def get_data_field_by_guid(self, guid: str, body: str = None) -> list | str:
|
2719
|
+
def get_data_field_by_guid(self, guid: str, body: str = None, output_format: str = "DICT") -> list | str:
|
2680
2720
|
""" Get the data structure metadata element with the specified unique identifier..
|
2681
2721
|
|
2682
2722
|
Parameters
|
@@ -2685,6 +2725,9 @@ r replace_all_properties: bool, default = False
|
|
2685
2725
|
- unique identifier of the data structure metadata element.
|
2686
2726
|
body: dict, optional
|
2687
2727
|
- optional request body.
|
2728
|
+
output_format: str, default = "DICT"
|
2729
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2730
|
+
|
2688
2731
|
Returns
|
2689
2732
|
-------
|
2690
2733
|
[dict] | str
|
@@ -2714,7 +2757,7 @@ r replace_all_properties: bool, default = False
|
|
2714
2757
|
"""
|
2715
2758
|
|
2716
2759
|
loop = asyncio.get_event_loop()
|
2717
|
-
response = loop.run_until_complete(self._async_get_data_field_by_guid(guid, body))
|
2760
|
+
response = loop.run_until_complete(self._async_get_data_field_by_guid(guid, body, output_format))
|
2718
2761
|
return response
|
2719
2762
|
|
2720
2763
|
###
|
@@ -3740,7 +3783,8 @@ r replace_all_properties: bool, default = False
|
|
3740
3783
|
loop = asyncio.get_event_loop()
|
3741
3784
|
loop.run_until_complete(self._async_delete_data_class(data_class_guid, body))
|
3742
3785
|
|
3743
|
-
async def _async_find_all_data_classes(self, start_from: int = 0,
|
3786
|
+
async def _async_find_all_data_classes(self, start_from: int = 0,
|
3787
|
+
page_size: int = max_paging_size, output_format: str = "DICT") -> list | str:
|
3744
3788
|
""" Returns a list of all data classes. Async version.
|
3745
3789
|
|
3746
3790
|
Parameters
|
@@ -3749,6 +3793,9 @@ r replace_all_properties: bool, default = False
|
|
3749
3793
|
- index of the list to start from (0 for start).
|
3750
3794
|
page_size
|
3751
3795
|
- maximum number of elements to return.
|
3796
|
+
output_format: str, default = "DICT"
|
3797
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
3798
|
+
|
3752
3799
|
|
3753
3800
|
Returns
|
3754
3801
|
-------
|
@@ -3776,12 +3823,14 @@ r replace_all_properties: bool, default = False
|
|
3776
3823
|
response: Response = await self._async_make_request("POST", url)
|
3777
3824
|
|
3778
3825
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
3779
|
-
if type(elements) is
|
3780
|
-
|
3781
|
-
|
3826
|
+
if type(elements) is str:
|
3827
|
+
return NO_ELEMENTS_FOUND
|
3828
|
+
if output_format != 'JSON': # return other representations
|
3829
|
+
return self.generate_data_class_output(elements, filter, output_format)
|
3782
3830
|
return elements
|
3783
3831
|
|
3784
|
-
def find_all_data_classes(self, start_from: int = 0, page_size: int = max_paging_size,
|
3832
|
+
def find_all_data_classes(self, start_from: int = 0, page_size: int = max_paging_size,
|
3833
|
+
output_format: str = "DICT") -> list | str:
|
3785
3834
|
""" Returns a list of all data classes.
|
3786
3835
|
|
3787
3836
|
Parameters
|
@@ -3790,6 +3839,9 @@ r replace_all_properties: bool, default = False
|
|
3790
3839
|
- index of the list to start from (0 for start).
|
3791
3840
|
page_size
|
3792
3841
|
- maximum number of elements to return.
|
3842
|
+
output_format: str, default = "DICT"
|
3843
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
3844
|
+
|
3793
3845
|
|
3794
3846
|
Returns
|
3795
3847
|
-------
|
@@ -3808,12 +3860,14 @@ r replace_all_properties: bool, default = False
|
|
3808
3860
|
"""
|
3809
3861
|
|
3810
3862
|
loop = asyncio.get_event_loop()
|
3811
|
-
response = loop.run_until_complete(self._async_find_all_data_classes(start_from, page_size
|
3863
|
+
response = loop.run_until_complete(self._async_find_all_data_classes(start_from, page_size,
|
3864
|
+
output_format))
|
3812
3865
|
return response
|
3813
3866
|
|
3814
3867
|
async def _async_find_data_classes_w_body(self, body: dict, start_from: int = 0, page_size: int = max_paging_size,
|
3815
3868
|
starts_with: bool = True, ends_with: bool = False,
|
3816
|
-
ignore_case: bool = True
|
3869
|
+
ignore_case: bool = True,
|
3870
|
+
output_format: str = "DICT") -> list | str:
|
3817
3871
|
""" Retrieve the list of data class metadata elements that contain the search string.
|
3818
3872
|
Async version.
|
3819
3873
|
|
@@ -3831,6 +3885,9 @@ r replace_all_properties: bool, default = False
|
|
3831
3885
|
- if True, the search string filters from the end of the string.
|
3832
3886
|
ignore_case: bool, default = True
|
3833
3887
|
- If True, the case of the search string is ignored.
|
3888
|
+
output_format: str, default = "DICT"
|
3889
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
3890
|
+
|
3834
3891
|
|
3835
3892
|
Returns
|
3836
3893
|
-------
|
@@ -3874,14 +3931,15 @@ r replace_all_properties: bool, default = False
|
|
3874
3931
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
3875
3932
|
|
3876
3933
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
3877
|
-
if type(elements) is
|
3878
|
-
|
3879
|
-
|
3934
|
+
if type(elements) is str:
|
3935
|
+
return NO_ELEMENTS_FOUND
|
3936
|
+
if output_format != 'JSON': # return other representations
|
3937
|
+
return self.generate_data_class_output(elements, filter, output_format)
|
3880
3938
|
return elements
|
3881
3939
|
|
3882
3940
|
def find_data_classes_w_body(self, body: dict, start_from: int = 0, page_size: int = max_paging_size,
|
3883
3941
|
starts_with: bool = True, ends_with: bool = False,
|
3884
|
-
ignore_case: bool = True) -> list | str:
|
3942
|
+
ignore_case: bool = True, output_format: str = "DICT") -> list | str:
|
3885
3943
|
""" Retrieve the list of data class metadata elements that contain the search string.
|
3886
3944
|
|
3887
3945
|
Parameters
|
@@ -3898,6 +3956,9 @@ r replace_all_properties: bool, default = False
|
|
3898
3956
|
- if True, the search string filters from the end of the string.
|
3899
3957
|
ignore_case: bool, default = True
|
3900
3958
|
- If True, the case of the search string is ignored.
|
3959
|
+
output_format: str, default = "DICT"
|
3960
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
3961
|
+
|
3901
3962
|
|
3902
3963
|
Returns
|
3903
3964
|
-------
|
@@ -3931,12 +3992,14 @@ r replace_all_properties: bool, default = False
|
|
3931
3992
|
|
3932
3993
|
loop = asyncio.get_event_loop()
|
3933
3994
|
response = loop.run_until_complete(
|
3934
|
-
self._async_find_data_classes_w_body(body, start_from, page_size, starts_with,
|
3995
|
+
self._async_find_data_classes_w_body(body, start_from, page_size, starts_with,
|
3996
|
+
ends_with, ignore_case, output_format))
|
3935
3997
|
return response
|
3936
3998
|
|
3937
3999
|
async def _async_find_data_classes(self, filter: str, start_from: int = 0, page_size: int = max_paging_size,
|
3938
4000
|
starts_with: bool = True, ends_with: bool = False,
|
3939
|
-
ignore_case: bool = True
|
4001
|
+
ignore_case: bool = True,
|
4002
|
+
output_format: str = "DICT") -> list | str:
|
3940
4003
|
""" Find the list of data class elements that contain the search string.
|
3941
4004
|
Async version.
|
3942
4005
|
|
@@ -3954,6 +4017,9 @@ r replace_all_properties: bool, default = False
|
|
3954
4017
|
- if True, the search string filters from the end of the string.
|
3955
4018
|
ignore_case: bool, default = True
|
3956
4019
|
- If True, the case of the search string is ignored.
|
4020
|
+
output_format: str, default = "DICT"
|
4021
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4022
|
+
|
3957
4023
|
|
3958
4024
|
Returns
|
3959
4025
|
-------
|
@@ -3983,13 +4049,15 @@ r replace_all_properties: bool, default = False
|
|
3983
4049
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
3984
4050
|
|
3985
4051
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
3986
|
-
if type(elements) is
|
3987
|
-
|
3988
|
-
|
4052
|
+
if type(elements) is str:
|
4053
|
+
return NO_ELEMENTS_FOUND
|
4054
|
+
if output_format != 'JSON': # return other representations
|
4055
|
+
return self.generate_data_class_output(elements, filter, output_format)
|
3989
4056
|
return elements
|
3990
4057
|
|
3991
4058
|
def find_data_classes(self, filter: str, start_from: int = 0, page_size: int = max_paging_size,
|
3992
|
-
starts_with: bool = True, ends_with: bool = False,
|
4059
|
+
starts_with: bool = True, ends_with: bool = False,
|
4060
|
+
ignore_case: bool = True, output_format: str = "DICT") -> list | str:
|
3993
4061
|
""" Retrieve the list of data fields elements that contain the search string filter.
|
3994
4062
|
|
3995
4063
|
Parameters
|
@@ -4006,6 +4074,9 @@ r replace_all_properties: bool, default = False
|
|
4006
4074
|
- if True, the search string filters from the end of the string.
|
4007
4075
|
ignore_case: bool, default = True
|
4008
4076
|
- If True, the case of the search string is ignored.
|
4077
|
+
output_format: str, default = "DICT"
|
4078
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4079
|
+
|
4009
4080
|
|
4010
4081
|
Returns
|
4011
4082
|
-------
|
@@ -4026,11 +4097,12 @@ r replace_all_properties: bool, default = False
|
|
4026
4097
|
|
4027
4098
|
loop = asyncio.get_event_loop()
|
4028
4099
|
response = loop.run_until_complete(
|
4029
|
-
self._async_find_data_classes(filter, start_from, page_size, starts_with,
|
4100
|
+
self._async_find_data_classes(filter, start_from, page_size, starts_with,
|
4101
|
+
ends_with, ignore_case, output_format))
|
4030
4102
|
return response
|
4031
4103
|
|
4032
4104
|
async def _async_get_data_classes_by_name(self, filter: str, body: dict = None, start_from: int = 0,
|
4033
|
-
page_size: int = max_paging_size) -> list | str:
|
4105
|
+
page_size: int = max_paging_size, output_format: str = "DICT") -> list | str:
|
4034
4106
|
""" Get the list of data class metadata elements with a matching name to the search string filter.
|
4035
4107
|
Async version.
|
4036
4108
|
|
@@ -4044,6 +4116,9 @@ r replace_all_properties: bool, default = False
|
|
4044
4116
|
- index of the list to start from (0 for start).
|
4045
4117
|
page_size
|
4046
4118
|
- maximum number of elements to return.
|
4119
|
+
output_format: str, default = "DICT"
|
4120
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4121
|
+
|
4047
4122
|
|
4048
4123
|
Returns
|
4049
4124
|
-------
|
@@ -4084,13 +4159,14 @@ r replace_all_properties: bool, default = False
|
|
4084
4159
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
4085
4160
|
|
4086
4161
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
4087
|
-
if type(elements) is
|
4088
|
-
|
4089
|
-
|
4162
|
+
if type(elements) is str:
|
4163
|
+
return NO_ELEMENTS_FOUND
|
4164
|
+
if output_format != 'JSON': # return other representations
|
4165
|
+
return self.generate_data_class_output(elements, filter, output_format)
|
4090
4166
|
return elements
|
4091
4167
|
|
4092
4168
|
def get_data_classes_by_name(self, filter: str, body: dict = None, start_from: int = 0,
|
4093
|
-
page_size: int = max_paging_size) -> list | str:
|
4169
|
+
page_size: int = max_paging_size, output_format: str = "DICT") -> list | str:
|
4094
4170
|
""" Get the list of data class elements with a matching name to the search string filter.
|
4095
4171
|
|
4096
4172
|
Parameters
|
@@ -4103,6 +4179,9 @@ r replace_all_properties: bool, default = False
|
|
4103
4179
|
- index of the list to start from (0 for start).
|
4104
4180
|
page_size
|
4105
4181
|
- maximum number of elements to return.
|
4182
|
+
output_format: str, default = "DICT"
|
4183
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4184
|
+
|
4106
4185
|
|
4107
4186
|
Returns
|
4108
4187
|
-------
|
@@ -4136,10 +4215,11 @@ r replace_all_properties: bool, default = False
|
|
4136
4215
|
"""
|
4137
4216
|
|
4138
4217
|
loop = asyncio.get_event_loop()
|
4139
|
-
response = loop.run_until_complete(self._async_get_data_classes_by_name(filter, body, start_from,
|
4218
|
+
response = loop.run_until_complete(self._async_get_data_classes_by_name(filter, body, start_from,
|
4219
|
+
page_size, output_format))
|
4140
4220
|
return response
|
4141
4221
|
|
4142
|
-
async def _async_get_data_class_by_guid(self, guid: str, body: dict = None) -> list | str:
|
4222
|
+
async def _async_get_data_class_by_guid(self, guid: str, body: dict = None ,output_format: str = "DICT") -> list | str:
|
4143
4223
|
""" Get the data class elements for the specified GUID.
|
4144
4224
|
Async version.
|
4145
4225
|
|
@@ -4149,6 +4229,9 @@ r replace_all_properties: bool, default = False
|
|
4149
4229
|
- unique identifier of the data class metadata element.
|
4150
4230
|
body: dict, optional
|
4151
4231
|
- optional request body.
|
4232
|
+
output_format: str, default = "DICT"
|
4233
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4234
|
+
|
4152
4235
|
Returns
|
4153
4236
|
-------
|
4154
4237
|
[dict] | str
|
@@ -4184,12 +4267,13 @@ r replace_all_properties: bool, default = False
|
|
4184
4267
|
response: Response = await self._async_make_request("POST", url)
|
4185
4268
|
|
4186
4269
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
4187
|
-
if type(elements) is
|
4188
|
-
|
4189
|
-
|
4270
|
+
if type(elements) is str:
|
4271
|
+
return NO_ELEMENTS_FOUND
|
4272
|
+
if output_format != 'JSON': # return other representations
|
4273
|
+
return self.generate_data_class_output(elements, filter, output_format)
|
4190
4274
|
return elements
|
4191
4275
|
|
4192
|
-
def get_data_class_by_guid(self, guid: str, body: str = None) -> list | str:
|
4276
|
+
def get_data_class_by_guid(self, guid: str, body: str = None, output_format: str = "DICT") -> list | str:
|
4193
4277
|
""" Get the data structure metadata element with the specified unique identifier..
|
4194
4278
|
|
4195
4279
|
Parameters
|
@@ -4198,6 +4282,9 @@ r replace_all_properties: bool, default = False
|
|
4198
4282
|
- unique identifier of the data structure metadata element.
|
4199
4283
|
body: dict, optional
|
4200
4284
|
- optional request body.
|
4285
|
+
output_format: str, default = "DICT"
|
4286
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4287
|
+
|
4201
4288
|
Returns
|
4202
4289
|
-------
|
4203
4290
|
[dict] | str
|
@@ -4227,7 +4314,7 @@ r replace_all_properties: bool, default = False
|
|
4227
4314
|
"""
|
4228
4315
|
|
4229
4316
|
loop = asyncio.get_event_loop()
|
4230
|
-
response = loop.run_until_complete(self._async_get_data_class_by_guid(guid, body))
|
4317
|
+
response = loop.run_until_complete(self._async_get_data_class_by_guid(guid, body, output_format))
|
4231
4318
|
return response
|
4232
4319
|
|
4233
4320
|
###
|
@@ -4835,7 +4922,7 @@ r replace_all_properties: bool, default = False
|
|
4835
4922
|
self._async_detach_certification_type_from_data_structure(certification_type_guid, data_structure_guid,
|
4836
4923
|
body))
|
4837
4924
|
|
4838
|
-
def
|
4925
|
+
def generate_basic_structured_output(self, elements, filter, output_format) -> str | list:
|
4839
4926
|
match output_format:
|
4840
4927
|
case "MERMAID":
|
4841
4928
|
return extract_mermaid_only(elements)
|
@@ -4844,6 +4931,14 @@ r replace_all_properties: bool, default = False
|
|
4844
4931
|
case _:
|
4845
4932
|
return None
|
4846
4933
|
|
4934
|
+
def generate_data_structure_output(self, elements, filter, output_format) -> str | list:
|
4935
|
+
return self.generate_basic_structured_output(elements, filter, output_format)
|
4936
|
+
|
4937
|
+
def generate_data_class_output(self, elements, filter, output_format) -> str | list:
|
4938
|
+
return self.generate_basic_structured_output(elements, filter, output_format)
|
4939
|
+
|
4940
|
+
def generate_data_field_output(self, elements, filter, output_format) -> str | list:
|
4941
|
+
return self.generate_basic_structured_output(elements, filter, output_format)
|
4847
4942
|
|
4848
4943
|
if __name__ == "__main__":
|
4849
4944
|
print("Data Designer")
|
pyegeria/mermaid_utilities.py
CHANGED
@@ -50,7 +50,7 @@ def load_mermaid():
|
|
50
50
|
"""Inject Mermaid.js library"""
|
51
51
|
# Alternative CDN URL via unpkg
|
52
52
|
mermaid_js = """
|
53
|
-
<script src="https://unpkg.com/mermaid@11.
|
53
|
+
<script src="https://unpkg.com/mermaid@11.6.0/dist/mermaid.min.js"></script>
|
54
54
|
<script>
|
55
55
|
document.addEventListener('DOMContentLoaded', function() {
|
56
56
|
mermaid.initialize({startOnLoad: true},
|
@@ -217,7 +217,7 @@ pyegeria/commands/tech/table_tech_templates.py,sha256=jI1c9YKa3KirArMNXeCRKeaiVd
|
|
217
217
|
pyegeria/commands/tech/x_list_related_elements.py,sha256=ynaw792VnbMZ9IXBi5mmG7xBfC0kn0esKiFTsjvLGzc,5900
|
218
218
|
pyegeria/core_omag_server_config.py,sha256=pNQpocICkZx8sRsTw5DPUe-TFyxlIo1U88qqgci_f7I,97764
|
219
219
|
pyegeria/create_tech_guid_lists.py,sha256=hf5q8Xrdsz-bqeIW3yTORZ1XB6_BrKzLDWWwC_bNG2g,4811
|
220
|
-
pyegeria/data_designer_omvs.py,sha256=
|
220
|
+
pyegeria/data_designer_omvs.py,sha256=61bHxR_SAFFHBoBzmlaWBCArbkZRMwLeohrEZgUZK6Y,178189
|
221
221
|
pyegeria/dr.egeria spec.md,sha256=QC_z3EqJ0WW18NYQFW_AtqO4SMWH5MJNVmM--54VzX4,959
|
222
222
|
pyegeria/dr_egeria_state.py,sha256=LmoKqGBgDBbMaYvQAP6r-vtg1_Fw4RlegKBhJiDrclU,1987
|
223
223
|
pyegeria/egeria_cat_client.py,sha256=d8dQNPLzL4efi99OJfH1T-Rt1N0k9Rf9LX8LpuhiFls,2179
|
@@ -245,7 +245,7 @@ pyegeria/md_processing/utils/validation_utils.py,sha256=6nMmfqAj1U5QDVj0a7VbjyEn
|
|
245
245
|
pyegeria/md_processing_helpers.py,sha256=sV-ciVg_xOGVGTH_CMpH2B5k3V5jzdFp_XvnQQ5xafw,2131
|
246
246
|
pyegeria/md_processing_utils.py,sha256=yqkK8ne_cbsyeR_wQqXwcEZ2Tihcbj-PfnM8PFMb8kk,96846
|
247
247
|
pyegeria/md_processing_utils_orig.py,sha256=64eVP86__zI4EdzwveskDyLiw6EyWJXZW4pqk9aLpuM,52486
|
248
|
-
pyegeria/mermaid_utilities.py,sha256=
|
248
|
+
pyegeria/mermaid_utilities.py,sha256=J_-fILB-uUEZknnQY3fdR73J6GOdsI_99n3EGYHzJFs,54289
|
249
249
|
pyegeria/metadata_explorer_omvs.py,sha256=xHnZTQKbd6XwOhYia-RiIisrvZcqHi0SL1l6OCf04Gk,86911
|
250
250
|
pyegeria/my_profile_omvs.py,sha256=d0oJYCJG7pS9BINPuGciVa00ac0jwPHNANXDCLginEc,34720
|
251
251
|
pyegeria/platform_services.py,sha256=YEpZsGGsbSdesN8ceyFhV0OMzKG6znTZrREMTRimLps,41701
|
@@ -258,8 +258,8 @@ pyegeria/template_manager_omvs.py,sha256=chBljs1vy5wr9DRAtbvIt4Cob_7HxGfxLkCNlDT
|
|
258
258
|
pyegeria/utils.py,sha256=GCt1C0bp0Xng1ahzbZhzV9qQwH7Dj93IaCt2dvWb-sg,5417
|
259
259
|
pyegeria/valid_metadata_omvs.py,sha256=Xq9DqBQvBFFJzaFIRKcVZ2k4gJvSh9yeXs_j-O3vn1w,65050
|
260
260
|
pyegeria/x_action_author_omvs.py,sha256=RcqSzahUKCtvb_3u_wyintAlc9WFkC_2v0E12TZs8lQ,6433
|
261
|
-
pyegeria-5.3.9.
|
262
|
-
pyegeria-5.3.9.
|
263
|
-
pyegeria-5.3.9.
|
264
|
-
pyegeria-5.3.9.
|
265
|
-
pyegeria-5.3.9.
|
261
|
+
pyegeria-5.3.9.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
262
|
+
pyegeria-5.3.9.5.dist-info/METADATA,sha256=Lk02ibeNv72x1uFuKhTxIKhD-vHDCshipBAwAmT5No8,2757
|
263
|
+
pyegeria-5.3.9.5.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
264
|
+
pyegeria-5.3.9.5.dist-info/entry_points.txt,sha256=eAvQ_vkejlF3JzMzEc5VD93ymLA_hSFV0HM8fntG-d8,6791
|
265
|
+
pyegeria-5.3.9.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|