pyegeria 5.3.1.dev1__py3-none-any.whl → 5.3.3__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 (92) hide show
  1. pyegeria/.DS_Store +0 -0
  2. pyegeria/_client.py +1 -1
  3. pyegeria/automated_curation_omvs.py +1 -1
  4. pyegeria/classification_manager_omvs.py +4 -4
  5. pyegeria/commands/.DS_Store +0 -0
  6. pyegeria/commands/cat/exp_list_glossaries.py +1 -1
  7. pyegeria/commands/cat/get_asset_graph.py +1 -1
  8. pyegeria/commands/cat/get_collection.py +1 -1
  9. pyegeria/commands/cat/get_project_dependencies.py +1 -1
  10. pyegeria/commands/cat/get_project_structure.py +1 -1
  11. pyegeria/commands/cat/get_tech_type_elements.py +1 -1
  12. pyegeria/commands/cat/glossary_actions.py +3 -4
  13. pyegeria/commands/cat/list_assets.py +1 -1
  14. pyegeria/commands/cat/list_cert_types.py +1 -1
  15. pyegeria/commands/cat/list_collections.py +1 -1
  16. pyegeria/commands/cat/list_deployed_catalogs.py +1 -1
  17. pyegeria/commands/cat/list_deployed_database_schemas.py +1 -1
  18. pyegeria/commands/cat/list_deployed_databases.py +1 -1
  19. pyegeria/commands/cat/list_glossaries.py +1 -1
  20. pyegeria/commands/cat/list_projects.py +1 -1
  21. pyegeria/commands/cat/list_servers_deployed_imp.py +1 -1
  22. pyegeria/commands/cat/list_tech_type_elements.py +1 -1
  23. pyegeria/commands/cat/list_tech_types.py +1 -1
  24. pyegeria/commands/cat/list_terms.py +1 -1
  25. pyegeria/commands/cat/list_todos.py +1 -1
  26. pyegeria/commands/cat/list_user_ids.py +1 -1
  27. pyegeria/commands/cli/egeria.py +221 -85
  28. pyegeria/commands/cli/egeria_cat.py +3 -21
  29. pyegeria/commands/cli/egeria_login_tui.py +1 -1
  30. pyegeria/commands/cli/egeria_my.py +10 -0
  31. pyegeria/commands/cli/egeria_ops.py +19 -9
  32. pyegeria/commands/cli/egeria_tech.py +258 -139
  33. pyegeria/commands/cli/ops_config.py +0 -1
  34. pyegeria/commands/doc/.DS_Store +0 -0
  35. pyegeria/commands/doc/Visual Command Reference/.DS_Store +0 -0
  36. pyegeria/commands/doc/Visual Command Reference/cat/.DS_Store +0 -0
  37. pyegeria/commands/doc/Visual Command Reference/cat/show/.DS_Store +0 -0
  38. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/.DS_Store +0 -0
  39. pyegeria/commands/doc/glossary/.DS_Store +0 -0
  40. pyegeria/commands/doc/glossary/images/.DS_Store +0 -0
  41. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/.DS_Store +0 -0
  42. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/.DS_Store +0 -0
  43. pyegeria/commands/my/list_my_profile.py +1 -1
  44. pyegeria/commands/my/list_my_roles.py +1 -1
  45. pyegeria/commands/my/monitor_my_todos.py +1 -1
  46. pyegeria/commands/my/monitor_open_todos.py +1 -1
  47. pyegeria/commands/my/todo_actions.py +1 -1
  48. pyegeria/commands/ops/list_archives.py +1 -1
  49. pyegeria/commands/ops/list_catalog_targets.py +1 -1
  50. pyegeria/commands/ops/load_archive.py +1 -1
  51. pyegeria/commands/ops/monitor_asset_events.py +1 -1
  52. pyegeria/commands/ops/monitor_engine_activity.py +1 -1
  53. pyegeria/commands/ops/monitor_gov_eng_status.py +1 -1
  54. pyegeria/commands/ops/monitor_integ_daemon_status.py +10 -10
  55. pyegeria/commands/ops/monitor_platform_status.py +1 -1
  56. pyegeria/commands/ops/monitor_server_startup.py +1 -1
  57. pyegeria/commands/ops/monitor_server_status.py +1 -1
  58. pyegeria/commands/ops/orig_monitor_server_list.py +1 -1
  59. pyegeria/commands/ops/orig_monitor_server_status.py +1 -1
  60. pyegeria/commands/ops/refresh_integration_daemon.py +1 -1
  61. pyegeria/commands/ops/restart_integration_daemon.py +1 -1
  62. pyegeria/commands/ops/table_integ_daemon_status.py +1 -1
  63. pyegeria/commands/tech/get_element_info.py +1 -1
  64. pyegeria/commands/tech/get_guid_info.py +1 -1
  65. pyegeria/commands/tech/get_tech_details.py +1 -1
  66. pyegeria/commands/tech/get_tech_type_template.py +1 -1
  67. pyegeria/commands/tech/{list_elements.py → list_all_om_type_elements.py} +2 -2
  68. pyegeria/commands/tech/{list_elements_x.py → list_all_om_type_elements_x.py} +2 -2
  69. pyegeria/commands/tech/{list_related_elements.py → list_all_related_elements.py} +1 -1
  70. pyegeria/commands/tech/list_anchored_elements.py +1 -1
  71. pyegeria/commands/tech/list_asset_types.py +1 -1
  72. pyegeria/commands/tech/list_elements_by_classification_by_property_value.py +186 -0
  73. pyegeria/commands/tech/list_elements_by_property_value.py +175 -0
  74. pyegeria/commands/tech/list_elements_by_property_value_x.py +196 -0
  75. pyegeria/commands/tech/list_elements_for_classification.py +1 -1
  76. pyegeria/commands/tech/list_gov_action_processes.py +1 -1
  77. pyegeria/commands/tech/list_registered_services.py +1 -1
  78. pyegeria/commands/tech/list_related_elements_with_prop_value.py +207 -0
  79. pyegeria/commands/tech/list_related_specification.py +1 -1
  80. pyegeria/commands/tech/list_relationship_types.py +1 -1
  81. pyegeria/commands/tech/list_relationships.py +1 -1
  82. pyegeria/commands/tech/list_tech_templates.py +1 -1
  83. pyegeria/commands/tech/list_valid_metadata_values.py +1 -1
  84. pyegeria/commands/tech/table_tech_templates.py +1 -1
  85. pyegeria/commands/tech/x_list_related_elements.py +1 -1
  86. pyegeria/mermaid_utilities.py +1 -1
  87. pyegeria/valid_metadata_omvs.py +1 -1
  88. {pyegeria-5.3.1.dev1.dist-info → pyegeria-5.3.3.dist-info}/METADATA +10 -10
  89. {pyegeria-5.3.1.dev1.dist-info → pyegeria-5.3.3.dist-info}/RECORD +92 -77
  90. {pyegeria-5.3.1.dev1.dist-info → pyegeria-5.3.3.dist-info}/entry_points.txt +7 -2
  91. {pyegeria-5.3.1.dev1.dist-info → pyegeria-5.3.3.dist-info}/LICENSE +0 -0
  92. {pyegeria-5.3.1.dev1.dist-info → pyegeria-5.3.3.dist-info}/WHEEL +0 -0
