pyegeria 5.3.3.10.dev5__py3-none-any.whl → 5.3.3.10.dev7__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/__init__.py CHANGED
@@ -68,12 +68,13 @@ from .create_tech_guid_lists import build_global_guid_lists
68
68
  from .classification_manager_omvs import ClassificationManager
69
69
  from .feedback_manager_omvs import FeedbackManager
70
70
  from .metadata_explorer_omvs import MetadataExplorer
71
- from .mermaid_utilities import load_mermaid, render_mermaid, generate_process_graph, check_mermaid_version
71
+ from .mermaid_utilities import load_mermaid, render_mermaid, generate_process_graph
72
72
  from .egeria_my_client import EgeriaMy
73
73
  from .egeria_cat_client import EgeriaCat
74
74
  from .egeria_tech_client import EgeriaTech
75
75
  from .egeria_config_client import EgeriaConfig
76
76
  from .egeria_client import Egeria
77
+ from .solution_architect_omvs import SolutionArchitect
77
78
 
78
79
 
79
80
  #
pyegeria/_client.py CHANGED
@@ -10,6 +10,8 @@ import asyncio
10
10
  import inspect
11
11
  import json
12
12
  import os
13
+ from datetime import datetime
14
+
13
15
  from pyegeria import body_slimmer
14
16
  import httpx
15
17
  from httpx import AsyncClient, Response
