pyegeria 0.6.2__py3-none-any.whl → 0.6.4__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.
Files changed (54) hide show
  1. examples/widgets/{catalog_user → cat}/list_projects.py +3 -0
  2. examples/widgets/cli/__init__.py +12 -0
  3. examples/widgets/cli/egeria.py +45 -45
  4. examples/widgets/cli/egeria_cat.py +9 -9
  5. examples/widgets/cli/{egeria_per.py → egeria_my.py} +4 -4
  6. examples/widgets/cli/egeria_ops.py +13 -13
  7. examples/widgets/cli/egeria_tech.py +3 -3
  8. examples/widgets/cli/ops_config.py +2 -0
  9. examples/widgets/{operational → ops}/monitor_engine_activity.py +14 -3
  10. pyegeria/__init__.py +4 -2
  11. pyegeria/_globals.py +1 -0
  12. pyegeria/asset_catalog_omvs.py +24 -29
  13. pyegeria/classification_manager_omvs.py +1830 -0
  14. pyegeria/feedback_manager_omvs.py +4806 -0
  15. {pyegeria-0.6.2.dist-info → pyegeria-0.6.4.dist-info}/METADATA +3 -1
  16. pyegeria-0.6.4.dist-info/RECORD +83 -0
  17. pyegeria-0.6.4.dist-info/entry_points.txt +42 -0
  18. pyegeria/Xfeedback_manager_omvs.py +0 -238
  19. pyegeria-0.6.2.dist-info/RECORD +0 -82
  20. pyegeria-0.6.2.dist-info/entry_points.txt +0 -42
  21. /examples/widgets/{catalog_user → cat}/README.md +0 -0
  22. /examples/widgets/{catalog_user → cat}/__init__.py +0 -0
  23. /examples/widgets/{catalog_user → cat}/get_asset_graph.py +0 -0
  24. /examples/widgets/{catalog_user → cat}/get_collection.py +0 -0
  25. /examples/widgets/{catalog_user → cat}/get_tech_type_elements.py +0 -0
  26. /examples/widgets/{catalog_user → cat}/get_tech_type_template.py +0 -0
  27. /examples/widgets/{catalog_user → cat}/list_assets.py +0 -0
  28. /examples/widgets/{catalog_user → cat}/list_glossary.py +0 -0
  29. /examples/widgets/{catalog_user → cat}/list_tech_types.py +0 -0
  30. /examples/widgets/{catalog_user → cat}/list_todos.py +0 -0
  31. /examples/widgets/{personal → my}/README.md +0 -0
  32. /examples/widgets/{personal → my}/__init__.py +0 -0
  33. /examples/widgets/{personal → my}/list_my_profile.py +0 -0
  34. /examples/widgets/{personal → my}/list_my_roles.py +0 -0
  35. /examples/widgets/{personal → my}/monitor_my_todos.py +0 -0
  36. /examples/widgets/{personal → my}/monitor_open_todos.py +0 -0
  37. /examples/widgets/{personal → my}/my_profile_actions.py +0 -0
  38. /examples/widgets/{operational → ops}/README.md +0 -0
  39. /examples/widgets/{operational → ops}/__init__.py +0 -0
  40. /examples/widgets/{operational → ops}/engine_actions.py +0 -0
  41. /examples/widgets/{operational → ops}/integration_daemon_actions.py +0 -0
  42. /examples/widgets/{operational → ops}/list_catalog_targets.py +0 -0
  43. /examples/widgets/{operational → ops}/load_archive.py +0 -0
  44. /examples/widgets/{operational → ops}/monitor_asset_events.py +0 -0
  45. /examples/widgets/{operational → ops}/monitor_coco_status.py +0 -0
  46. /examples/widgets/{operational → ops}/monitor_gov_eng_status.py +0 -0
  47. /examples/widgets/{operational → ops}/monitor_integ_daemon_status.py +0 -0
  48. /examples/widgets/{operational → ops}/monitor_platform_status.py +0 -0
  49. /examples/widgets/{operational → ops}/monitor_server_list.py +0 -0
  50. /examples/widgets/{operational → ops}/monitor_server_status.py +0 -0
  51. /examples/widgets/{operational → ops}/refresh_integration_daemon.py +0 -0
  52. /examples/widgets/{operational → ops}/restart_integration_daemon.py +0 -0
  53. {pyegeria-0.6.2.dist-info → pyegeria-0.6.4.dist-info}/LICENSE +0 -0
  54. {pyegeria-0.6.2.dist-info → pyegeria-0.6.4.dist-info}/WHEEL +0 -0
