pyegeria 0.4.0__tar.gz → 0.5.0__tar.gz
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-0.4.0/src/pyegeria.egg-info → pyegeria-0.5.0}/PKG-INFO +16 -16
- pyegeria-0.5.0/examples/widgets/catalog_user/__init__.py +10 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/catalog_user/list_assets.py +1 -1
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/catalog_user/view_asset_graph.py +44 -36
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/view_asset_events.py +10 -15
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/view_coco_status.py +10 -9
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/view_integ_daemon_status.py +45 -23
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/view_server_status.py +2 -4
- pyegeria-0.5.0/pyproject.toml +57 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/automated_curation_omvs.py +6 -6
- pyegeria-0.5.0/src/pyegeria/config.toml +11 -0
- pyegeria-0.5.0/src/pyegeria/core_guids.py +121 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/core_omag_server_config.py +1 -1
- pyegeria-0.4.0/MANIFEST.in +0 -1
- pyegeria-0.4.0/PKG-INFO +0 -62
- pyegeria-0.4.0/examples/.DS_Store +0 -0
- pyegeria-0.4.0/examples/Coco_config/README.md +0 -19
- pyegeria-0.4.0/examples/Coco_config/__init__.py +0 -4
- pyegeria-0.4.0/examples/Coco_config/__pycache__/globals.cpython-312.pyc +0 -0
- pyegeria-0.4.0/examples/Coco_config/config_cocoMDS1.py +0 -108
- pyegeria-0.4.0/examples/Coco_config/config_cocoMDS2.py +0 -109
- pyegeria-0.4.0/examples/Coco_config/config_cocoMDS3.py +0 -104
- pyegeria-0.4.0/examples/Coco_config/config_cocoMDS4.py +0 -95
- pyegeria-0.4.0/examples/Coco_config/config_cocoMDS5.py +0 -97
- pyegeria-0.4.0/examples/Coco_config/config_cocoMDS6.py +0 -112
- pyegeria-0.4.0/examples/Coco_config/config_cocoMDSx.py +0 -114
- pyegeria-0.4.0/examples/Coco_config/config_cocoView1.py +0 -158
- pyegeria-0.4.0/examples/Coco_config/config_exchangeDL01.py +0 -104
- pyegeria-0.4.0/examples/Coco_config/config_governDL01.py +0 -79
- pyegeria-0.4.0/examples/Coco_config/config_monitorDev01.py +0 -58
- pyegeria-0.4.0/examples/Coco_config/config_monitorGov01.py +0 -217
- pyegeria-0.4.0/examples/Coco_config/globals.py +0 -153
- pyegeria-0.4.0/examples/Doc_Samples/Create_Collection_Sample.py +0 -292
- pyegeria-0.4.0/examples/Doc_Samples/Create_Sustainability_Collection_Sample.py +0 -115
- pyegeria-0.4.0/examples/Jupyter Notebooks/P-egeria-server-config.ipynb +0 -2137
- pyegeria-0.4.0/examples/Jupyter Notebooks/README.md +0 -2
- pyegeria-0.4.0/examples/Jupyter Notebooks/common/P-environment-check.ipynb +0 -115
- pyegeria-0.4.0/examples/Jupyter Notebooks/common/__init__.py +0 -15
- pyegeria-0.4.0/examples/Jupyter Notebooks/common/common-functions.ipynb +0 -4694
- pyegeria-0.4.0/examples/Jupyter Notebooks/common/environment-check.ipynb +0 -53
- pyegeria-0.4.0/examples/Jupyter Notebooks/common/globals.ipynb +0 -184
- pyegeria-0.4.0/examples/Jupyter Notebooks/common/globals.py +0 -153
- pyegeria-0.4.0/examples/Jupyter Notebooks/common/orig_globals.py +0 -151
- pyegeria-0.4.0/examples/__init__.py +0 -4
- pyegeria-0.4.0/examples/__pycache__/__init__.cpython-312.pyc +0 -0
- pyegeria-0.4.0/examples/widgets/.DS_Store +0 -0
- pyegeria-0.4.0/examples/widgets/README.md +0 -34
- pyegeria-0.4.0/examples/widgets/__init__.py +0 -4
- pyegeria-0.4.0/examples/widgets/__pycache__/__init__.cpython-312.pyc +0 -0
- pyegeria-0.4.0/examples/widgets/__pycache__/server_status_widget.cpython-312-pytest-7.4.4.pyc +0 -0
- pyegeria-0.4.0/examples/widgets/operational/view_asset_changes.py +0 -82
- pyegeria-0.4.0/examples/widgets/personal_organizer/__init__.py +0 -0
- pyegeria-0.4.0/pyproject.toml +0 -42
- pyegeria-0.4.0/setup.cfg +0 -4
- pyegeria-0.4.0/setup.py +0 -83
- pyegeria-0.4.0/src/pyegeria/core_guids.py +0 -128
- pyegeria-0.4.0/src/pyegeria.egg-info/SOURCES.txt +0 -125
- pyegeria-0.4.0/src/pyegeria.egg-info/dependency_links.txt +0 -1
- pyegeria-0.4.0/src/pyegeria.egg-info/requires.txt +0 -9
- pyegeria-0.4.0/src/pyegeria.egg-info/top_level.txt +0 -1
- pyegeria-0.4.0/tests/test_Xglossary_manager_omvs.py +0 -273
- pyegeria-0.4.0/tests/test_asset_catalog_omvs.py +0 -247
- pyegeria-0.4.0/tests/test_automated_curation_omvs.py +0 -1061
- pyegeria-0.4.0/tests/test_client.py +0 -97
- pyegeria-0.4.0/tests/test_collection_manager_omvs.py +0 -1193
- pyegeria-0.4.0/tests/test_core_omag_server_config.py +0 -1622
- pyegeria-0.4.0/tests/test_full_omag_server_config.py +0 -334
- pyegeria-0.4.0/tests/test_glossary_omvs.py +0 -261
- pyegeria-0.4.0/tests/test_loaded_resources.py +0 -78
- pyegeria-0.4.0/tests/test_my_profile_omvs.py +0 -281
- pyegeria-0.4.0/tests/test_platform_services.py +0 -854
- pyegeria-0.4.0/tests/test_project_manager_omvs.py +0 -704
- pyegeria-0.4.0/tests/test_registered_info.py +0 -151
- pyegeria-0.4.0/tests/test_runtime_manager.py +0 -223
- pyegeria-0.4.0/tests/test_server_operations.py +0 -194
- pyegeria-0.4.0/tests/test_util_exp.py +0 -213
- pyegeria-0.4.0/tests/test_valid_metadata_omvs.py +0 -390
- pyegeria-0.4.0/tests/test_validators.py +0 -219
- {pyegeria-0.4.0 → pyegeria-0.5.0}/LICENSE +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/README.md +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/catalog_user/README.md +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/catalog_user/view_collection.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/catalog_user/view_glossary.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/developer/README.md +0 -0
- {pyegeria-0.4.0/examples/widgets/catalog_user → pyegeria-0.5.0/examples/widgets/developer}/__init__.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/developer/get_guid_info.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/developer/get_tech_details.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/developer/list_asset_types.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/developer/list_registered_services.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/developer/list_relationship_types.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/developer/list_tech_templates.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/developer/list_tech_types.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/developer/list_valid_metadata_values.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/README.md +0 -0
- {pyegeria-0.4.0/examples/widgets/developer → pyegeria-0.5.0/examples/widgets/operational}/__init__.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/get_tech_type_elements.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/get_tech_type_template.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/view_eng_action_status.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/view_gov_eng_status.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/view_platform_status.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/operational/view_server_list.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/personal_organizer/README.md +0 -0
- {pyegeria-0.4.0/examples/widgets/operational → pyegeria-0.5.0/examples/widgets/personal_organizer}/__init__.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/personal_organizer/get_my_profile.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/personal_organizer/list_projects.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/personal_organizer/list_todos.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/personal_organizer/view_my_todos.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/examples/widgets/personal_organizer/view_open_todos.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/Xfeedback_manager_omvs.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/Xloaded_resources_omvs.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/__init__.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/_client.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/_deprecated_gov_engine.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/_exceptions.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/_globals.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/_validators.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/action_author_omvs.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/asset_catalog_omvs.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/collection_manager_omvs.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/full_omag_server_config.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/glossary_browser_omvs.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/glossary_manager_omvs.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/my_profile_omvs.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/platform_services.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/project_manager_omvs.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/registered_info.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/runtime_manager_omvs.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/server_operations.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/utils.py +0 -0
- {pyegeria-0.4.0 → pyegeria-0.5.0}/src/pyegeria/valid_metadata_omvs.py +0 -0
@@ -1,27 +1,27 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyegeria
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.5.0
|
4
4
|
Summary: A python client for Egeria
|
5
|
-
Home-page: https://
|
6
|
-
|
7
|
-
Author-email: Dan Wolfson <dan.wolfson@pdr-associates.com>
|
8
|
-
Project-URL: Homepage, https://github.com/odpi/egeria-python
|
9
|
-
Project-URL: Issues, https://github.com/odpi/egeria-python/issues
|
5
|
+
Home-page: https://github.com/odpi/egeria-python
|
6
|
+
License: Apache 2.0
|
10
7
|
Keywords: egeria,metadata,governance
|
8
|
+
Author: Dan Wolfson
|
9
|
+
Author-email: dan.wolfson@pdr-associates.com
|
10
|
+
Requires-Python: >=3.10,<4.0
|
11
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
12
|
+
Classifier: License :: Other/Proprietary License
|
12
13
|
Classifier: Programming Language :: Python
|
13
14
|
Classifier: Programming Language :: Python :: 3
|
14
|
-
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
18
|
+
Requires-Dist: httpx (>=0.26.0,<0.27.0)
|
19
|
+
Requires-Dist: pytest (>=8.0.0,<9.0.0)
|
20
|
+
Requires-Dist: rich (>=13.7.0,<14.0.0)
|
21
|
+
Requires-Dist: setuptools (>=69.0.3,<70.0.0)
|
22
|
+
Requires-Dist: validators (>=0.22.0,<0.23.0)
|
23
|
+
Project-URL: Repository, https://github.com/odpi/egeria-python
|
15
24
|
Description-Content-Type: text/markdown
|
16
|
-
License-File: LICENSE
|
17
|
-
Requires-Dist: requests~=2.31.0
|
18
|
-
Requires-Dist: validators~=0.22.0
|
19
|
-
Requires-Dist: pytest~=7.4.2
|
20
|
-
Requires-Dist: urllib3~=1.26.15
|
21
|
-
Requires-Dist: rich~=13.7.1
|
22
|
-
Requires-Dist: httpx~=0.26.0
|
23
|
-
Provides-Extra: tests
|
24
|
-
Requires-Dist: pytest; extra == "tests"
|
25
25
|
|
26
26
|
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
27
27
|
<!-- Copyright Contributors to the ODPi Egeria project. -->
|
@@ -79,7 +79,7 @@ def display_assets(search_string: str, guid: str=None, server: str = good_server
|
|
79
79
|
table.add_column("Qualified Name")
|
80
80
|
|
81
81
|
|
82
|
-
assets = g_client.find_assets_in_domain(search_string, starts_with=
|
82
|
+
assets = g_client.find_assets_in_domain(search_string, starts_with=True,
|
83
83
|
ends_with=False, ignore_case=True, page_size=10)
|
84
84
|
if type(assets) is str:
|
85
85
|
return table
|
@@ -38,20 +38,21 @@ view_server = "view-server"
|
|
38
38
|
|
39
39
|
guid_list = []
|
40
40
|
|
41
|
-
def asset_viewer(
|
41
|
+
def asset_viewer(asset_guid: str, server_name:str, platform_url:str, user:str):
|
42
42
|
|
43
|
-
def build_classifications(classification: dict) ->
|
43
|
+
def build_classifications(classification: dict) -> str:
|
44
44
|
|
45
|
-
class_md = "
|
45
|
+
class_md = ""
|
46
46
|
for c in classification:
|
47
47
|
c_type = c["classificationName"]
|
48
48
|
if c_type == "Anchors":
|
49
49
|
continue
|
50
50
|
class_md += f"* Classification: {c_type}\n"
|
51
|
-
class_props = c
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
class_props = c.get("classificationProperties","---")
|
52
|
+
if type(class_props) is dict:
|
53
|
+
for prop in class_props.keys():
|
54
|
+
class_md += f"\t* {prop}: {class_props[prop]}\n"
|
55
|
+
if class_md == "":
|
55
56
|
output = None
|
56
57
|
else:
|
57
58
|
output = class_md
|
@@ -91,59 +92,66 @@ def asset_viewer(asset_name: str, server_name:str, platform_url:str, user:str):
|
|
91
92
|
user_id=user)
|
92
93
|
|
93
94
|
token = a_client.create_egeria_bearer_token(user, "secret")
|
94
|
-
asset_info = a_client.find_assets_in_domain(asset_name)
|
95
|
-
|
95
|
+
# asset_info = a_client.find_assets_in_domain(asset_name)
|
96
|
+
# if type(asset_info) is str:
|
97
|
+
# print("\n No Assets Found - Exiting\n")
|
98
|
+
# sys.exit(1)
|
99
|
+
#
|
100
|
+
# asset_guid = asset_info[0]['guid']
|
101
|
+
|
96
102
|
guid_list.append(asset_guid)
|
97
103
|
|
98
104
|
asset_graph = a_client.get_asset_graph(asset_guid)
|
99
105
|
if type(asset_graph) is not dict:
|
100
|
-
print(f"\n No Asset found for {
|
106
|
+
print(f"\n No Asset found for {asset_guid}")
|
101
107
|
sys.exit(1)
|
102
108
|
|
103
109
|
# print(f"\n{json.dumps(asset_graph, indent =2)}\n")
|
104
|
-
|
105
|
-
style = ""
|
110
|
+
|
106
111
|
|
107
112
|
asset_name = asset_graph["displayName"]
|
108
113
|
qualified_name = asset_graph["qualifiedName"]
|
109
114
|
resource_name = asset_graph["resourceName"]
|
110
115
|
|
116
|
+
tree = Tree(f"{asset_name} ({asset_guid})", style="bold bright_white", guide_style="bold bright_blue")
|
117
|
+
style = ""
|
118
|
+
|
111
119
|
asset_type = asset_graph["type"]["typeName"]
|
112
120
|
asset_origin = asset_graph["origin"]["homeMetadataCollectionName"]
|
113
121
|
asset_creation = asset_graph["versions"]["createTime"]
|
114
122
|
asset_created_by = asset_graph["versions"]["createdBy"]
|
115
123
|
asset_classifications = asset_graph["classifications"]
|
116
|
-
asset_nested_elements = asset_graph
|
124
|
+
asset_nested_elements = asset_graph.get("anchoredElements","----")
|
117
125
|
asset_relationships = asset_graph["relationships"]
|
118
126
|
asset_class_md = build_classifications(asset_classifications)
|
119
127
|
|
120
|
-
|
121
128
|
asset_properties = asset_graph["extendedProperties"]
|
122
|
-
prop_md = ""
|
129
|
+
prop_md = "\n* Extended Properties:\n"
|
123
130
|
for prop in asset_properties:
|
124
|
-
prop_md = f"{prop_md}* {prop}: {asset_properties[prop]}\n"
|
131
|
+
prop_md = f"{prop_md}\n\t* {prop}: {asset_properties[prop]}\n"
|
125
132
|
|
126
|
-
core_md = (f"**Type: {asset_type}
|
133
|
+
core_md = (f"**Type: {asset_type} Created by: {asset_created_by} on {asset_creation}**\n"
|
127
134
|
f"* Qualified Name: {qualified_name}\n "
|
128
135
|
f"* Resource Name: {resource_name}\n"
|
129
136
|
f"* Display Name: {asset_name}\n"
|
130
|
-
f"* Asset Origin: {asset_origin}\n{prop_md}"
|
137
|
+
f"* Asset Origin: {asset_origin}\n{prop_md}\n"
|
131
138
|
)
|
132
139
|
core_md = Markdown(core_md)
|
133
140
|
p1 = Panel.fit(core_md, style = "bold bright_white")
|
134
141
|
l2 = tree.add(p1)
|
135
142
|
if asset_class_md is not None:
|
136
|
-
p2 = Panel.fit(Markdown(asset_class_md), style = "bold bright_white")
|
143
|
+
p2 = Panel.fit(Markdown(asset_class_md), style = "bold bright_white", title = "Classifications")
|
137
144
|
l2 = tree.add(p2)
|
138
145
|
|
139
146
|
#
|
140
147
|
# Nested Assets
|
141
148
|
#
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
149
|
+
if type(asset_nested_elements) is list:
|
150
|
+
l2 = tree.add("Nested Elements", style = "bold white")
|
151
|
+
for el in asset_nested_elements:
|
152
|
+
asset_ne_md = build_nested_elements(el)
|
153
|
+
p3 = Panel.fit(asset_ne_md, style = "bold bright_white", title="Nested Elements")
|
154
|
+
l2.add(p3)
|
147
155
|
|
148
156
|
#
|
149
157
|
# Now work on the Relationships
|
@@ -168,7 +176,7 @@ def asset_viewer(asset_name: str, server_name:str, platform_url:str, user:str):
|
|
168
176
|
relationship_type = relationship["type"]["typeName"]
|
169
177
|
relationship_created_by = relationship["versions"]["createdBy"]
|
170
178
|
relationship_creation_time = relationship["versions"]["createTime"]
|
171
|
-
relationship_properties = relationship.get("properties"," ")
|
179
|
+
relationship_properties = relationship.get("properties","--- ")
|
172
180
|
relationship_md = (f"Relationship Type {relationship_type}\n"
|
173
181
|
f"* GUID: {relationship_guid}\n* Created by: {relationship_created_by} \n"
|
174
182
|
f"* Creation Time: {relationship_creation_time}\n"
|
@@ -181,31 +189,31 @@ def asset_viewer(asset_name: str, server_name:str, platform_url:str, user:str):
|
|
181
189
|
f"* Created by: {relationship_created_by} at time {relationship_creation_time}\n"
|
182
190
|
)
|
183
191
|
rel_end1_md = (
|
184
|
-
f"
|
185
|
-
f"\t* Type: {rel_end1_type}\n"
|
192
|
+
f"\n**End1:**\n"
|
193
|
+
f"\n\t* Type: {rel_end1_type}\n"
|
186
194
|
f"\t* GUID: {rel_end1_guid}\n"
|
187
195
|
f"\t* Unique Name: {rel_end1_unique_name}\n"
|
188
196
|
)
|
189
197
|
|
190
|
-
if rel_end1_class_md is not None:
|
191
|
-
|
198
|
+
# if rel_end1_class_md is not None:
|
199
|
+
# rel_end1_md = rel_end1_md + rel_end1_class_md
|
192
200
|
|
193
201
|
rel_end2_md = (
|
194
|
-
f"
|
195
|
-
f"\t* Type: {rel_end2_type}\n"
|
202
|
+
f"\n**End2:**\n"
|
203
|
+
f"\n\t* Type: {rel_end2_type}\n"
|
196
204
|
f"\t* GUID: {rel_end2_guid}\n"
|
197
205
|
f"\t* Unique Name: {rel_end2_unique_name}\n"
|
198
206
|
)
|
199
207
|
|
200
|
-
if rel_end2_class_md is not None:
|
201
|
-
|
208
|
+
# if rel_end2_class_md is not None:
|
209
|
+
# rel_end1_md = rel_end1_md + rel_end2_class_md
|
202
210
|
#
|
203
211
|
# for prop in relationship_properties.keys():
|
204
212
|
# relationship_md += f"* {prop}: {relationship_properties[prop]}\n"
|
205
213
|
|
206
214
|
relationship_md += rel_end1_md + rel_end2_md
|
207
215
|
|
208
|
-
relationship_panel = Panel.fit(Markdown(relationship_md), style="bold bright_white")
|
216
|
+
relationship_panel = Panel.fit(Markdown(relationship_md), style="bold bright_white", title = "Asset Relationships")
|
209
217
|
tree.add(relationship_panel)
|
210
218
|
|
211
219
|
|
@@ -232,5 +240,5 @@ if __name__ == "__main__":
|
|
232
240
|
url = args.url if args.url is not None else "https://localhost:9443"
|
233
241
|
userid = args.userid if args.userid is not None else 'erinoverview'
|
234
242
|
|
235
|
-
|
236
|
-
asset_viewer(
|
243
|
+
asset_guid = Prompt.ask("Enter the Asset GUID to view:", default="8e35b39e-6ee7-4d60-aff5-4b09406c5e79")
|
244
|
+
asset_viewer(asset_guid,server, url, userid)
|
@@ -10,8 +10,8 @@ import sys
|
|
10
10
|
import time
|
11
11
|
import argparse
|
12
12
|
from confluent_kafka import Consumer, KafkaException
|
13
|
-
|
14
|
-
|
13
|
+
from datetime import datetime
|
14
|
+
from rich.prompt import Prompt
|
15
15
|
from rich.table import Table
|
16
16
|
from rich.live import Live
|
17
17
|
from rich.console import Console
|
@@ -21,15 +21,18 @@ from pyegeria import RuntimeManager
|
|
21
21
|
|
22
22
|
disable_ssl_warnings = True
|
23
23
|
console = Console(width=200)
|
24
|
-
|
24
|
+
now = datetime.now()
|
25
|
+
current_time = now.strftime("%H:%M:%S")
|
25
26
|
|
26
27
|
from confluent_kafka import Consumer, KafkaException
|
27
28
|
|
29
|
+
earliest_latest = Prompt.ask("Msgs from earliest or latest:", default="earliest")
|
30
|
+
|
28
31
|
# Define the Kafka consumer configuration.
|
29
32
|
config = {
|
30
33
|
'bootstrap.servers': 'localhost:9092', # replace with your Kafka broker(s)
|
31
|
-
'group.id': "
|
32
|
-
'auto.offset.reset':
|
34
|
+
'group.id': f"view_asset_events:{current_time}", # replace with your consumer group
|
35
|
+
'auto.offset.reset': earliest_latest # can be set to 'earliest' or 'latest'
|
33
36
|
}
|
34
37
|
|
35
38
|
# Initialize a Kafka consumer.
|
@@ -54,14 +57,6 @@ try:
|
|
54
57
|
|
55
58
|
type_name = event["elementHeader"]["type"]["typeName"]
|
56
59
|
origin = event["elementHeader"]["origin"]["sourceServer"]
|
57
|
-
# classifications = event['elementHeader']["classifications"]
|
58
|
-
# classification_md = ""
|
59
|
-
# for c in classifications:
|
60
|
-
# cp = c.get("classificationProperties", None)
|
61
|
-
# if cp is not None:
|
62
|
-
# cl_name = c["classificationProperties"].get("name", None)
|
63
|
-
# cl = cl_name if not None else c["classificationName"]
|
64
|
-
# classification_md += f"* classifications: {cl}\n"
|
65
60
|
|
66
61
|
element_properties = event["elementProperties"]
|
67
62
|
element_properties_keys = element_properties.keys()
|
@@ -72,10 +67,10 @@ try:
|
|
72
67
|
console.rule(style= "[bold red]")
|
73
68
|
console.rule(f"\tMessage TimeStamp: {event_time}\t eventType: {event_type}\t typeName: {type_name}\t guid: {guid}")
|
74
69
|
msg = (
|
75
|
-
|
70
|
+
|
76
71
|
f"properties: \n{props}\n\n")
|
77
72
|
msg = Markdown(msg)
|
78
|
-
|
73
|
+
|
79
74
|
console.print(msg)
|
80
75
|
finally:
|
81
76
|
# Close down consumer to commit final offsets.
|
@@ -30,11 +30,9 @@ from pyegeria.server_operations import ServerOps
|
|
30
30
|
disable_ssl_warnings = True
|
31
31
|
|
32
32
|
|
33
|
-
def
|
33
|
+
def display_status(server: str, url: str, username: str):
|
34
34
|
layout = Layout()
|
35
|
-
print(layout)
|
36
35
|
|
37
|
-
print(layout)
|
38
36
|
p_client1 = ServerOps("Core Catalog", "https://localhost:9443", username)
|
39
37
|
p_client2 = ServerOps('Datalake Catalog', "https://localhost:9444", username)
|
40
38
|
p_client3 = ServerOps('DevCatalog', "https://localhost:9445", username)
|
@@ -42,19 +40,18 @@ def test_display_status(server: str, url: str, username: str):
|
|
42
40
|
def generate_table(p_client) -> Table:
|
43
41
|
"""Make a new table."""
|
44
42
|
table = Table(
|
45
|
-
title=f"Server Status for
|
43
|
+
title=f"Server Status for {p_client.server_name}- {time.asctime()}",
|
46
44
|
# style = "black on grey66",
|
47
45
|
header_style="white on dark_blue",
|
48
|
-
caption=f"Server Status for Platform - '{
|
46
|
+
caption=f"Server Status for Platform - '{p_client.platform_url}'",
|
49
47
|
# show_lines=True,
|
50
48
|
)
|
51
49
|
|
52
50
|
table.add_column("Known Server")
|
53
51
|
table.add_column("Status")
|
54
|
-
|
55
52
|
known_server_list = p_client.get_known_servers()
|
56
53
|
active_server_list = p_client.get_active_server_list()
|
57
|
-
if
|
54
|
+
if type(known_server_list) is str:
|
58
55
|
return table
|
59
56
|
|
60
57
|
for server in known_server_list:
|
@@ -83,6 +80,10 @@ def test_display_status(server: str, url: str, username: str):
|
|
83
80
|
print_exception_response(e)
|
84
81
|
assert e.related_http_code != "200", "Invalid parameters"
|
85
82
|
|
83
|
+
finally:
|
84
|
+
p_client1.close_session()
|
85
|
+
p_client2.close_session()
|
86
|
+
p_client3.close_session()
|
86
87
|
|
87
88
|
if __name__ == "__main__":
|
88
89
|
parser = argparse.ArgumentParser()
|
@@ -92,7 +93,7 @@ if __name__ == "__main__":
|
|
92
93
|
args = parser.parse_args()
|
93
94
|
|
94
95
|
server = args.server if args.server is not None else "active-metadata-store"
|
95
|
-
url = args.url if args.url is not None else "https://
|
96
|
+
url = args.url if args.url is not None else "https://localhost:9443"
|
96
97
|
userid = args.userid if args.userid is not None else 'garygeeke'
|
97
98
|
|
98
|
-
|
99
|
+
display_status(server, url, userid)
|
@@ -19,6 +19,7 @@ from rich import box
|
|
19
19
|
from rich.live import Live
|
20
20
|
from rich.markdown import Markdown
|
21
21
|
from rich.table import Table
|
22
|
+
from rich.text import Text
|
22
23
|
|
23
24
|
from pyegeria import ServerOps, AutomatedCuration
|
24
25
|
from pyegeria._exceptions import (
|
@@ -31,9 +32,10 @@ from pyegeria._exceptions import (
|
|
31
32
|
disable_ssl_warnings = True
|
32
33
|
|
33
34
|
|
34
|
-
def display_integration_daemon_status(
|
35
|
-
|
36
|
-
|
35
|
+
def display_integration_daemon_status(integ_server: str, integ_url: str,
|
36
|
+
view_server:str, view_url: str, user: str):
|
37
|
+
s_client = ServerOps(integ_server, integ_url, user)
|
38
|
+
a_client = AutomatedCuration(view_server, view_url, user, "secret")
|
37
39
|
token = a_client.create_egeria_bearer_token()
|
38
40
|
|
39
41
|
def generate_table() -> Table:
|
@@ -44,14 +46,14 @@ def display_integration_daemon_status(server: str, url: str, user: str):
|
|
44
46
|
header_style="white on dark_blue",
|
45
47
|
show_lines=True,
|
46
48
|
box=box.ROUNDED,
|
47
|
-
caption=f"Integration Daemon Status for Server '{
|
49
|
+
caption=f"Integration Daemon Status for Server '{integ_server}' @ Platform - {integ_url}",
|
48
50
|
expand=True
|
49
51
|
)
|
50
52
|
table.add_column("Connector Name")
|
51
53
|
table.add_column("Connector Status")
|
52
54
|
|
53
55
|
table.add_column("Last Refresh Time")
|
54
|
-
table.add_column("
|
56
|
+
table.add_column("Min Refresh (min)")
|
55
57
|
table.add_column("Target Element")
|
56
58
|
table.add_column("Exception Message")
|
57
59
|
|
@@ -60,22 +62,35 @@ def display_integration_daemon_status(server: str, url: str, user: str):
|
|
60
62
|
for connector in connector_reports:
|
61
63
|
connector_name = connector.get("connectorName", "---")
|
62
64
|
connector_status = connector.get("connectorStatus", "---")
|
63
|
-
connector_guid = connector
|
65
|
+
connector_guid = connector.get("connectorGUID","---")
|
64
66
|
last_refresh_time = connector.get("lastRefreshTime", "---")
|
65
67
|
refresh_interval = str(connector.get("minMinutesBetweenRefresh", "---"))
|
66
68
|
exception_msg = " "
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
69
|
+
if connector_guid != '---':
|
70
|
+
targets = a_client.get_catalog_targets(connector_guid)
|
71
|
+
tgt_tab = Table()
|
72
|
+
tgt_tab.add_column("Target")
|
73
|
+
tgt_tab.add_column("UniqueName")
|
74
|
+
tgt_tab.add_column("Relationship GUID", no_wrap=True)
|
75
|
+
|
76
|
+
if type(targets) == list:
|
77
|
+
targets_md = True
|
78
|
+
for target in targets:
|
79
|
+
t_name = target["catalogTargetName"]
|
80
|
+
# t_sync = target["permittedSynchronization"]
|
81
|
+
t_unique_name = target["catalogTargetElement"]["uniqueName"]
|
82
|
+
t_rel_guid = target["relationshipGUID"]
|
83
|
+
# targets_m += f"* Target Name: __{t_name}__\n* Sync: {t_sync}\n* Unique Name: {t_unique_name}\n\n"
|
84
|
+
tgt_tab.add_row(t_name,t_unique_name, t_rel_guid)
|
85
|
+
# targets_md = Markdown(targets_m)
|
86
|
+
else:
|
87
|
+
targets_md = False
|
88
|
+
else:
|
89
|
+
targets_md = False
|
90
|
+
if targets_md is False:
|
91
|
+
targets_out = ""
|
77
92
|
else:
|
78
|
-
|
93
|
+
targets_out = tgt_tab
|
79
94
|
|
80
95
|
if connector_status in ("RUNNING", "REFRESHING", "WAITING"):
|
81
96
|
connector_status = f"[green]{connector_status}"
|
@@ -86,7 +101,7 @@ def display_integration_daemon_status(server: str, url: str, user: str):
|
|
86
101
|
|
87
102
|
table.add_row(
|
88
103
|
connector_name, connector_status, last_refresh_time, refresh_interval,
|
89
|
-
|
104
|
+
targets_out, exception_msg
|
90
105
|
)
|
91
106
|
return table
|
92
107
|
|
@@ -103,16 +118,23 @@ def display_integration_daemon_status(server: str, url: str, user: str):
|
|
103
118
|
|
104
119
|
finally:
|
105
120
|
s_client.close_session()
|
121
|
+
a_client.close_session()
|
106
122
|
|
107
123
|
|
108
124
|
if __name__ == "__main__":
|
109
125
|
parser = argparse.ArgumentParser()
|
110
|
-
parser.add_argument("--
|
111
|
-
parser.add_argument("--
|
126
|
+
parser.add_argument("--integ_server", help="Name of the integration server to display status for")
|
127
|
+
parser.add_argument("--integ_url", help="URL Platform to connect to")
|
128
|
+
parser.add_argument("--view_server", help="Name of the integration server to display status for")
|
129
|
+
parser.add_argument("--view_url", help="URL Platform to connect to")
|
112
130
|
parser.add_argument("--userid", help="User Id")
|
113
131
|
args = parser.parse_args()
|
114
132
|
|
115
|
-
|
116
|
-
|
133
|
+
integ_server = args.integ_server if args.integ_server is not None else "integration-daemon"
|
134
|
+
integ_url = args.integ_url if args.integ_url is not None else "https://localhost:9443"
|
135
|
+
view_server = args.view_server if args.view_server is not None else "view-server"
|
136
|
+
view_url = args.view_url if args.view_url is not None else "https://localhost:9443"
|
117
137
|
userid = args.userid if args.userid is not None else 'garygeeke'
|
118
|
-
display_integration_daemon_status(
|
138
|
+
display_integration_daemon_status(integ_server=integ_server, integ_url=integ_url,
|
139
|
+
view_server = view_server, view_url = view_url,
|
140
|
+
user=userid)
|
@@ -11,18 +11,16 @@ A simple server status display
|
|
11
11
|
|
12
12
|
import time
|
13
13
|
import argparse
|
14
|
-
|
15
|
-
from pyegeria._exceptions import (
|
14
|
+
from pyegeria import (
|
16
15
|
InvalidParameterException,
|
17
16
|
PropertyServerException,
|
18
17
|
UserNotAuthorizedException,
|
19
18
|
print_exception_response,
|
19
|
+
ServerOps
|
20
20
|
)
|
21
21
|
from rich.table import Table
|
22
22
|
from rich.live import Live
|
23
23
|
|
24
|
-
from pyegeria.server_operations import ServerOps
|
25
|
-
|
26
24
|
|
27
25
|
def test_display_status(server: str, url: str , username: str ):
|
28
26
|
p_client = ServerOps(server, url, username)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
3
|
+
# Copyright Contributors to the ODPi Egeria project.
|
4
|
+
[build-system]
|
5
|
+
#requires = ["setuptools", "wheel"]
|
6
|
+
requires = ["poetry-core"]
|
7
|
+
#build-backend = "setuptools.build_meta"
|
8
|
+
build-backend = "poetry.core.masonry.api"
|
9
|
+
|
10
|
+
[tool.poetry]
|
11
|
+
name = "pyegeria"
|
12
|
+
version = "0.5.0"
|
13
|
+
license = 'Apache 2.0'
|
14
|
+
authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
|
15
|
+
readme = "README.md"
|
16
|
+
description = "A python client for Egeria"
|
17
|
+
keywords = ["egeria", "metadata", "governance"]
|
18
|
+
homepage = "https://github.com/odpi/egeria-python"
|
19
|
+
|
20
|
+
repository = "https://github.com/odpi/egeria-python"
|
21
|
+
classifiers = [
|
22
|
+
"License :: OSI Approved :: Apache Software License",
|
23
|
+
"Programming Language :: Python",
|
24
|
+
"Programming Language :: Python :: 3",
|
25
|
+
]
|
26
|
+
packages = [
|
27
|
+
{ include = "src/pyegeria"},
|
28
|
+
{ include = "examples/widgets/catalog_user" },
|
29
|
+
{ include = "examples/widgets/developer" },
|
30
|
+
{ include = "examples/widgets/operational"},
|
31
|
+
{ include = "examples/widgets/personal_organizer"}
|
32
|
+
]
|
33
|
+
|
34
|
+
[tool.poetry.dependencies]
|
35
|
+
python = "^3.10"
|
36
|
+
validators = "^0.22.0"
|
37
|
+
pytest = "^8.0.0"
|
38
|
+
rich = "^13.7.0"
|
39
|
+
httpx = "^0.26.0"
|
40
|
+
setuptools = "^69.0.3"
|
41
|
+
|
42
|
+
[tool.poetry.group.test]
|
43
|
+
optional = true
|
44
|
+
|
45
|
+
[tool.poetry.group.test.dependencies]
|
46
|
+
pytest = "^8.0.0"
|
47
|
+
|
48
|
+
|
49
|
+
[tool.poetry.scripts]
|
50
|
+
view_server_status = "examples.widgets.operational.view_server_status:main"
|
51
|
+
view_my_todos = "examples.widgets.personal_organizer.view_my_todos:main"
|
52
|
+
list_asset_types = "examples.widgets.developer.list_asset_types:main"
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
@@ -13,9 +13,9 @@ from httpx import Response
|
|
13
13
|
from pyegeria import Client, max_paging_size, body_slimmer
|
14
14
|
from pyegeria._exceptions import (InvalidParameterException, PropertyServerException, UserNotAuthorizedException)
|
15
15
|
from ._validators import validate_name, validate_guid, validate_search_string
|
16
|
-
from .core_guids import (
|
17
|
-
|
18
|
-
|
16
|
+
from .core_guids import (FILEFOLDER_TEMPLATE_GUID,
|
17
|
+
POSTGRESQL_SERVER_TEMPLATE_GUID,
|
18
|
+
APACHE_KAFKA_SERVER_TEMPLATE_GUID,
|
19
19
|
)
|
20
20
|
|
21
21
|
|
@@ -169,7 +169,7 @@ class AutomatedCuration(Client):
|
|
169
169
|
The GUID of the Kafka server element.
|
170
170
|
"""
|
171
171
|
|
172
|
-
body = {"templateGUID":
|
172
|
+
body = {"templateGUID":APACHE_KAFKA_SERVER_TEMPLATE_GUID, "isOwnAnchor": 'true',
|
173
173
|
"placeholderPropertyValues": {"serverName": kafka_server, "hostIdentifier": host_name,
|
174
174
|
"portNumber": port, "description": description}}
|
175
175
|
body_s = body_slimmer(body)
|
@@ -241,7 +241,7 @@ class AutomatedCuration(Client):
|
|
241
241
|
str
|
242
242
|
The GUID of the Postgres server element.
|
243
243
|
"""
|
244
|
-
body = {"templateGUID":
|
244
|
+
body = {"templateGUID":POSTGRESQL_SERVER_TEMPLATE_GUID, "isOwnAnchor": 'true',
|
245
245
|
"placeholderPropertyValues": {"serverName": postgres_server, "hostIdentifier": host_name,
|
246
246
|
"portNumber": port, "databaseUserId": db_user, "description": description,
|
247
247
|
"databasePassword": db_pwd}}
|
@@ -319,7 +319,7 @@ class AutomatedCuration(Client):
|
|
319
319
|
str
|
320
320
|
The GUID of the File Folder element.
|
321
321
|
"""
|
322
|
-
body = {"templateGUID":
|
322
|
+
body = {"templateGUID": FILEFOLDER_TEMPLATE_GUID,
|
323
323
|
"isOwnAnchor": 'true',
|
324
324
|
"placeholderPropertyValues": {
|
325
325
|
"directoryPathName": path_name,
|