@@ -469,7 +471,7 @@ class Client:
469
471
  msg = OMAGCommonErrorCode.CLIENT_SIDE_REST_API_ERROR.value[
470
472
  "message_template"
471
473
  ].format(
472
- str(response.status_code),
474
+ str(response.status_code) + " " + datetime.now().strftime("%H: %M: %S") ,
473
475
  caller_method,
474
476
  class_name,
475
477
  endpoint,
@@ -1547,6 +1547,8 @@ class ClassificationManager(Client):
1547
1547
  UserNotAuthorizedException
1548
1548
  the requesting user is not authorized to issue this request.
1549
1549
  """
1550
+ if property_value is '*':
1551
+ property_value = None
1550
1552
 
1551
1553
  possible_query_params = query_string(
1552
1554
  [
@@ -0,0 +1,207 @@
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 Information Supply Chains
7
+
8
+ """
9
+
10
+ import argparse
11
+ import os
12
+ from datetime import time
13
+
14
+ from rich import print, box
15
+ from rich.console import Console
16
+ from rich.markdown import Markdown
17
+ from rich.panel import Panel
18
+ from rich.prompt import Prompt
19
+ from rich.table import Table
20
+ from rich.tree import Tree
21
+ from pyegeria.solution_architect_omvs import SolutionArchitect
22
+ from pyegeria import (
23
+ ProjectManager,
24
+ UserNotAuthorizedException,
25
+ PropertyServerException,
26
+ InvalidParameterException, ClassificationManager, SolutionArchitect,
27
+ )
28
+ from pyegeria._exceptions import (
29
+ print_exception_response,
30
+ )
31
+
32
+ disable_ssl_warnings = True
33
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
34
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
35
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
36
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
37
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
38
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
39
+ )
40
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
41
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
42
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
43
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
44
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
45
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
46
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
47
+
48
+
49
+ def supply_chain_viewer(
50
+ search_string: str,
51
+ server_name: str,
52
+ platform_url: str,
53
+ user: str,
54
+ user_password: str,
55
+ jupyter: bool = EGERIA_JUPYTER,
56
+ width: int = EGERIA_WIDTH,
57
+ timeout: int = 30,
58
+ ):
59
+ """A Supply Chain viewer"""
60
+
61
+ def display_supply_chains(supply_chains: list[dict] ) -> Table:
62
+ table = Table(
63
+ title=f"Supply Chains matching {search_string} @ {time.asctime()}",
64
+ style="bright_white on black",
65
+ header_style="bright_white on dark_blue",
66
+ title_style="bold white on black",
67
+ caption_style="white on black",
68
+ show_lines=True,
69
+ box=box.ROUNDED,
70
+ caption=f"View Server '{server_name}' @ Platform - {platform_url}",
71
+ expand=True,
72
+ )
73
+ table.add_column("Supply Chain Name")
74
+ table.add_column("Qualified Name / GUID", width=38, no_wrap=True)
75
+ table.add_column("Purpose")
76
+ table.add_column("Scope")
77
+ table.add_column("Description")
78
+
79
+ for sc in supply_chains:
80
+ sc_name = sc["properties"].get("displayName", '---')
81
+ sc_qname = sc["elementHeader"]["qualifiedName"]
82
+ sc_guid = sc["elementHeader"]["guid"]
83
+ sc_purpose = sc["properties"].get("purposes",'---')
84
+ sc_scope = sc["properties"].get("scope",'---')
85
+ sc_desc = sc["properties"].get("description",'---')
86
+ sc_unique_name = f"\t{sc_qname}\n\t/\n\t{sc_guid}"
87
+ table.add_row(sc_name, sc_unique_name, sc_purpose, sc_scope, sc_desc)
88
+
89
+ return table
90
+
91
+
92
+ def walk_project_hierarchy(
93
+ project_client: ProjectManager,
94
+ project_name: str,
95
+ tree: Tree,
96
+ root: bool = False,
97
+ ) -> None:
98
+ """Recursively build a Tree with collection contents."""
99
+ t = None
100
+ style = "bright_white on black"
101
+
102
+ project = project_client.get_projects_by_name(project_name)
103
+ if type(project) is list:
104
+ proj_guid = project[0]["elementHeader"]["guid"]
105
+ proj_props = project[0]["properties"]
106
+
107
+ proj_type = proj_props.get("typeName", "---")
108
+ proj_unique = proj_props.get("qualifiedName", "---")
109
+ proj_identifier = proj_props.get("identifier", "---")
110
+ proj_name = proj_props.get("name", "---")
111
+ proj_desc = proj_props.get("description", "---")
112
+ proj_status = proj_props.get("projectStatus", "---")
113
+ proj_priority = proj_props.get("priority", "---")
114
+ proj_start = proj_props.get("startDate", "---")[:-10]
115
+ proj_props_md = (
116
+ f"* Name: {proj_name}\n"
117
+ f"* Identifier: {proj_identifier}\n"
118
+ f"* Type: {proj_type}\n"
119
+ f"* Status: {proj_status}\n"
120
+ f"* priority: {proj_priority}\n"
121
+ f"* Start: {proj_start}\n"
122
+ f"* Description: {proj_desc}\n"
123
+ f"* GUID: {proj_guid}"
124
+ )
125
+ else:
126
+ return
127
+
128
+ team = project_client.get_project_team(proj_guid)
129
+ member_md = ""
130
+ if type(team) is list:
131
+ for member in team:
132
+ member_guid = member["member"]["guid"]
133
+ member_unique = member["member"]["uniqueName"]
134
+ member_md += f"* Member Unique Name: {member_unique}\n* Member GUID: {member_guid}"
135
+ proj_props_md += f"\n### Team Members\n {member_md}"
136
+
137
+ proj_props_out = Markdown(proj_props_md)
138
+ p = Panel.fit(proj_props_out, style=style, title=project_name)
139
+ t = tree.add(p)
140
+
141
+ linked_projects = project_client.get_linked_projects(proj_guid)
142
+ if type(linked_projects) is list:
143
+ for proj in linked_projects:
144
+ child_md = ""
145
+ child_guid = proj["elementHeader"]["guid"]
146
+ child_name = proj["properties"]["name"]
147
+ relationship = proj["relatedElement"]["relationshipHeader"]["type"][
148
+ "typeName"
149
+ ]
150
+ if relationship != "ProjectDependency":
151
+ continue
152
+ walk_project_hierarchy(project_client, child_name, t)
153
+
154
+ else:
155
+ return t
156
+
157
+ try:
158
+ console = Console(width=width, force_terminal=not jupyter)
159
+ tree = Tree(
160
+ f"[bold bright green on black]Supply Chains containing: {search_string}", guide_style="bold bright_blue"
161
+ )
162
+ client = SolutionArchitect(server_name, platform_url, user, user_password)
163
+
164
+ token = client.create_egeria_bearer_token()
165
+
166
+ sc = client.find_all_information_supply_chains(search_string)
167
+
168
+ if (isinstance(sc, list)):
169
+ t = tree.add(display_supply_chains(sc))
170
+ else:
171
+ t = tree.add(type(sc))
172
+ # walk_project_hierarchy(p_client, root, tree, root=True)
173
+ print(tree)
174
+
175
+ except (
176
+ InvalidParameterException,
177
+ PropertyServerException,
178
+ UserNotAuthorizedException,
179
+ ) as e:
180
+ print_exception_response(e)
181
+
182
+
183
+ def main():
184
+ parser = argparse.ArgumentParser()
185
+
186
+ parser.add_argument("--server", help="Name of the server to display status for")
187
+ parser.add_argument("--url", help="URL Platform to connect to")
188
+ parser.add_argument("--userid", help="User Id")
189
+ parser.add_argument("--password", help="User Password")
190
+ args = parser.parse_args()
191
+
192
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
193
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
194
+ userid = args.userid if args.userid is not None else EGERIA_USER
195
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
196
+
197
+ try:
198
+ search_string = Prompt.ask(
199
+ "Enter a search string:", default="*"
200
+ )
201
+ supply_chain_viewer(search_string, server, url, userid, user_pass)
202
+ except KeyboardInterrupt:
203
+ pass
204
+
205
+
206
+ if __name__ == "__main__":
207
+ main()
@@ -81,7 +81,7 @@ def display_status(
81
81
  table.add_column("Description")
82
82
  table.add_column("Server Type")
83
83
  table.add_column("Last Started")
84
- token = p_client.create_egeria_bearer_token()
84
+
85
85
  platform_list = p_client.get_platforms_by_type()
86
86
  if type(platform_list) is str:
87
87
  print("No OMAG Server Platforms found?")
@@ -139,11 +139,14 @@ def display_status(
139
139
  "[red]Inactive" "" if status == "Inactive" else "[green]Active",
140
140
  # server_status,
141
141
  )
142
- # p_client.close_session()
142
+ p_client.refresh_egeria_bearer_token()
143
143
  return table
144
144
 
145
145
  try:
146
- with Live(generate_table(), refresh_per_second=4, screen=True) as live:
146
+ # with Live(generate_table(), refresh_per_second=1, screen=True) as live:
147
+ print(f" Started at {time.asctime()} \n")
148
+ with Live(generate_table(), refresh_per_second=4, screen=False, transient=False) as live:
149
+
147
150
  while True:
148
151
  time.sleep(5)
149
152
  live.update(generate_table())
@@ -43,23 +43,23 @@ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
43
43
 
44
44
 
45
45
  # Check Mermaid.js version
46
- def check_mermaid_version():
47
- """Check the version of Mermaid.js loaded in Jupyter Notebook"""
48
- display(HTML("""
49
- <script>
50
- function checkMermaid() {
51
- if (window.mermaid && typeof window.mermaid.version !== "undefined") {
52
- console.log("Mermaid.js version:", mermaid.version);
53
- alert("Mermaid.js version: " + mermaid.version);
54
- } else {
55
- console.warn("Mermaid.js is not loaded yet. Please ensure it's properly injected.");
56
- alert("Mermaid.js is not loaded yet. Please ensure it's properly injected.");
57
- }
58
- }
59
- // Delay execution to ensure Mermaid.js has had time to load
60
- setTimeout(checkMermaid, 1000);
61
- </script>
62
- """))
46
+ # def check_mermaid_version():
47
+ # """Check the version of Mermaid.js loaded in Jupyter Notebook"""
48
+ # display(HTML("""
49
+ # <script>
50
+ # function checkMermaid() {
51
+ # if (window.mermaid && typeof window.mermaid.version !== "undefined") {
52
+ # console.log("Mermaid.js version:", mermaid.version);
53
+ # alert("Mermaid.js version: " + mermaid.version);
54
+ # } else {
55
+ # console.warn("Mermaid.js is not loaded yet. Please ensure it's properly injected.");
56
+ # alert("Mermaid.js is not loaded yet. Please ensure it's properly injected.");
57
+ # }
58
+ # }
59
+ # // Delay execution to ensure Mermaid.js has had time to load
60
+ # setTimeout(checkMermaid, 1000);
61
+ # </script>
62
+ # """))
63
63
 
64
64
  # another site to get mermaid from is "https://cdnjs.cloudflare.com/ajax/libs/mermaid/11.4.1/mermaid.min.js";
65
65
  # below was:
@@ -489,49 +489,6 @@ class MetadataExplorer(Client):
489
489
  )