@@ -111,6 +111,9 @@ def display_project_list(project_name: str, server: str, url: str,
111
111
  additional_properties = project.get('additionalProperties')
112
112
  if additional_properties is not None:
113
113
  props = json.dumps(additional_properties)
114
+
115
+
116
+
114
117
  table.add_row(
115
118
  name, description, classification, qualified_name, identifier, phase, health, status, start,
116
119
  end, '---')
@@ -1 +1,13 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+
7
+ A command line interface for Egeria Users - package info
8
+
9
+ This is an emerging capability based on the **click** package. Feedback welcome!
10
+
11
+ """
12
+
1
13
  from .ops_config import Config
@@ -12,34 +12,34 @@ This is an emerging capability based on the **click** package. Feedback welcome!
12
12
  import click
13
13
  from trogon import tui
14
14
 
15
- from examples.widgets.catalog_user.get_asset_graph import asset_viewer
16
- from examples.widgets.catalog_user.get_collection import collection_viewer
17
- from examples.widgets.catalog_user.get_tech_type_elements import tech_viewer
18
- from examples.widgets.catalog_user.get_tech_type_template import template_viewer
19
- from examples.widgets.catalog_user.list_assets import display_assets
20
- from examples.widgets.catalog_user.list_glossary import display_glossary_terms
21
- from examples.widgets.catalog_user.list_projects import display_project_list
22
- from examples.widgets.catalog_user.list_tech_types import display_tech_types
23
- from examples.widgets.catalog_user.list_todos import display_to_dos
15
+ from examples.widgets.cat.get_asset_graph import asset_viewer
16
+ from examples.widgets.cat.get_collection import collection_viewer
17
+ from examples.widgets.cat.get_tech_type_elements import tech_viewer
18
+ from examples.widgets.cat.get_tech_type_template import template_viewer
19
+ from examples.widgets.cat.list_assets import display_assets
20
+ from examples.widgets.cat.list_glossary import display_glossary_terms
21
+ from examples.widgets.cat.list_projects import display_project_list
22
+ from examples.widgets.cat.list_tech_types import display_tech_types
23
+ from examples.widgets.cat.list_todos import display_to_dos
24
24
  from examples.widgets.cli.ops_config import Config
25
- from examples.widgets.operational.engine_actions import start_server as start_engine_host, \
25
+ from examples.widgets.ops.engine_actions import start_server as start_engine_host, \
26
26
  stop_server as stop_engine_host
27
- from examples.widgets.operational.integration_daemon_actions import (add_catalog_target, remove_catalog_target,
28
- update_catalog_target, stop_server, start_server)
29
- from examples.widgets.operational.list_catalog_targets import display_catalog_targets
30
- from examples.widgets.operational.load_archive import load_archive
31
- from examples.widgets.operational.monitor_engine_activity import display_engine_activity
32
- from examples.widgets.operational.monitor_gov_eng_status import display_gov_eng_status
33
- from examples.widgets.operational.monitor_integ_daemon_status import display_integration_daemon_status
34
- from examples.widgets.operational.monitor_platform_status import display_status as p_display_status
35
- from examples.widgets.operational.monitor_server_list import display_status as display_list
36
- from examples.widgets.operational.monitor_server_status import display_status as s_display_status
37
- from examples.widgets.operational.refresh_integration_daemon import refresh_connector
38
- from examples.widgets.operational.restart_integration_daemon import restart_connector
39
- from examples.widgets.personal.list_my_profile import display_my_profile
40
- from examples.widgets.personal.list_my_roles import display_my_roles
41
- from examples.widgets.personal.monitor_my_todos import display_my_todos
42
- from examples.widgets.personal.monitor_open_todos import display_todos
27
+ from examples.widgets.ops.integration_daemon_actions import (add_catalog_target, remove_catalog_target,
28
+ update_catalog_target, stop_server, start_server)
29
+ from examples.widgets.ops.list_catalog_targets import display_catalog_targets
30
+ from examples.widgets.ops.load_archive import load_archive
31
+ from examples.widgets.ops.monitor_engine_activity import display_engine_activity
32
+ from examples.widgets.ops.monitor_gov_eng_status import display_gov_eng_status
33
+ from examples.widgets.ops.monitor_integ_daemon_status import display_integration_daemon_status
34
+ from examples.widgets.ops.monitor_platform_status import display_status as p_display_status
35
+ from examples.widgets.ops.monitor_server_list import display_status as display_list
36
+ from examples.widgets.ops.monitor_server_status import display_status as s_display_status
37
+ from examples.widgets.ops.refresh_integration_daemon import refresh_connector
38
+ from examples.widgets.ops.restart_integration_daemon import restart_connector
39
+ from examples.widgets.my.list_my_profile import display_my_profile
40
+ from examples.widgets.my.list_my_roles import display_my_roles
41
+ from examples.widgets.my.monitor_my_todos import display_my_todos
42
+ from examples.widgets.my.monitor_open_todos import display_todos
43
43
  from examples.widgets.tech.get_guid_info import display_guid
44
44
  from examples.widgets.tech.get_tech_details import tech_details_viewer
45
45
  from examples.widgets.tech.list_asset_types import display_asset_types
@@ -97,16 +97,16 @@ def cli(ctx, server, url, view_server, view_server_url, integration_daemon, inte
97
97
 
98
98
 
99
99
  #
100
- # Personal: Show
100
+ # my: Show
101
101
  #
102
- @cli.group('personal')
102
+ @cli.group('my')
103
103
  @click.pass_context
104
- def personal(ctx):
104
+ def my(ctx):
105
105
  "Work with my information"
106
106
  pass
107
107
 
108
108
 
109
- @personal.group("show")
109
+ @my.group("show")
110
110
  @click.pass_context
111
111
  def show(ctx):
112
112
  """Display an Egeria Object"""
@@ -166,10 +166,10 @@ def show_open_todos(ctx):
166
166
 
167
167
 
168
168
  #
169
- # Personal: Tell
169
+ # my: Tell
170
170
  #
171
171
 
172
- @personal.group('tell')
172
+ @my.group('tell')
173
173
  @click.pass_context
174
174
  def tell(ctx):
175
175
  """Perform actions an Egeria Objects"""
@@ -177,16 +177,16 @@ def tell(ctx):
177
177
 
178
178
 
179
179
  #
180
- # Technical User: Show
180
+ # tech User: Show
181
181
  #
182
- @cli.group("technical")
182
+ @cli.group("tech")
183
183
  @click.pass_context
184
- def technical(ctx):
185
- """Commands for Technical Users"""
184
+ def tech(ctx):
185
+ """Commands for tech Users"""
186
186
  pass
187
187
 
188
188
 
189
- @technical.group("show")
189
+ @tech.group("show")
190
190
  @click.pass_context
191
191
  def show(ctx):
192
192
  """Display an Egeria Object"""
@@ -204,7 +204,7 @@ def show_guid_infos(ctx, guid):
204
204
  """
205
205
  c = ctx.obj
206
206
  display_guid(guid, c.server, c.url,
207
- c.user_id, c.password, c.jupyter, c.width)
207
+ c.userid, c.password, c.jupyter, c.width)
208
208
 