@@ -0,0 +1,196 @@
1
+ """List elements """
2
+ from rich.markdown import Markdown
3
+ from rich.prompt import Prompt
4
+ import os
5
+ import argparse
6
+ import time
7
+ import sys
8
+ from rich import box
9
+ from rich.console import Console
10
+ from rich.table import Table
11
+
12
+ from pyegeria import (
13
+ InvalidParameterException,
14
+ PropertyServerException,
15
+ UserNotAuthorizedException,
16
+ print_exception_response,
17
+ EgeriaTech,
18
+ )
19
+
20
+
21
+ console = Console()
22
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
23
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
24
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
25
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
26
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
27
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
28
+ )
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
+
38
+ def find_elements_by_prop_value_x(
39
+ om_type: str,
40
+ property_value: str,
41
+ property_names: [str],
42
+ server: str,
43
+ url: str,
44
+ username: str,
45
+ password: str,
46
+ jupyter: bool = EGERIA_JUPYTER,
47
+ width: int = EGERIA_WIDTH,
48
+ ):
49
+ c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
50
+ token = c_client.create_egeria_bearer_token()
51
+
52
+ om_typedef = c_client.get_typedef_by_name(om_type)
53
+ if type(om_typedef) is str:
54
+ print(
55
+ f"The type name '{om_type}' is not known to the Egeria platform at {url} - {server}"
56
+ )
57
+ sys.exit(1)
58
+ elements = c_client.find_elements_by_property_value(property_value, property_names,
59
+ om_type
60
+ )
61
+
62
+ def generate_table() -> Table:
63
+ """Make a new table."""
64
+ table = Table(
65
+ caption=f"Metadata Elements for: {url} - {server} @ {time.asctime()}",
66
+ style="bold bright_white on black",
67
+ row_styles=["bold bright_white on black"],
68
+ header_style="white on dark_blue",
69
+ title_style="bold bright_white on black",
70
+ caption_style="white on black",
71
+ show_lines=True,
72
+ box=box.ROUNDED,
73
+ title=f"Find Elements for Open Metadata Type: {om_type}, property value: {property_value}, "
74
+ f"properties: {property_names} - Extended",
75
+ expand=True,
76
+ width=width,
77
+ )
78
+
79
+ table.add_column("Qualified Name")
80
+ table.add_column("Type")
81
+ table.add_column("Created")
82
+ table.add_column("Home Store")
83
+ table.add_column("GUID", width=38, no_wrap=True)
84
+ table.add_column("Properties")
85
+ table.add_column("Feedback", min_width=30)
86
+ table.add_column("Public Comments")
87
+
88
+ if type(elements) is list:
89
+ for element in elements:
90
+ header = element["elementHeader"]
91
+ el_q_name = element["properties"].get("qualifiedName", "---")
92
+ el_type = header["type"]["typeName"]
93
+ el_home = header["origin"]["homeMetadataCollectionName"]
94
+ el_create_time = header["versions"]["createTime"][:-18]
95
+ el_guid = header["guid"]
96
+
97
+ el_props_md = ""
98
+ for prop in element["properties"].keys():
99
+ el_props_md += f"* **{prop}**: {element['properties'][prop]}\n"
100
+
101
+ el_props_out = Markdown(el_props_md)
102
+
103
+ tags = c_client.get_attached_tags(el_guid)
104
+ tags_md = "Tags:\n"
105
+ if type(tags) is list:
106
+ for tag in tags:
107
+ tags_md += (
108
+ f"* tag: {tag.get('name','')}\n"
109
+ f"\t description: {tag.get('description','---')}\n"
110
+ f"\t assigned by: {tag.get('user','---')}\n"
111
+ )
112
+
113
+ else:
114
+ tags_md = ""
115
+
116
+ likes = c_client.get_attached_likes(el_guid)
117
+ likes_md = "Likes:\b"
118
+ if type(likes) is list:
119
+ for like in likes:
120
+ likes_md += (
121
+ f"* tag: {like['name']}\n"
122
+ f"* description: {like['description']}\n"
123
+ f"* assigned by: {like['user']}\n"
124
+ f"\n"
125
+ )
126
+
127
+ else:
128
+ likes_md = ""
129
+
130
+ if len(tags_md) > 0 and len(likes_md) > 0:
131
+ feedback_out = f"{tags_md}\n --- \n{likes_md}"
132
+ else:
133
+ feedback_out = ""
134
+
135
+ comments_out = " "
136
+
137
+ table.add_row(
138
+ el_q_name,
139
+ el_type,
140
+ el_create_time,
141
+ el_home,
142
+ el_guid,
143
+ el_props_out,
144
+ feedback_out,
145
+ comments_out,
146
+ )
147
+
148
+ return table
149
+ else:
150
+ print("No instances found")
151
+ sys.exit(1)
152
+
153
+ try:
154
+ console = Console(width=width, force_terminal=not jupyter)
155
+
156
+ with console.pager(styles=True):
157
+ console.print(generate_table())
158
+
159
+ except (
160
+ InvalidParameterException,
161
+ PropertyServerException,
162
+ UserNotAuthorizedException,
163
+ ) as e:
164
+ print_exception_response(e)
165
+ print("\n\nPerhaps the type name isn't known")
166
+ finally:
167
+ c_client.close_session()
168
+
169
+
170
+ def main():
171
+ parser = argparse.ArgumentParser()
172
+ parser.add_argument("--server", help="Name of the server to display status for")
173
+ parser.add_argument("--url", help="URL Platform to connect to")
174
+ parser.add_argument("--userid", help="User Id")
175
+ parser.add_argument("--password", help="Password")
176
+
177
+ args = parser.parse_args()
178
+
179
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
180
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
181
+ userid = args.userid if args.userid is not None else EGERIA_USER
182
+ password = args.password if args.password is not None else EGERIA_USER_PASSWORD
183
+
184
+ try:
185
+ om_type = Prompt.ask(
186
+ "Enter the Open Metadata Type to find elements of", default="GlossaryTerm"
187
+ )
188
+ property_value = Prompt.ask("Enter the property value to search for")
189
+ property_names = Prompt.ask("Enter a comma seperated list of properties to search")
190
+ find_elements_by_prop_value_x(om_type, property_value,[property_names], server, url, userid, password)
191
+ except KeyboardInterrupt:
192
+ pass
193
+
194
+
195
+ if __name__ == "__main__":
196
+ main()
@@ -22,7 +22,7 @@ console = Console()
22
22
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
23
23
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
24
24
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
25
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
25
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
26
26
  EGERIA_VIEW_SERVER_URL = os.environ.get(
27
27
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
28
28
  )
