pyegeria 0.6.3__py3-none-any.whl → 0.6.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.
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+ A simple viewer for collections - provide the root and we display the hierarchy
7
+
8
+ """
9
+
10
+ import argparse
11
+ import os
12
+ from rich import print
13
+ from rich.panel import Panel
14
+ from rich.prompt import Prompt
15
+ from rich.text import Text
16
+ from rich.tree import Tree
17
+
18
+ from pyegeria import ProjectManager, UserNotAuthorizedException, PropertyServerException, InvalidParameterException
19
+ from pyegeria._exceptions import (
20
+ print_exception_response,
21
+ )
22
+
23
+ disable_ssl_warnings = True
24
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
25
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
26
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
27
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
28
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
29
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
30
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
31
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
32
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
33
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
34
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
35
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
36
+
37
+ def project_structure_viewer(root: str, server_name: str, platform_url: str, user: str, user_password: str,
38
+ jupyter:bool=EGERIA_JUPYTER, width:int = EGERIA_WIDTH):
39
+ """ A simple collection viewer"""
40
+ def walk_project_hierarchy(project_client: ProjectManager, root_project_name: str, tree: Tree) -> None:
41
+ """Recursively build a Tree with collection contents."""
42
+ project = project_client.get_projects_by_name(root_project_name)
43
+ if type(project) is list:
44
+ root_guid = project['elementHeader']['guid']
45
+ proj_props = project['properties']
46
+ proj_props_md = ""
47
+ for key in proj_props.keys():
48
+ proj_props_md += f"* {key}: {proj_props[key]}\n"
49
+
50
+ t = tree.add()
51
+
52
+
53
+ members = project_client.get_member_list(root_collection_name)
54
+ if members:
55
+ for member in members:
56
+ style = "bold white on black"
57
+ text_collection_name = Text(f"[bold white on black]Name: {member['name']}", style=style)
58
+ text_qualified_name = Text(f"* QualifiedName: {member['qualifiedName']}")
59
+ text_guid = Text(f"* GUID: {member['guid']}", "green")
60
+ text_collection_type = Text(f"* Collection Type: {member['collectionType']}")
61
+ text_description = Text(f"* Description: {member['description']}")
62
+ p = Panel.fit(f"{text_collection_name}[green]\n{text_qualified_name}\n{text_guid}\n"
63
+ f"{text_collection_type}\n{text_description}")
64
+ tt = tree.add(p, style=style)
65
+
66
+ children = collection_client.get_collection_members(member['guid'])
67
+ if type(children) is list:
68
+ branch = tt.add(f"[bold magenta on black]Members", style=style, guide_style=style)
69
+ walk_collection_hierarchy(collection_client, member['qualifiedName'], branch),
70
+ else:
71
+ tt = tree.add(f"[bold magenta on black]No collections match {root_collection_name}")
72
+ try:
73
+ tree = Tree(f"[bold bright green on black]{root}",guide_style="bold bright_blue")
74
+ p_client = ProjectManager(server_name, platform_url,
75
+ user_id=user)
76
+
77
+ token = p_client.create_egeria_bearer_token(user, user_password)
78
+ walk_project_hierarchy(p_client, root, tree)
79
+ print(tree)
80
+
81
+ except (
82
+ InvalidParameterException,
83
+ PropertyServerException,
84
+ UserNotAuthorizedException
85
+ ) as e:
86
+ print_exception_response(e)
87
+
88
+
89
+ def main():
90
+ parser = argparse.ArgumentParser()
91
+
92
+ parser.add_argument("--server", help="Name of the server to display status for")
93
+ parser.add_argument("--url", help="URL Platform to connect to")
94
+ parser.add_argument("--userid", help="User Id")
95
+ parser.add_argument("--password", help="User Password")
96
+ args = parser.parse_args()
97
+
98
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
99
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
100
+ userid = args.userid if args.userid is not None else EGERIA_USER
101
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
102
+
103
+ try:
104
+ root_project = Prompt.ask("Enter the Root Project to start from:", default="Sustainability Campaign")
105
+ project_structure_viewer(root_project, server, url, userid, user_pass)
106
+ except (KeyboardInterrupt):
107
+ pass
108
+ if __name__ == "__main__":
109
+ main()
@@ -0,0 +1,176 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+ List certification types
7
+
8
+
9
+ A simple display for certification types
10
+ """
11
+ import argparse
12
+ import os
13
+ import sys
14
+ import time
15
+ import json
16
+
17
+ from rich import box
18
+ from rich.console import Console
19
+ from rich.prompt import Prompt
20
+ from rich.markdown import Markdown
21
+ from rich.table import Table
22
+
23
+ from pyegeria import (
24
+ InvalidParameterException,
25
+ PropertyServerException,
26
+ UserNotAuthorizedException,
27
+ print_exception_response,
28
+ AssetCatalog,
29
+ ClassificationManager
30
+ )
31
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
32
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
33
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
34
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
35
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
36
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
37
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
38
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
39
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
40
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
41
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
42
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
43
+
44
+
45
+ disable_ssl_warnings = True
46
+
47
+
48
+ def display_certifications(search_string: str, server: str, url: str, username: str, user_password: str, time_out: int = 60,
49
+ jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
50
+ console = Console(width=width, force_terminal=not jupyter, soft_wrap=True)
51
+ if (search_string is None) or ((len(search_string) < 3)) and (search_string != '*'):
52
+ raise ValueError("Invalid Search String - must be greater than four characters long")
53
+ g_client = ClassificationManager(server, url, user_id=username,user_pwd=user_password )
54
+ token = g_client.create_egeria_bearer_token(username, user_password)
55
+
56
+
57
+ def generate_table(search_string:str = None) -> Table:
58
+ """Make a new table."""
59
+ table = Table(
60
+ title=f"Certifications Types @ {time.asctime()}",
61
+ header_style="white on dark_blue",
62
+ style="bold white on black",
63
+ row_styles=["bold white on black"],
64
+ title_style="bold white on black",
65
+ caption_style="white on black",
66
+ show_lines=True,
67
+ box=box.ROUNDED,
68
+ caption=f"View Server '{server}' @ Platform - {url}",
69
+ expand=True
70
+ )
71
+ table.add_column("Title", max_width=15)
72
+ table.add_column('summary')
73
+ table.add_column("domainID")
74
+ table.add_column("Unique Name")
75
+ table.add_column("Scope")
76
+ # table.add_column("Qualified Name",max_width=15)
77
+ table.add_column("Description")
78
+ table.add_column("Details")
79
+ table.add_column("Related Elements")
80
+
81
+
82
+ certs = g_client.get_elements(search_string, page_size=100, time_out=time_out)
83
+ if type(certs) is str:
84
+ return table
85
+
86
+ for element in certs:
87
+ properties = element['properties']
88
+ summary = properties.get('summary',"---")
89
+ domain = properties.get("domainIdentifier",'---')
90
+ unique_name = properties.get('qualifiedName','---')
91
+ scope = properties.get('scope','---')
92
+ description = properties.get('description','---')
93
+ details = properties.get('details','---')
94
+ title = properties.get('title','---')
95
+ cert_guid = element['elementHeader']['guid']
96
+
97
+ related = g_client.get_all_related_elements(cert_guid)
98
+ if (len(related) > 0) and (type(related) is list):
99
+ rel_md = ''
100
+ for rel in related:
101
+ rel_type = rel['relationshipHeader']['type']['typeName']
102
+ rel_element_props = rel['relatedElement']['properties']
103
+ rel_el_md = f"* Rel Type: {rel_type}\n"
104
+ for key in rel_element_props.keys():
105
+ rel_el_md += f"* {key}: {rel_element_props[key]}\n"
106
+ rel_md += f"----\n{rel_el_md}\n"
107
+ else:
108
+ rel_md = '---'
109
+
110
+ # match_tab = Table(expand=True)
111
+ # match_tab.add_column("Type Name")
112
+ # match_tab.add_column("GUID", no_wrap=True, width=36)
113
+ # match_tab.add_column("Properties")
114
+ #
115
+ # for match in nested:
116
+ # match_type_name = match['type']['typeName']
117
+ # matching_guid = match['guid']
118
+ # match_props = match['properties']
119
+ # match_details_md = ""
120
+ # for key in match_props.keys():
121
+ # match_details_md += f"* {key}: {match_props[key]}\n"
122
+ # match_details_out = Markdown(match_details_md)
123
+ # match_tab.add_row(match_type_name, matching_guid, match_details_out)
124
+
125
+
126
+ table.add_row(
127
+ title, summary, domain, unique_name,scope,description,details, rel_md
128
+ )
129
+
130
+ g_client.close_session()
131
+
132
+ return table
133
+
134
+ try:
135
+ # with Live(generate_table(), refresh_per_second=4, screen=True) as live:
136
+ # while True:
137
+ # time.sleep(2)
138
+ # live.update(generate_table())
139
+
140
+ with console.pager(styles=True):
141
+ console.print(generate_table(search_string), soft_wrap=True)
142
+
143
+
144
+ except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
145
+ console.print_exception()
146
+ sys.exit(1)
147
+
148
+ except ValueError as e:
149
+ console.print(f"\n\n====> Invalid Search String - must be greater than four characters long")
150
+ sys.exit(1)
151
+
152
+
153
+ def main():
154
+ parser = argparse.ArgumentParser()
155
+ parser.add_argument("--server", help="Name of the server to display status for")
156
+ parser.add_argument("--url", help="URL Platform to connect to")
157
+ parser.add_argument("--userid", help="User Id")
158
+ parser.add_argument("--password", help="User Password")
159
+ parser.add_argument("--time_out", help="Time Out")
160
+
161
+ args = parser.parse_args()
162
+
163
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
164
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
165
+ userid = args.userid if args.userid is not None else EGERIA_USER
166
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
167
+ time_out = args.time_out if args.time_out is not None else 60
168
+ try:
169
+ # search_string = Prompt.ask("Enter an asset search string:", default="*")
170
+ search_string = 'CertificationType'
171
+ display_certifications(search_string, server, url, userid, user_pass, time_out)
172
+ except(KeyboardInterrupt):
173
+ pass
174
+
175
+ if __name__ == "__main__":
176
+ main()
@@ -26,7 +26,7 @@ from pyegeria import (
26
26
  UserNotAuthorizedException,
27
27
  print_exception_response,
28
28
  )
29
- from pyegeria import ProjectManager
29
+ from pyegeria import ProjectManager, ClassificationManager
30
30
 
31
31
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
32
32
  EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
@@ -48,6 +48,7 @@ def display_project_list(project_name: str, server: str, url: str,
48
48
  width: int = EGERIA_WIDTH):
49
49
  p_client = ProjectManager(server, url, user_id=username)
50
50
  token = p_client.create_egeria_bearer_token(username, user_pass)
51
+ c_client = ClassificationManager(server, url, token)
51
52
 
52
53
  def generate_table(project_name: str) -> Table:
53
54
  """Make a new table."""
@@ -60,7 +61,7 @@ def display_project_list(project_name: str, server: str, url: str,
60
61
  expand=True
61
62
  )
62
63
 
63
- table.add_column("Display Name")
64
+ table.add_column("Project Name")
64
65
  table.add_column("Description")
65
66
 
66
67
  table.add_column("Classifications")
@@ -111,9 +112,25 @@ def display_project_list(project_name: str, server: str, url: str,
111
112
  additional_properties = project.get('additionalProperties')
112
113
  if additional_properties is not None:
113
114
  props = json.dumps(additional_properties)
115
+
116
+ governed_by = c_client.get_related_elements(guid,'GovernedBy')
117
+ if type(governed_by) is list:
118
+ for gov in governed_by:
119
+ rel_guid = gov['relatedElement']['elementHeader']['guid']
120
+ rel_title = gov['relatedElement']['properties'].get('title','---')
121
+ certified_partner= f"{rel_title}: \n"
122
+ certified = c_client.get_related_elements(rel_guid, "Certification")
123
+ if type(certified) is list:
124
+ for rel_elem in certified:
125
+ p_name = rel_elem['relatedElement']['properties']['name']
126
+ certified_partner += f"* {p_name}\n"
127
+ else:
128
+ certified_partner = "---"
129
+
130
+
114
131
  table.add_row(
115
132
  name, description, classification, qualified_name, identifier, phase, health, status, start,
116
- end, '---')
133
+ end, certified_partner)
117
134
 
118
135
  p_client.close_session()
119
136
  return table
@@ -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()