209
209
 
210
210
  @show.command('tech-types')
@@ -304,10 +304,10 @@ def valid_metadata_values(ctx, property, type_name):
304
304
 
305
305
 
306
306
  #
307
- # Technical Users: Tell
307
+ # tech Users: Tell
308
308
  #
309
309
 
310
- @technical.group('tell')
310
+ @tech.group('tell')
311
311
  @click.pass_context
312
312
  def tell(ctx):
313
313
  """Perform actions an Egeria Objects"""
@@ -318,14 +318,14 @@ def tell(ctx):
318
318
  # Catalog User: Show
319
319
  #
320
320
 
321
- @cli.group('catalog_user')
321
+ @cli.group('cat')
322
322
  @click.pass_context
323
- def catalog_user(ctx):
324
- """Commands for the more technical user"""
323
+ def cat(ctx):
324
+ """Commands for the more tech user"""
325
325
  pass
326
326
 
327
327
 
328
- @catalog_user.group("show")
328
+ @cat.group("show")
329
329
  @click.pass_context
330
330
  def show(ctx):
331
331
  """Display an Egeria Object"""
@@ -442,7 +442,7 @@ def show_todos(ctx, search_string):
442
442
  # Catalog User: Tell
443
443
  #
444
444
 
445
- @catalog_user.group('tell')
445
+ @cat.group('tell')
446
446
  @click.pass_context