@@ -30,7 +30,7 @@ from pyegeria import ValidMetadataManager
30
30
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
31
31
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
32
32
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
33
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
33
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
34
34
  EGERIA_VIEW_SERVER_URL = os.environ.get(
35
35
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
36
36
  )
@@ -27,7 +27,7 @@ from pyegeria import (
27
27
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
28
28
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
29
29
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
30
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
30
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
31
31
  EGERIA_VIEW_SERVER_URL = os.environ.get(
32
32
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
33
33
  )
@@ -0,0 +1,207 @@
1
+ """This finds all elements related to the specified element by the specified relationship type,
2
+ that match the property value for the properties specified"""
3
+ from jedi import Project
4
+ from rich.markdown import Markdown
5
+ from rich.prompt import Prompt
6
+ import os
7
+ import argparse
8
+ import time
9
+ import sys
10
+ from rich import box
11
+ from rich.console import Console
12
+ from rich.table import Table
13
+
14
+ from pyegeria import (
15
+ InvalidParameterException,
16
+ PropertyServerException,
17
+ UserNotAuthorizedException,
18
+ print_exception_response,
19
+ EgeriaTech,
20
+ )
21
+
22
+ console = Console()
23
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
24
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
25
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
26
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
27
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
28
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
29
+ )
30
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
31
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
32
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
33
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
34
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
35
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
36
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "220"))
37
+
38
+
39
+ def list_related_elements_with_prop_value(
40
+ element_guid: str,
41
+ relationship_type: str,
42
+ property_value: str,
43
+ property_names: [str],
44
+ om_type: str,
45
+ server: str,
46
+ url: str,
47
+ username: str,
48
+ password: str,
49
+ jupyter: bool = EGERIA_JUPYTER,
50
+ width: int = EGERIA_WIDTH,
51
+ ):
52
+ c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
53
+ token = c_client.create_egeria_bearer_token()
54
+
55
+ if om_type is not None:
56
+ om_typedef = c_client.get_typedef_by_name(om_type)
57
+ if type(om_typedef) is str:
58
+ print(
59
+ f"The type name '{om_type}' is not known to the Egeria platform at {url} - {server}"
60
+ )
61
+ sys.exit(1)
62
+
63
+ def generate_table() -> Table:
64
+ """Make a new table."""
65
+ table = Table(
66
+ caption=f"Metadata Elements for: {url} - {server} @ {time.asctime()}",
67
+ style="bold bright_white on black",
68
+ row_styles=["bold bright_white on black"],
69
+ header_style="white on dark_blue",
70
+ title_style="bold bright_white on black",
71
+ caption_style="white on black",
72
+ show_lines=True,
73
+ box=box.ROUNDED,
74
+ title=f"Elements related to: '{element_guid}' ",
75
+ expand=True,
76
+ # width=500
77
+ )
78
+ table.add_column("Relationship GUID", width=38, no_wrap=True)
79
+ table.add_column("Rel Header", width=38, no_wrap=True)
80
+ table.add_column("Relationship Props")
81
+ table.add_column("Related GUID", width=38, no_wrap=True)
82
+ table.add_column("Properties")
83
+ table.add_column("Element Header")
84
+
85
+ elements = c_client.get_related_elements(
86
+ element_guid, relationship_type, om_type
87
+ )
88
+
89
+ if type(elements) is list:
90
+ for element in elements:
91
+ header = element["relationshipHeader"]
92
+ el_type = header["type"]["typeName"]
93
+ el_home = header["origin"]["homeMetadataCollectionName"]
94
+ el_create_time = header["versions"]["createTime"][:-10]
95
+ el_guid = header["guid"]
96
+ el_class = header.get("classifications", "---")
97
+ rel_header_md = (
98
+ f"* Type: {el_type}\n"
99
+ f"* Home: {el_home}\n"
100
+ f"* Created: {el_create_time}\n"
101
+ )
102
+ rel_header_out = Markdown(rel_header_md)
103
+ rel_props = element.get("relationshipProperties", "---")
104
+
105
+ rel_props_md = ""
106
+ if type(rel_props) is list:
107
+ for prop in rel_props.keys():
108
+ rel_props_md += (
109
+ f"* **{prop}**: {element['relationshipProperties'][prop]}\n"
110
+ )
111
+ rel_props_out = Markdown(rel_props_md)
112
+
113
+ c_md = ""
114
+ if type(el_class) is list:
115
+ for classification in el_class:
116
+ classification_name = classification.get(
117
+ "classificationName", "---"
118
+ )
119
+ c_md = f"* **{classification_name}**\n"
120
+ class_props = classification.get(
121
+ "classificationProperties", "---"
122
+ )
123
+ if type(class_props) is dict:
124
+ for prop in class_props.keys():
125
+ c_md += f" * **{prop}**: {class_props[prop]}\n"
126
+ c_md_out = Markdown(c_md)
127
+
128
+ rel_element = element["relatedElement"]
129
+ rel_el_header = rel_element["elementHeader"]
130
+ rel_type = rel_el_header["type"]["typeName"]
131
+ rel_home = rel_el_header["origin"]["homeMetadataCollectionName"]
132
+ rel_guid = rel_el_header["guid"]
133
+
134
+ rel_el_header_md = f"* Type: {rel_type}\n" f"* Home: {rel_home}\n"
135
+ rel_el_header_out = Markdown(rel_el_header_md)
136
+
137
+ rel_el_props_md = ""
138
+ for prop in rel_element["properties"].keys():
139
+ rel_el_props_md += (
140
+ f"* **{prop}**: {rel_element['properties'][prop]}\n"
141
+ )
142
+ rel_el_props_out = Markdown(rel_el_props_md)
143
+
144
+ table.add_row(
145
+ el_guid,
146
+ rel_header_out,
147
+ rel_props_out,
148
+ # el_q_name,
149
+ rel_guid,
150
+ rel_el_props_out,
151
+ rel_el_header_out,
152
+ )
153
+
154
+ return table
155
+ else:
156
+ print("No instances found")
157
+ sys.exit(1)
158
+
159
+ try:
160
+ console = Console(width=width, force_terminal=not jupyter)
161
+
162
+ with console.pager(styles=True):
163
+ console.print(generate_table())
164
+
165
+ except (
166
+ InvalidParameterException,
167
+ PropertyServerException,
168
+ UserNotAuthorizedException,
169
+ ) as e:
170
+ print_exception_response(e)
171
+ print("\n\nPerhaps the type name isn't known")
172
+ finally:
173
+ c_client.close_session()
174
+
175
+
176
+ def main():
177
+ parser = argparse.ArgumentParser()
178
+ parser.add_argument("--server", help="Name of the server to display status for")
179
+ parser.add_argument("--url", help="URL Platform to connect to")
180
+ parser.add_argument("--userid", help="User Id")
181
+ parser.add_argument("--password", help="Password")
182
+
183
+ args = parser.parse_args()
184
+
185
+ server = args.server.strip() if args.server is not None else EGERIA_VIEW_SERVER
186
+ url = args.url.strip if args.url is not None else EGERIA_PLATFORM_URL
187
+ userid = args.userid.strip() if args.userid is not None else EGERIA_USER
188
+ password = args.password.strip() if args.password is not None else EGERIA_USER_PASSWORD
189
+
190
+ try:
191
+ element_guid = Prompt.ask("Guid of base element").strip()
192
+ relationship_type = Prompt.ask("Enter the relationship type to follow").strip()
193
+ property_value = Prompt.ask("Enter the property value to search for").strip()
194
+ property_names = Prompt.ask("Enter a comma seperated list of properties to search").strip()
195
+ om_type = Prompt.ask(
196
+ "Enter the Open Metadata Type to find elements of", default=None
197
+ )
198
+ om_type = om_type.strip() if type(om_type) is str else None
199
+ list_related_elements_with_prop_value(element_guid, relationship_type, property_value,
200
+ [property_names], om_type, server, url,
201
+ userid,password)
202
+ except KeyboardInterrupt:
203
+ pass
204
+
205
+
206
+ if __name__ == "__main__":
207
+ main()
@@ -30,7 +30,7 @@ console = Console()
30
30
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
31
31
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
32
32
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
33
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
33
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
34
34
  EGERIA_VIEW_SERVER_URL = os.environ.get(
35
35
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
36
36
  )