490
490
  return response
491
491
 
492
- # def get_metadata_element_mermaid_graph(
493
- # self,
494
- # guid: str,
495
- # effective_time: str = None,
496
- # as_of_time: str = None,
497
- # for_lineage: bool = None,
498
- # for_duplicate_processing: bool = None,
499
- # ) -> dict | str:
500
- # """
501
- # Retrieve the metadata element using its unique identifier.
502
- #
503
- # Parameters
504
- # ----------
505
- # guid : str
506
- # - unique identifier of the element to retrieve
507
- # effective_time: str, default = None
508
- # - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
509
- # as_of_time: str, default = None
510
- # - Query the element as of this time. If None, then use current time.
511
- # for_lineage: bool, default is set by server
512
- # - determines if elements classified as Memento should be returned - normally false
513
- # for_duplicate_processing: bool, default is set by server
514
- # - Normally false. Set true when the caller is part of a deduplication function
515
- #
516
- # Returns
517
- # -------
518
- # dict | str
519
- # If the element is found, a dict of the element details is returned. Otherwise the string "No element found".
520
- #
521
- # Raises
522
- # ------
523
- # InvalidParameterException
524
- # one of the parameters is null or invalid or
525
- # PropertyServerException
526
- # There is a problem adding the element properties to the metadata repository or
527
- # UserNotAuthorizedException
528
- # the requesting user is not authorized to issue this request.
529
- # """
530
- #
531
- # response = self.get_metadata_element_graph(
532
- # guid, effective_time, as_of_time, for_lineage, for_duplicate_processing
533
- # )
534
- # return response.get("mermaidGraph", NO_ELEMENTS_FOUND)
535
492
 