447
447
  def tell(ctx):
448
448
  """Perform actions an Egeria Objects"""
@@ -12,15 +12,15 @@ This is an emerging capability based on the **click** package. Feedback welcome!
12
12
  import click
13
13
  from trogon import tui
14
14
 
15
- from examples.widgets.catalog_user.get_asset_graph import asset_viewer
16
- from examples.widgets.catalog_user.get_collection import collection_viewer
17
- from examples.widgets.catalog_user.get_tech_type_elements import tech_viewer
18
- from examples.widgets.catalog_user.get_tech_type_template import template_viewer
19
- from examples.widgets.catalog_user.list_assets import display_assets
20
- from examples.widgets.catalog_user.list_glossary import display_glossary_terms
21
- from examples.widgets.catalog_user.list_tech_types import display_tech_types
22
- from examples.widgets.catalog_user.list_projects import display_project_list
23
- from examples.widgets.catalog_user.list_todos import display_to_dos
15
+ from examples.widgets.cat.get_asset_graph import asset_viewer
16
+ from examples.widgets.cat.get_collection import collection_viewer
17
+ from examples.widgets.cat.get_tech_type_elements import tech_viewer
18
+ from examples.widgets.cat.get_tech_type_template import template_viewer
19
+ from examples.widgets.cat.list_assets import display_assets
20
+ from examples.widgets.cat.list_glossary import display_glossary_terms
21
+ from examples.widgets.cat.list_tech_types import display_tech_types
22
+ from examples.widgets.cat.list_projects import display_project_list
23
+ from examples.widgets.cat.list_todos import display_to_dos
24
24
 
25
25
  # from pyegeria import ServerOps
26
26
  from examples.widgets.cli.ops_config import Config
@@ -14,10 +14,10 @@ from trogon import tui
14
14
 
15
15
  from examples.widgets.cli.ops_config import Config
16
16
 
17
- from examples.widgets.personal.monitor_open_todos import display_todos
18
- from examples.widgets.personal.monitor_my_todos import display_my_todos
19
- from examples.widgets.personal.list_my_profile import display_my_profile
20
- from examples.widgets.personal.list_my_roles import display_my_roles
17
+ from examples.widgets.my.monitor_open_todos import display_todos
18
+ from examples.widgets.my.monitor_my_todos import display_my_todos
19
+ from examples.widgets.my.list_my_profile import display_my_profile
20
+ from examples.widgets.my.list_my_roles import display_my_roles
21
21
 
22
22
 
23
23
 
@@ -14,20 +14,20 @@ from trogon import tui
14
14
 
15
15
  # from pyegeria import ServerOps
16
16
  from examples.widgets.cli.ops_config import Config
17
- from examples.widgets.operational.engine_actions import start_server as start_engine_host, \
17
+ from examples.widgets.ops.engine_actions import start_server as start_engine_host, \
18
18
  stop_server as stop_engine_host
19
- from examples.widgets.operational.integration_daemon_actions import (add_catalog_target, remove_catalog_target,
20
- update_catalog_target, stop_server, start_server)
21
- from examples.widgets.operational.list_catalog_targets import display_catalog_targets
22
- from examples.widgets.operational.load_archive import load_archive
23
- from examples.widgets.operational.monitor_engine_activity import display_engine_activity
24
- from examples.widgets.operational.monitor_gov_eng_status import display_gov_eng_status
25
- from examples.widgets.operational.monitor_integ_daemon_status import display_integration_daemon_status
26
- from examples.widgets.operational.monitor_platform_status import display_status as p_display_status
27
- from examples.widgets.operational.monitor_server_list import display_status as display_list
28
- from examples.widgets.operational.monitor_server_status import display_status as s_display_status
29
- from examples.widgets.operational.refresh_integration_daemon import refresh_connector
30
- from examples.widgets.operational.restart_integration_daemon import restart_connector
19
+ from examples.widgets.ops.integration_daemon_actions import (add_catalog_target, remove_catalog_target,
20
+ update_catalog_target, stop_server, start_server)
21
+ from examples.widgets.ops.list_catalog_targets import display_catalog_targets
22
+ from examples.widgets.ops.load_archive import load_archive
23
+ from examples.widgets.ops.monitor_engine_activity import display_engine_activity
24
+ from examples.widgets.ops.monitor_gov_eng_status import display_gov_eng_status
25
+ from examples.widgets.ops.monitor_integ_daemon_status import display_integration_daemon_status
26
+ from examples.widgets.ops.monitor_platform_status import display_status as p_display_status
27
+ from examples.widgets.ops.monitor_server_list import display_status as display_list
28
+ from examples.widgets.ops.monitor_server_status import display_status as s_display_status
29
+ from examples.widgets.ops.refresh_integration_daemon import refresh_connector
30
+ from examples.widgets.ops.restart_integration_daemon import restart_connector
31
31
 