@@ -29,7 +29,7 @@ from pyegeria import ValidMetadataManager
29
29
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
30
30
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
31
31
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
32
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
32
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
33
33
  EGERIA_VIEW_SERVER_URL = os.environ.get(
34
34
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
35
35
  )
@@ -30,7 +30,7 @@ from pyegeria import (
30
30
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
31
31
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
32
32
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
33
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
33
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
34
34
  EGERIA_VIEW_SERVER_URL = os.environ.get(
35
35
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
36
36
  )
@@ -25,7 +25,7 @@ console = Console()
25
25
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
26
26
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
27
27
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
28
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
28
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
29
29
  EGERIA_VIEW_SERVER_URL = os.environ.get(
30
30
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
31
31
  )
@@ -31,7 +31,7 @@ from pyegeria import ValidMetadataManager
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")
33
33
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
34
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
34
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
35
35
  EGERIA_VIEW_SERVER_URL = os.environ.get(
36
36
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
37
37
  )
@@ -27,7 +27,7 @@ console = Console()
27
27
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
28
28
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
29
29
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
30
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
30
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
31
31
  EGERIA_VIEW_SERVER_URL = os.environ.get(
32
32
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
33
33
  )
@@ -30,7 +30,7 @@ console = Console()
30
30
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
31
31
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
32
32
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
33
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
33
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
34
34
  EGERIA_VIEW_SERVER_URL = os.environ.get(
35
35
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
36
36
  )
@@ -29,7 +29,7 @@ from rich.console import Console
29
29
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
30
30
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
31
31
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
32
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
32
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
33
33
  EGERIA_VIEW_SERVER_URL = os.environ.get(
34
34
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
35
35
  )
@@ -1809,7 +1809,7 @@ class ValidMetadataManager(Client):
1809
1809
  return resp.json().get("typeDefs", "No TypeDefs Found")
1810
1810
 
1811
1811
  def get_valid_classification_types(self, entity_type: str) -> list | str:
1812
- """Returns all the TypeDefs for relationships that can be attached to the requested entity type.
1812
+ """Returns all the TypeDefs for classifications that can be attached to the requested entity type.
1813
1813
  Async version.
1814
1814
 
1815
1815
  Parameters
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 5.3.1.dev1
3
+ Version: 5.3.3
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -12,19 +12,19 @@ Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: License :: Other/Proprietary License
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Requires-Dist: click (>=8.1.7,<9.0.0)
16
- Requires-Dist: confluent-kafka (>=2.5.0,<3.0.0)
17
- Requires-Dist: httpx (>=0.27,<0.28)
18
- Requires-Dist: jupyter (>=1.0.0,<2.0.0)
19
- Requires-Dist: mermaid-py (>=0.5.3,<0.6.0)
15
+ Requires-Dist: click
16
+ Requires-Dist: confluent-kafka
17
+ Requires-Dist: httpx
18
+ Requires-Dist: jupyter
19
+ Requires-Dist: mermaid-py
20
20
  Requires-Dist: psycopg2-binary (>=2.9.9,<3.0.0)
21
21
  Requires-Dist: pytest (>=8.2.2,<9.0.0)
22
- Requires-Dist: requests (>=2.32.3,<3.0.0)
22
+ Requires-Dist: requests
23
23
  Requires-Dist: rich
24
- Requires-Dist: textual (>=0.86,<0.87)
24
+ Requires-Dist: textual
25
25
  Requires-Dist: trogon (>=0.6.0,<0.7.0)
26
- Requires-Dist: urllib3 (>=2.2.2,<3.0.0)
27
- Requires-Dist: validators (>=0.32.0,<0.33.0)
26
+ Requires-Dist: urllib3
27
+ Requires-Dist: validators
28
28
  Project-URL: Repository, https://github.com/odpi/egeria-python
29
29
  Description-Content-Type: text/markdown
30
30