536
493
  async def _async_get_metadata_element_by_unique_name(
537
494
  self,
@@ -0,0 +1,639 @@
1
+ """PDX-License-Identifier: Apache-2.0
2
+ Copyright Contributors to the ODPi Egeria project.
3
+
4
+ This module provides access to the metadata-explorer OMVS module.
5
+
6
+ https://egeria-project.org/concepts/information-supply-chain
7
+
8
+ """
9
+
10
+ import asyncio
11
+
12
+ from httpx import Response
13
+
14
+ from pyegeria import body_slimmer
15
+ from pyegeria._client import Client, max_paging_size
16
+
17
+ NO_ELEMENTS_FOUND = "No Elements Found"
18
+
19
+ DEFAULT_BODY_SKELETON = {
20
+ 'effective_time' : None,
21
+ 'limitResultsByStatus' : ['ACTIVE'],
22
+ 'asOfTime' : None,
23
+ 'sequencingOrder' : None,
24
+ 'sequencingProperty' : None,
25
+ 'filter' : None
26
+ }
27
+
28
+ def query_seperator(current_string):
29
+ if current_string == "":
30
+ return "?"
31
+ else:
32
+ return "&"
33
+
34
+
35
+ "params are in the form of [(paramName, value), (param2Name, value)] if the value is not None, it will be added to the query string"
36
+
37
+
38
+ def query_string(params):
39
+ result = ""
40
+ for i in range(len(params)):
41
+ if params[i][1] is not None:
42
+ result = f"{result}{query_seperator(result)}{params[i][0]}={params[i][1]}"
43
+ return result
44
+
45
+
46
+ def base_path(client, view_server: str):
47
+ return f"{client.platform_url}/servers/{view_server}/api/open-metadata/metadata-explorer"
48
+
49
+
50
+ class SolutionArchitect(Client):
51
+ """SolutionArchitect is a class that extends the Client class. The Solution Architect OMVS provides APIs for
52
+ searching for architectural elements such as information supply chains, solution blueprints, solution components
53
+ and component implementations.
54
+
55
+ Attributes:
56
+
57
+ view_server: str
58
+ The name of the View Server to connect to.
59
+ platform_url : str
60
+ URL of the server platform to connect to
61
+ user_id : str
62
+ The identity of the user calling the method - this sets a
63
+ default optionally used by the methods when the user
64
+ doesn't pass the user_id on a method call.
65
+ user_pwd: str
66
+ The password associated with the user_id. Defaults to None
67
+
68
+
69
+ """
70
+
71
+ def __init__(
72
+ self,
73
+ view_server: str,
74
+ platform_url: str,
75
+ user_id: str = None,
76
+ user_pwd: str = None,
77
+ token: str = None,
78
+ ):
79
+ self.view_server = view_server
80
+ self.platform_url = platform_url
81
+ self.user_id = user_id
82
+ self.user_pwd = user_pwd
83
+ self.solution_architect_command_root: str = (f"{self.platform_url}/servers/{self.view_server}"
84
+ f"/api/open-metadata/solution-architect")
85
+ Client.__init__(
86
+ self,
87
+ view_server,
88
+ platform_url,
89
+ user_id=user_id,
90
+ user_pwd=user_pwd,
91
+ token=token,
92
+ )
93
+
94
+ #
95
+ #
96
+ #
97
+
98
+ async def _async_find_information_supply_chains(self,
99
+ filter: str = "*",
100
+ starts_with: bool = True,
101
+ ends_with: bool = False,
102
+ ignore_case: bool = False,
103
+ start_from: int = 0,
104
+ page_size: int = max_paging_size,
105
+ body: dict = None,) ->list[dict] | str:
106
+
107
+ """Retrieve the list of information supply chain metadata elements that contain the search string.
108
+ https://egeria-project.org/concepts/information-supply-chain
109
+ Async version.
110
+
111
+ Parameters
112
+ ----------
113
+ filter : str
114
+ - search_filter string to search for.
115
+ starts_with : bool, [default=False], optional
116
+ Starts with the supplied string.
117
+ ends_with : bool, [default=False], optional
118
+ Ends with the supplied string
119
+ ignore_case : bool, [default=False], optional
120
+ Ignore case when searching
121
+ body: dict, optional, default = None
122
+ - additional optional specifications for the search.
123
+
124
+ Returns
125
+ -------
126
+ list[dict] | str
127
+ A list of information supply chain structures or a string if there are no elements found.
128
+
129
+ Raises
130
+ ------
131
+ InvalidParameterException
132
+ one of the parameters is null or invalid or
133
+ PropertyServerException
134
+ There is a problem adding the element properties to the metadata repository or
135
+ UserNotAuthorizedException
136
+ the requesting user is not authorized to issue this request.
137
+ """
138
+
139
+ possible_query_params = query_string(
140
+ [
141
+ ("startFrom", start_from),
142
+ ("pageSize", page_size),
143
+ ("startsWith", starts_with),
144
+ ("endsWith", ends_with),
145
+ ("ignoreCase", ignore_case),
146
+ ]
147
+ )
148
+
149
+ if filter is None or filter == "*":
150
+ search_filter = None
151
+ else:
152
+ search_filter = filter
153
+
154
+ if body is None:
155
+ body = {
156
+ "filter": search_filter,
157
+ }
158
+ else:
159
+ body["filter"] = search_filter
160
+
161
+ url = (
162
+ f"{self.solution_architect_command_root}/information-supply-chains/by-search-string"
163
+ f"{possible_query_params}"
164
+ )
165
+ response: Response = await self._async_make_request(
166
+ "POST", url, body_slimmer(body)
167
+ )
168
+ return response.json().get("elements", NO_ELEMENTS_FOUND)
169
+
170
+ def find_information_supply_chains(self,
171
+ filter: str = "*",
172
+ starts_with: bool = True,
173
+ ends_with: bool = False,
174
+ ignore_case: bool = False,
175
+ start_from: int = 0,
176
+ page_size: int = max_paging_size,
177
+ body: dict = None) -> list[dict] | str:
178
+
179
+ """Retrieve the list of information supply chain metadata elements that contain the search string.
180
+ https://egeria-project.org/concepts/information-supply-chain
181
+
182
+ Parameters
183
+ ----------
184
+ filter: str
185
+ - search_filterstring to search for.
186
+ starts_with : bool, [default=False], optional
187
+ Starts with the supplied string.
188
+ ends_with : bool, [default=False], optional
189
+ Ends with the supplied string
190
+ ignore_case : bool, [default=False], optional
191
+ Ignore case when searching
192
+ body: dict, optional, default = None
193
+ - additional optional specifications for the search.
194
+
195
+ Returns
196
+ -------
197
+ list[dict] | str
198
+ A list of information supply chain structures or a string if there are no elements found.
199
+
200
+ Raises
201
+ ------
202
+ InvalidParameterException
203
+ one of the parameters is null or invalid or
204
+ PropertyServerException
205
+ There is a problem adding the element properties to the metadata repository or
206
+ UserNotAuthorizedException
207
+ the requesting user is not authorized to issue this request.
208
+ """
209
+
210
+ loop = asyncio.get_event_loop()
211
+ response = loop.run_until_complete(
212
+ self._async_find_information_supply_chains(
213
+ filter,
214
+ starts_with,
215
+ ends_with,
216
+ ignore_case,
217
+ start_from,
218
+ page_size,
219
+ body,)
220
+ )
221
+ return response
222
+
223
+
224
+ def find_all_information_supply_chains(self, start_from: int = 0, page_size: int = max_paging_size) \
225
+ -> list[dict] | str:
226
+ """Retrieve a list of all information supply chains
227
+ https://egeria-project.org/concepts/information-supply-chain
228
+ """
229
+
230
+ return (self.find_information_supply_chains('*', start_from = start_from, page_size = page_size ))
231
+
232
+
233
+
234
+ async def _async_find_solution_blueprints(self,
235
+ filter: str = "*",
236
+ starts_with: bool = True,
237
+ ends_with: bool = False,
238
+ ignore_case: bool = False,
239
+ start_from: int = 0,
240
+ page_size: int = max_paging_size,
241
+ body: dict = None,) ->list[dict] | str:
242
+
243
+ """Retrieve the solution blueprint elements that contain the search string.
244
+ https://egeria-project.org/concepts/solution-blueprint
245
+ Async version.
246
+
247
+ Parameters
248
+ ----------
249
+ filter: str
250
+ - search_filterstring to search for.
251
+ starts_with : bool, [default=False], optional
252
+ Starts with the supplied string.
253
+ ends_with : bool, [default=False], optional
254
+ Ends with the supplied string
255
+ ignore_case : bool, [default=False], optional
256
+ Ignore case when searching
257
+ body: dict, optional, default = None
258
+ - additional optional specifications for the search.
259
+
260
+ Returns
261
+ -------
262
+ list[dict] | str
263
+ A list of solution blueprint structures or a string if there are no elements found.
264
+
265
+ Raises
266
+ ------
267
+ InvalidParameterException
268
+ one of the parameters is null or invalid or
269
+ PropertyServerException
270
+ There is a problem adding the element properties to the metadata repository or
271
+ UserNotAuthorizedException
272
+ the requesting user is not authorized to issue this request.
273
+ """
274
+
275
+ possible_query_params = query_string(
276
+ [
277
+ ("startFrom", start_from),
278
+ ("pageSize", page_size),
279
+ ("startsWith", starts_with),
280
+ ("endsWith", ends_with),
281
+ ("ignoreCase", ignore_case),
282
+ ]
283
+ )
284
+
285
+ if filter is None or filter== "*":
286
+ search_filter = None
287
+ else:
288
+ search_filter = filter
289
+
290
+ if body is None:
291
+ body = {
292
+ "filter": search_filter,
293
+ }
294
+ else:
295
+ body["filter"] = search_filter
296
+
297
+ url = (
298
+ f"{self.solution_architect_command_root}/solution-blueprints/by-search-string"
299
+ f"{possible_query_params}"
300
+ )
301
+ response: Response = await self._async_make_request(
302
+ "POST", url, body_slimmer(body)
303
+ )
304
+ return response.json().get("elements", NO_ELEMENTS_FOUND)
305
+
306
+ def find_solution_blueprints(self,
307
+ filter: str = "*",
308
+ starts_with: bool = True,
309
+ ends_with: bool = False,
310
+ ignore_case: bool = False,
311
+ start_from: int = 0,
312
+ page_size: int = max_paging_size,
313
+ body: dict = None) -> list[dict] | str:
314
+
315
+ """Retrieve the list of solution blueprint elements that contain the search string.
316
+ https://egeria-project.org/concepts/solution-blueprint
317
+
318
+ Parameters
319
+ ----------
320
+ filter: str
321
+ - search_filterstring to search for.
322
+ starts_with : bool, [default=False], optional
323
+ Starts with the supplied string.
324
+ ends_with : bool, [default=False], optional
325
+ Ends with the supplied string
326
+ ignore_case : bool, [default=False], optional
327
+ Ignore case when searching
328
+ body: dict, optional, default = None
329
+ - additional optional specifications for the search.
330
+
331
+ Returns
332
+ -------
333
+ list[dict] | str
334
+ A list of information supply chain structures or a string if there are no elements found.
335
+
336
+ Raises
337
+ ------
338
+ InvalidParameterException
339
+ one of the parameters is null or invalid or
340
+ PropertyServerException
341
+ There is a problem adding the element properties to the metadata repository or
342
+ UserNotAuthorizedException
343
+ the requesting user is not authorized to issue this request.
344
+ """
345
+
346
+ loop = asyncio.get_event_loop()
347
+ response = loop.run_until_complete(
348
+ self._async_find_solution_blueprints(
349
+ filter,
350
+ starts_with,
351
+ ends_with,
352
+ ignore_case,
353
+ start_from,
354
+ page_size,
355
+ body,)
356
+ )
357
+ return response
358
+
359
+ def find_all_solution_blueprints(self, start_from: int = 0, page_size: int = max_paging_size) \
360
+ -> list[dict] | str:
361
+ """Retrieve a list of all solution blueprint elements
362
+ https://egeria-project.org/concepts/solution-blueprint
363
+ """
364
+ return (self.find_solution_blueprints('*', start_from = start_from, page_size = page_size ))
365
+
366
+
367
+ async def _async_find_solution_roles(self,
368
+ filter: str = "*",
369
+ starts_with: bool = True,
370
+ ends_with: bool = False,
371
+ ignore_case: bool = False,
372
+ start_from: int = 0,
373
+ page_size: int = max_paging_size,
374
+ body: dict = None,) ->list[dict] | str:
375
+
376
+ """Retrieve the solutio nrole elements that contain the search string.
377
+ https://egeria-project.org/concepts/actor
378
+ Async version.
379
+
380
+ Parameters
381
+ ----------
382
+ filter: str
383
+ - search_filterstring to search for.
384
+ starts_with : bool, [default=False], optional
385
+ Starts with the supplied string.
386
+ ends_with : bool, [default=False], optional
387
+ Ends with the supplied string
388
+ ignore_case : bool, [default=False], optional
389
+ Ignore case when searching
390
+ body: dict, optional, default = None
391
+ - additional optional specifications for the search.
392
+
393
+ Returns
394
+ -------
395
+ list[dict] | str
396
+ A list of solution role structures or a string if there are no elements found.
397
+
398
+ Raises
399
+ ------
400
+ InvalidParameterException
401
+ one of the parameters is null or invalid or
402
+ PropertyServerException
403
+ There is a problem adding the element properties to the metadata repository or
404
+ UserNotAuthorizedException
405
+ the requesting user is not authorized to issue this request.
406
+ """
407
+
408
+ possible_query_params = query_string(
409
+ [
410
+ ("startFrom", start_from),
411
+ ("pageSize", page_size),
412
+ ("startsWith", starts_with),
413
+ ("endsWith", ends_with),
414
+ ("ignoreCase", ignore_case),
415
+ ]
416
+ )
417
+
418
+ if filter is None or filter== "*":
419
+ search_filter = None
420
+ else:
421
+ search_filter = filter
422
+
423
+ if body is None:
424
+ body = {
425
+ "filter": search_filter,
426
+ }
427
+ else:
428
+ body["filter"] = search_filter
429
+
430
+ url = (
431
+ f"{self.solution_architect_command_root}/solution-roles/by-search-string"
432
+ f"{possible_query_params}"
433
+ )
434
+ response: Response = await self._async_make_request(
435
+ "POST", url, body_slimmer(body)
436
+ )
437
+ return response.json().get("elements", NO_ELEMENTS_FOUND)
438
+
439
+ def find_solution_roles(self,
440
+ filter: str = "*",
441
+ starts_with: bool = True,
442
+ ends_with: bool = False,
443
+ ignore_case: bool = False,
444
+ start_from: int = 0,
445
+ page_size: int = max_paging_size,
446
+ body: dict = None) -> list[dict] | str:
447
+
448
+ """Retrieve the list of solution role elements that contain the search string.
449
+ https://egeria-project.org/concepts/actor
450
+
451
+ Parameters
452
+ ----------
453
+ filter: str
454
+ - search_filterstring to search for.
455
+ starts_with : bool, [default=False], optional
456
+ Starts with the supplied string.
457
+ ends_with : bool, [default=False], optional
458
+ Ends with the supplied string
459
+ ignore_case : bool, [default=False], optional
460
+ Ignore case when searching
461
+ body: dict, optional, default = None
462
+ - additional optional specifications for the search.
463
+
464
+ Returns
465
+ -------
466
+ list[dict] | str
467
+ A list of information supply chain structures or a string if there are no elements found.
468
+
469
+ Raises
470
+ ------
471
+ InvalidParameterException
472
+ one of the parameters is null or invalid or
473
+ PropertyServerException
474
+ There is a problem adding the element properties to the metadata repository or
475
+ UserNotAuthorizedException
476
+ the requesting user is not authorized to issue this request.
477
+ """
478
+
479
+ loop = asyncio.get_event_loop()
480
+ response = loop.run_until_complete(
481
+ self._async_find_solution_roles(
482
+ filter,
483
+ starts_with,
484
+ ends_with,
485
+ ignore_case,
486
+ start_from,
487
+ page_size,
488
+ body,)
489
+ )
490
+ return response
491
+
492
+ def find_all_solution_roles(self, start_from: int = 0, page_size: int = max_paging_size) \
493
+ -> list[dict] | str:
494
+ """Retrieve a list of all solution blueprint elements
495
+ https://egeria-project.org/concepts/actor
496
+ """
497
+ return (self.find_solution_roles('*', start_from = start_from, page_size = page_size ))
498
+
499
+
500
+
501
+ async def _async_find_solution_components(self,
502
+ filter: str = "*",
503
+ starts_with: bool = True,
504
+ ends_with: bool = False,
505
+ ignore_case: bool = False,
506
+ start_from: int = 0,
507
+ page_size: int = max_paging_size,
508
+ body: dict = None,) ->list[dict] | str:
509
+
510
+ """Retrieve the solution component elements that contain the search string.
511
+ https://egeria-project.org/concepts/solution-components
512
+ Async version.
513
+
514
+ Parameters
515
+ ----------
516
+ filter: str
517
+ - search_filterstring to search for.
518
+ starts_with : bool, [default=False], optional
519
+ Starts with the supplied string.
520
+ ends_with : bool, [default=False], optional
521
+ Ends with the supplied string
522
+ ignore_case : bool, [default=False], optional
523
+ Ignore case when searching
524
+ body: dict, optional, default = None
525
+ - additional optional specifications for the search.
526
+
527
+ Returns
528
+ -------
529
+ list[dict] | str
530
+ A list of solution blueprint structures or a string if there are no elements found.
531
+
532
+ Raises
533
+ ------
534
+ InvalidParameterException
535
+ one of the parameters is null or invalid or
536
+ PropertyServerException
537
+ There is a problem adding the element properties to the metadata repository or
538
+ UserNotAuthorizedException
539
+ the requesting user is not authorized to issue this request.
540
+ """
541
+
542
+ possible_query_params = query_string(
543
+ [
544
+ ("startFrom", start_from),
545
+ ("pageSize", page_size),
546
+ ("startsWith", starts_with),
547
+ ("endsWith", ends_with),
548
+ ("ignoreCase", ignore_case),
549
+ ]
550
+ )
551
+
552
+ if filter is None or filter== "*":
553
+ search_filter = None
554
+ else:
555
+ search_filter = filter
556
+
557
+ if body is None:
558
+ body = {
559
+ "filter": search_filter,
560
+ }
561
+ else:
562
+ body["filter"] = search_filter
563
+
564
+ url = (
565
+ f"{self.solution_architect_command_root}/solution-components/by-search-string"
566
+ f"{possible_query_params}"
567
+ )
568
+ response: Response = await self._async_make_request(
569
+ "POST", url, body_slimmer(body)
570
+ )
571
+ return response.json().get("elements", NO_ELEMENTS_FOUND)
572
+
573
+ def find_solution_components(self,
574
+ filter: str = "*",
575
+ starts_with: bool = True,
576
+ ends_with: bool = False,
577
+ ignore_case: bool = False,
578
+ start_from: int = 0,
579
+ page_size: int = max_paging_size,
580
+ body: dict = None) -> list[dict] | str:
581
+
582
+ """Retrieve the list of solution component elements that contain the search string.
583
+ https://egeria-project.org/concepts/solution-components
584
+
585
+ Parameters
586
+ ----------
587
+ filter : str
588
+ - filter string to search for.
589
+ starts_with : bool, [default=False], optional
590
+ Starts with the supplied string.
591
+ ends_with : bool, [default=False], optional
592
+ Ends with the supplied string
593
+ ignore_case : bool, [default=False], optional
594
+ Ignore case when searching
595
+ body: dict, optional, default = None
596
+ - additional optional specifications for the search.
597
+
598
+ Returns
599
+ -------
600
+ list[dict] | str
601
+ A list of information supply chain structures or a string if there are no elements found.
602
+
603
+ Raises
604
+ ------
605
+ InvalidParameterException
606
+ one of the parameters is null or invalid or
607
+ PropertyServerException
608
+ There is a problem adding the element properties to the metadata repository or
609
+ UserNotAuthorizedException
610
+ the requesting user is not authorized to issue this request.
611
+ """
612
+
613
+ loop = asyncio.get_event_loop()
614
+ response = loop.run_until_complete(
615
+ self._async_find_solution_components(
616
+ filter,
617
+ starts_with,
618
+ ends_with,
619
+ ignore_case,
620
+ start_from,
621
+ page_size,
622
+ body,)
623
+ )
624
+ return response
625
+
626
+ def find_all_solution_components(self, start_from: int = 0, page_size: int = max_paging_size) \
627
+ -> list[dict] | str:
628
+ """Retrieve a list of all solution component elements
629
+ https://egeria-project.org/concepts/solution-components
630
+ """
631
+ return (self.find_solution_components('*', start_from = start_from, page_size = page_size ))
632
+
633
+
634
+
635
+
636
+
637
+
638
+ if __name__ == "__main__":
639
+ print("Main-Metadata Explorer")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyegeria
3
- Version: 5.3.3.10.dev5
3
+ Version: 5.3.3.10.dev7
4
4
  Summary: A python client for Egeria
5
5
  License: Apache 2.0
6
6
  Keywords: egeria,metadata,governance
@@ -1,14 +1,14 @@
1
1
  pyegeria/.DS_Store,sha256=NXvKqE04FGJAyq25tRApO9AJj14vF1vzFC-R0JjEWhc,6148
2
2
  pyegeria/README.md,sha256=PwX5OC7-YSZUCIsoyHh1O-WBM2hE84sm3Bd4O353NOk,1464
3
- pyegeria/__init__.py,sha256=tz1P5kqvvPpSUDWTTP6aFdi8jLc5lV5yWvlxjHddXtU,21970
4
- pyegeria/_client.py,sha256=9yZfSyLJqq5ORlM7NzeaozXjPX0i9YsfD2Ue3mN9Y9Q,30811
3
+ pyegeria/__init__.py,sha256=88x7BHHZ7iK3EoNUl-GaI4Lu_8PeLbpKhv1FrBQ87Rk,22002
4
+ pyegeria/_client.py,sha256=Hj8Tmo6DuKJPLROZrUw7NXzo7O_BgbewlvRwJZPKPBA,30889
5
5
  pyegeria/_deprecated_gov_engine.py,sha256=dWNcwVsE5__dF2u4QiIyQrssozzzOjBbLld8MdpmVCQ,17264
6
6
  pyegeria/_exceptions.py,sha256=NJ7vAhmvusK1ENvY2MMrBB6A6TgpYjzS9QJxFH56b8c,18470
7
7
  pyegeria/_globals.py,sha256=1Uc8392wjbiVN5L__RzxC1-U97RMXj77_iUsMSgeAjQ,638
8
8
  pyegeria/_validators.py,sha256=rnZelHJnjHaLZ8UhUTDyB59MfIUJifhALtkYoHBaos4,12736
9
9
  pyegeria/asset_catalog_omvs.py,sha256=OqZYjf5RBwuTbYvu43CL100VCNqYuXHDog2jc6sOBtA,25580
10
10
  pyegeria/automated_curation_omvs.py,sha256=fFZef1GeUNBSFIC8QltpzkQs_W5OD0xVYW1TzW07UWc,130239
11
- pyegeria/classification_manager_omvs.py,sha256=rHkcpzPeQqH1XmlbXnWtAJeG6mVMIL_N9ZGn13kR30U,187155
11
+ pyegeria/classification_manager_omvs.py,sha256=W1ShZyZ4nOJF_kZbGJR5cH3K5_z1Vg5h9f68Qc2zXLI,187223
12
12
  pyegeria/collection_manager_omvs.py,sha256=Zl3clg29bORkfBDunklgna0cIceF278njqzDW9pUJwk,101697
13
13
  pyegeria/commands/.DS_Store,sha256=9m3ajPPW2e7MhodsfTR2-KL9opdeTap-MlUAb3x9aR4,8196
14
14
  pyegeria/commands/README.md,sha256=hJdOWhZ5eCfwTkY4Tx6De6Y1XVo7cbaddQEvjqppvls,2036
@@ -41,6 +41,7 @@ pyegeria/commands/cat/__pycache__/list_user_ids.cpython-312.pyc,sha256=d03sLltHH
41
41
  pyegeria/commands/cat/exp_list_glossaries.py,sha256=HxMa5r7XxsH29KJ9GLOqIXD_PpUvrzsHe41LBWCZUTc,5811
42
42
  pyegeria/commands/cat/get_asset_graph.py,sha256=tHTib3AjbXzrGkOHE2SO51O_ARPjmmDq1UDbE8XSd7o,12454
43
43
  pyegeria/commands/cat/get_collection.py,sha256=ukUZA4Ot_Gjaym6LmFiWoGezshbcygJPowwHLooVHck,5359
44
+ pyegeria/commands/cat/get_information_supply_chains.py,sha256=aXYmQ8tTY1NYCrFRM0K4-ui1vtkTB1UGTGZKaRNLTmc,7626
44
45
  pyegeria/commands/cat/get_project_dependencies.py,sha256=NCUTAHAzScjQwoAHLf1DC9rGPg53VfjaTR96eahgjq8,5988
45
46
  pyegeria/commands/cat/get_project_structure.py,sha256=h6q5Ps3xRhV2Zqh6295nDCgVThUrWX5O-JC0qaSIM5s,5976
46
47
  pyegeria/commands/cat/get_tech_type_elements.py,sha256=9F0wBy8ireLFHLNChxkM4A7xJ4uFL4XKdXlm6roDk2I,6185
@@ -233,7 +234,7 @@ pyegeria/commands/ops/monitor_gov_eng_status.py,sha256=nSPZscEFnlljaA4AMNQqhY2Sy
233
234
  pyegeria/commands/ops/monitor_integ_daemon_status.py,sha256=1HPJHIrBIohJPPw0wHae2rvGgLSmgMgucRujcug5Qwk,11768
234
235
  pyegeria/commands/ops/monitor_platform_status.py,sha256=J_DdUDWv2FtY9DeJamdnWJmFK6Ua9L1GU_yFvb-zcTc,7180
235
236
  pyegeria/commands/ops/monitor_server_startup.py,sha256=bvLqxoRiw9tJzNtChZ70a5w_23UyJLlrlmbMnmZ5QN4,3908
236
- pyegeria/commands/ops/monitor_server_status.py,sha256=ZEi4HUSXVgN0z25dvfIRiY6V6kARsaz7daz9uG0RKbA,7005
237
+ pyegeria/commands/ops/monitor_server_status.py,sha256=WtxI34FVPDxF74VpHUNQ_sdzdMMi3wn62-rFOQHKYDY,7115
237
238
  pyegeria/commands/ops/orig_monitor_server_list.py,sha256=tHGigEuUVZ8OA4ut5UscYK9HHeQevQ_MlIkE4XHYER8,4644
238
239
  pyegeria/commands/ops/orig_monitor_server_status.py,sha256=povaYQ-Y8QJvwaFuWp_BLUThjjTTbmu-21h7zi8NlWk,4026
239
240
  pyegeria/commands/ops/refresh_integration_daemon.py,sha256=aOIy7xsYfNwuiZ-8aXcd2RoRaBkakYQF5JPIWz1dlxE,2969
@@ -292,20 +293,21 @@ pyegeria/feedback_manager_omvs.py,sha256=B66e3ZCaC_dirb0mcb2Nz3PYh2ZKsoMAYNOb3eu
292
293
  pyegeria/full_omag_server_config.py,sha256=k3fUfopAFAE3OKkFR7zZPiki_FYj6j2xQ4oD2SVaefQ,47350
293
294
  pyegeria/glossary_browser_omvs.py,sha256=NcitYaZJqwVODBO5zBtWpXPNUJJ3DKzEbRaOFSAyUlg,93554
294
295
  pyegeria/glossary_manager_omvs.py,sha256=tBjoHrrHJLasXoeQSpW-KpF3vEQdN_GR3jfcceTjt_c,132444
295
- pyegeria/mermaid_utilities.py,sha256=iHsLYJ4VBER71HnVn1K4FRDyZRGnlwwyAdZXphpnjC4,9898
296
- pyegeria/metadata_explorer_omvs.py,sha256=WwkFvAnDzJTw8dPos7j3wCG6gpQ0BjcMmYXl-ckjn28,88723
296
+ pyegeria/mermaid_utilities.py,sha256=O5qNAWZSiIWoti8SU16Hh6xhtA-CdIiZuZ_Qr7JJ9NQ,9932
297
+ pyegeria/metadata_explorer_omvs.py,sha256=XBg6q-JXOA8UYsT85nlpBVe4EQ6jxwj70MvE7tkVvH0,86905
297
298
  pyegeria/my_profile_omvs.py,sha256=DyECbUFEcgokrIbzdMMNljC3bqfqKGXAF2wZEpzvRYs,34666
298
299
  pyegeria/platform_services.py,sha256=CJIOYIFEbcIGwdWlApAQcXxZTsdrhFtpJcm4O3p7dG0,41646
299
300
  pyegeria/project_manager_omvs.py,sha256=Y7Lyqh4jIujJrr_Ub7feo904FN_uz4R10T4hKhqE1Uw,67499
300
301
  pyegeria/registered_info.py,sha256=y0-LgDIQXpph0lEWxIOG3_HsqX_Z2iAIb3xu4Aa4B70,6344
301
302
  pyegeria/runtime_manager_omvs.py,sha256=sZfxgM7zVfryVsun5GwDpUT5htap91ZoZLNU7wspWm4,79575
302
303
  pyegeria/server_operations.py,sha256=PfH0wvWCOr43ezJAAXj7VEUdT0x_oTrfr0dzzQvcQk4,16766
304
+ pyegeria/solution_architect_omvs.py,sha256=MHsWBgrYfwPSCoWZ_50MJJ_htNWMOZrkR0YyFzFjqtE,23141
303
305
  pyegeria/template_manager_omvs.py,sha256=Sw5xsQAhy7a48xFCg59mg9_nqyhawoS9v4WyF-PjPqM,42425
304
306
  pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
305
307
  pyegeria/valid_metadata_omvs.py,sha256=cCt5CCLv6BdzCu90n68r_PkG_PEQJjrtwCxio7K6yko,65034
306
308
  pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
307
- pyegeria-5.3.3.10.dev5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
308
- pyegeria-5.3.3.10.dev5.dist-info/METADATA,sha256=W203LpGyogogb8Zq5ekI88NvIqpHNjCRu1ekEjAlw1w,2741
309
- pyegeria-5.3.3.10.dev5.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
310
- pyegeria-5.3.3.10.dev5.dist-info/entry_points.txt,sha256=sqVSCsr2oVnXtKTgRs5_F9OjbtexhmaXE330sO8V9bk,5873
311
- pyegeria-5.3.3.10.dev5.dist-info/RECORD,,
309
+ pyegeria-5.3.3.10.dev7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
310
+ pyegeria-5.3.3.10.dev7.dist-info/METADATA,sha256=345cHQkEVhyO-WCImF98k_7Umsy_cIPrWwOsLrEB3xU,2741
311
+ pyegeria-5.3.3.10.dev7.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
312
+ pyegeria-5.3.3.10.dev7.dist-info/entry_points.txt,sha256=sqVSCsr2oVnXtKTgRs5_F9OjbtexhmaXE330sO8V9bk,5873
313
+ pyegeria-5.3.3.10.dev7.dist-info/RECORD,,