32
32
 
33
33
  # class Config(object):
@@ -12,7 +12,7 @@ This is an emerging capability based on the **click** package. Feedback welcome!
12
12
  import click
13
13
  from trogon import tui
14
14
 
15
- from examples.widgets.catalog_user.list_tech_types import display_tech_types
15
+ from examples.widgets.cat.list_tech_types import display_tech_types
16
16
  from examples.widgets.cli.ops_config import Config
17
17
  from examples.widgets.tech.get_guid_info import display_guid
18
18
  from examples.widgets.tech.get_tech_details import tech_details_viewer
@@ -21,7 +21,7 @@ from examples.widgets.tech.list_registered_services import display_registered_sv
21
21
  from examples.widgets.tech.list_relationship_types import display_relationship_types
22
22
  from examples.widgets.tech.list_tech_templates import display_templates_spec
23
23
  from examples.widgets.tech.list_valid_metadata_values import display_metadata_values
24
- from examples.widgets.catalog_user.get_tech_type_template import template_viewer
24
+ from examples.widgets.cat.get_tech_type_template import template_viewer
25
25
 
26
26
 
27
27
  # from pyegeria import ServerOps
@@ -106,7 +106,7 @@ def show_guid_infos(ctx, guid):
106
106
  """
107
107
  c = ctx.obj
108
108
  display_guid(guid, c.server, c.url,
109
- c.user_id, c.password, c.jupyter, c.width)
109
+ c.userid, c.password, c.jupyter, c.width)
110
110
 
111
111
 
112
112
  @show.command('tech-types')
@@ -26,6 +26,8 @@ class Config(object):
26
26
  self.verbose = verbose
27
27
  self.jupyter = jupyter
28
28
  self.width = width
29
+ self.server = server
30
+ self.url = url
29
31
 
30
32
 
31
33
  pass_config = click.make_pass_decorator(Config)
@@ -103,9 +103,20 @@ def display_engine_activity(server: str, url: str, user: str, user_pass: str, pa
103
103
  else:
104
104
  action_status = f"[red]{action['actionStatus']}"
105
105
 
106
- target = action.get("actionTargetElements", "Empty")
107
- if type(target) is list:
108
- target_element = json.dumps(target[0]["targetElement"]["elementProperties"]["propertiesAsStrings"])
106
+ targets = action.get("actionTargetElements", "Empty")
107
+ if type(targets) is list:
108
+ tgt_tab = Table()
109
+ tgt_tab.add_column('name')
110
+ tgt_tab.add_column('guid', no_wrap=True)
111
+ tgt_tab.add_column('type_name')
112
+ targets_md = ""
113
+ for target in targets:
114
+ t_name = target['actionTargetName']
115
+ t_guid = target['actionTargetGUID']
116
+ t_type = target['targetElement']['type']['typeName']
117
+ tgt_tab.add_row(t_name, t_guid, t_type)
118
+ # target_element = json.dumps(target[0]["targetElement"]["elementProperties"]["propertiesAsStrings"])
119
+ target_element = tgt_tab
109
120
  else:
110
121
  target_element = " "
111
122
 
pyegeria/__init__.py CHANGED
@@ -11,8 +11,9 @@ the server platform and servers.
11
11
 
12
12
  """
13
13
 
14
- from ._globals import (is_debug, disable_ssl_warnings, max_paging_size, TEMPLATE_GUIDS, INTEGRATION_GUIDS
15
- )
14
+ from ._globals import (is_debug, disable_ssl_warnings, max_paging_size, TEMPLATE_GUIDS, INTEGRATION_GUIDS,
15
+ default_time_out
16
+ )
16
17
 
17
18
  if disable_ssl_warnings:
18
19
  from urllib3.exceptions import InsecureRequestWarning
@@ -47,6 +48,7 @@ from .runtime_manager_omvs import RuntimeManager
47
48
  from .action_author_omvs import GovernanceAuthor
48
49
  from .glossary_manager_omvs import GlossaryManager
49
50
  from .create_tech_guid_lists import build_global_guid_lists
51
+ from .classification_manager_omvs import ClassificationManager
50
52
 
51
53
 
52
54
  #
pyegeria/_globals.py CHANGED
@@ -13,6 +13,7 @@ is_debug = False
13
13
  disable_ssl_warnings = True
14
14
  enable_ssl_check = False
15
15
  max_paging_size = 500
16
+ default_time_out = 30
16
17
 
17
18
  comment_types = (
18
19
  "ANSWER",
@@ -9,16 +9,15 @@ Copyright Contributors to the ODPi Egeria project.
9
9
 
10
10
  """
11
11
  import asyncio
12
- from datetime import datetime
13
12
  import json
14
13
 
15
14
  from httpx import Response
16
15
 
17
- from pyegeria import Client, max_paging_size, body_slimmer, TEMPLATE_GUIDS, INTEGRATION_GUIDS
16
+ from pyegeria import Client, max_paging_size, body_slimmer, TEMPLATE_GUIDS
18
17
  from pyegeria._exceptions import (
19
18
  InvalidParameterException,
20
19
  )
21
- from ._validators import validate_name, validate_guid, validate_search_string
20
+ from ._validators import validate_search_string
22
21
 
23
22
 
24
23
  class AssetCatalog(Client):
@@ -34,9 +33,6 @@ class AssetCatalog(Client):
34
33
  when the user doesn't pass the user_id on a method call.
35
34
  user_pwd: str
36
35
  The password associated with the user_id. Defaults to None
37
- verify_flag: bool
38
- Flag to indicate if SSL Certificates should be verified in the HTTP requests.
39
- Defaults to False.
40
36
 
41
37
  """
42
38
 
@@ -46,12 +42,10 @@ class AssetCatalog(Client):
46
42
  platform_url: str,
47
43
  user_id: str,
48
44
  user_pwd: str = None,
49
- verify_flag: bool = False,
50
45
  ):
51
- Client.__init__(self, server_name, platform_url, user_id, user_pwd, verify_flag)
46
+ Client.__init__(self, server_name, platform_url, user_id, user_pwd)
52
47
  self.cur_command_root = f"{platform_url}/servers/"
53
48
 
54
-
55
49
  async def _async_create_element_from_template(self, body: dict, server: str = None) -> str:
56
50
  """ Create a new metadata element from a template. Async version.
57
51
  Parameters
@@ -304,9 +298,9 @@ class AssetCatalog(Client):
304
298
  #
305
299
 
306
300
  async def _async_find_assets_in_domain(self, search_string: str, start_from: int = 0,
307
- page_size: int = max_paging_size, starts_with: bool = True,
308
- ends_with: bool = False, ignore_case: bool = True,
309
- server: str = None, time_out:int = 60) -> list | str:
301
+ page_size: int = max_paging_size, starts_with: bool = True,
302
+ ends_with: bool = False, ignore_case: bool = True,
303
+ server: str = None, time_out: int = 60) -> list | str:
310
304
  """ Retrieve the list of engine action metadata elements that contain the search string. Async Version.
311
305
  Parameters
312
306
  ----------
@@ -366,9 +360,9 @@ class AssetCatalog(Client):
366
360
  return response.json().get("searchMatches", "no assets found")
367
361
 
368
362
  def find_assets_in_domain(self, search_string: str, start_from: int = 0,
369
- page_size: int = max_paging_size, starts_with: bool = True,
370
- ends_with: bool = False, ignore_case: bool = True,
371
- server: str = None, time_out:int = 60) -> list | str:
363
+ page_size: int = max_paging_size, starts_with: bool = True,
364
+ ends_with: bool = False, ignore_case: bool = True,
365
+ server: str = None, time_out: int = 60) -> list | str:
372
366
  """ Retrieve the list of engine action metadata elements that contain the search string. Async Version.
373
367
  Parameters
374
368
  ----------
@@ -411,14 +405,13 @@ class AssetCatalog(Client):
411
405
  """
412
406
  loop = asyncio.get_event_loop()
413
407
  response = loop.run_until_complete(
414
- self._async_find_assets_in_domain(search_string, start_from,page_size,
408
+ self._async_find_assets_in_domain(search_string, start_from, page_size,
415
409
  starts_with, ends_with, ignore_case, server, time_out)
416
410
  )
417
411
  return response
418
412
 
419
-
420
- async def _async_get_asset_graph(self, asset_guid:str, server: str = None, start_from: int = 0,
421
- page_size: int = max_paging_size) -> str| dict:
413
+ async def _async_get_asset_graph(self, asset_guid: str, server: str = None, start_from: int = 0,
414
+ page_size: int = max_paging_size) -> str | dict:
422
415
  """ Return all the elements that are anchored to an asset plus relationships between these elements and to
423
416
  other elements. Async Version.
424
417
  Parameters
@@ -456,7 +449,7 @@ class AssetCatalog(Client):
456
449
  return response.json().get("assetGraph", "no asset found")
457
450
 
458
451
  def get_asset_graph(self, asset_guid: str, server: str = None, start_from: int = 0,
459
- page_size: int = max_paging_size) -> str | dict:
452
+ page_size: int = max_paging_size) -> str | dict:
460
453
  """ Return all the elements that are anchored to an asset plus relationships between these elements and to
461
454
  other elements.
462
455
  Parameters
@@ -488,13 +481,14 @@ class AssetCatalog(Client):
488
481
 
489
482
  loop = asyncio.get_event_loop()
490
483
  response = loop.run_until_complete(
491
- self._async_get_asset_graph(asset_guid, server,start_from, page_size)
484
+ self._async_get_asset_graph(asset_guid, server, start_from, page_size)
492
485
  )
493
486
  return response
494
487
 
495
- async def _async_get_assets_by_metadata_collection_id(self, metadata_collection_id:str, type_name: str = None,
488
+ async def _async_get_assets_by_metadata_collection_id(self, metadata_collection_id: str, type_name: str = None,
496
489
  effective_time: str = None, server: str = None,
497
- start_from: int = 0, page_size: int = max_paging_size) -> str| list:
490
+ start_from: int = 0,
491
+ page_size: int = max_paging_size) -> str | list:
498
492
  """ Return a list of assets that come from the requested metadata collection. Can optionally
499
493
  specify an type name as a filter and an effective time. Async Version.
500
494
 
@@ -545,9 +539,9 @@ class AssetCatalog(Client):
545
539
  return response.json().get("assets", "no assets found")
546
540
 
547
541
  def get_assets_by_metadata_collection_id(self, metadata_collection_id: str, type_name: str = None,
548
- effective_time: str = None, server: str = None,
549
- start_from: int = 0,
550
- page_size: int = max_paging_size) -> str | list:
542
+ effective_time: str = None, server: str = None,
543
+ start_from: int = 0,
544
+ page_size: int = max_paging_size) -> str | list:
551
545
  """ Return a list of assets that come from the requested metadata collection. Can optionally
552
546
  specify an type name as a filter and an effective time. Async Version.
553
547
 
@@ -587,12 +581,12 @@ class AssetCatalog(Client):
587
581
  loop = asyncio.get_event_loop()
588
582
  response = loop.run_until_complete(
589
583
  self._async_get_assets_by_metadata_collection_id(metadata_collection_id, type_name,
590
- effective_time,server,start_from,
584
+ effective_time, server, start_from,
591
585
  page_size)
592
586
  )
593
587
  return response
594
588
 
595
- async def _async_get_asset_catalog_types(self, server: str = None) -> str| dict:
589
+ async def _async_get_asset_catalog_types(self, server: str = None) -> str | dict:
596
590
  """ Return all the elements that are anchored to an asset plus relationships between these elements and to
597
591
  other elements. Async Version.
598
592
  Parameters
@@ -627,7 +621,7 @@ class AssetCatalog(Client):
627
621
 
628
622
  response = await self._async_make_request("GET", url)
629
623
 
630
- return response.json().get('types',"No assets found")
624
+ return response.json().get('types', "No assets found")
631
625
 
632
626
  def get_asset_catalog_types(self, server: str = None) -> str | dict:
633
627
  """ Return all the elements that are anchored to an asset plus relationships between these elements and to
@@ -665,6 +659,7 @@ class AssetCatalog(Client):
665
659
  )
666
660
  return response
667
661
 
662
+
668
663
  if __name__ == "__main__":
669
664
  p = AssetCatalog("active-metadata-store", "https://127.0.0.1:9443", "garygeeke", verify_flag=False)
670
665
  response = p.get_assets_by_metadata_collection_id()