pyegeria 0.4.1__tar.gz → 0.5.1__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.
Files changed (130) hide show
  1. {pyegeria-0.4.1/src/pyegeria.egg-info → pyegeria-0.5.1}/PKG-INFO +15 -16
  2. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/catalog_user/list_assets.py +5 -2
  3. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/catalog_user/view_asset_graph.py +4 -1
  4. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/catalog_user/view_collection.py +4 -1
  5. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/catalog_user/view_glossary.py +5 -2
  6. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/developer/get_guid_info.py +5 -7
  7. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/developer/get_tech_details.py +10 -21
  8. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/developer/list_asset_types.py +4 -1
  9. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/developer/list_registered_services.py +4 -1
  10. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/developer/list_relationship_types.py +5 -3
  11. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/developer/list_tech_templates.py +3 -2
  12. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/developer/list_tech_types.py +4 -2
  13. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/developer/list_valid_metadata_values.py +14 -12
  14. pyegeria-0.5.1/examples/widgets/operational/__init__.py +7 -0
  15. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/operational/get_tech_type_elements.py +4 -1
  16. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/operational/get_tech_type_template.py +10 -13
  17. pyegeria-0.5.1/examples/widgets/operational/view_asset_events.py +78 -0
  18. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/operational/view_coco_status.py +4 -1
  19. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/operational/view_eng_action_status.py +4 -1
  20. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/operational/view_gov_eng_status.py +4 -1
  21. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/operational/view_integ_daemon_status.py +4 -3
  22. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/operational/view_platform_status.py +5 -1
  23. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/operational/view_server_list.py +4 -1
  24. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/operational/view_server_status.py +6 -3
  25. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/personal_organizer/get_my_profile.py +5 -2
  26. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/personal_organizer/list_projects.py +5 -3
  27. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/personal_organizer/list_todos.py +5 -2
  28. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/personal_organizer/view_my_todos.py +7 -10
  29. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/personal_organizer/view_open_todos.py +5 -1
  30. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/__init__.py +1 -1
  31. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/automated_curation_omvs.py +6 -6
  32. pyegeria-0.5.1/pyegeria/core_guids.py +121 -0
  33. pyegeria-0.5.1/pyproject.toml +77 -0
  34. pyegeria-0.4.1/MANIFEST.in +0 -1
  35. pyegeria-0.4.1/PKG-INFO +0 -62
  36. pyegeria-0.4.1/examples/.DS_Store +0 -0
  37. pyegeria-0.4.1/examples/Coco_config/README.md +0 -19
  38. pyegeria-0.4.1/examples/Coco_config/__init__.py +0 -4
  39. pyegeria-0.4.1/examples/Coco_config/__pycache__/globals.cpython-312.pyc +0 -0
  40. pyegeria-0.4.1/examples/Coco_config/config_cocoMDS1.py +0 -107
  41. pyegeria-0.4.1/examples/Coco_config/config_cocoMDS2.py +0 -109
  42. pyegeria-0.4.1/examples/Coco_config/config_cocoMDS3.py +0 -104
  43. pyegeria-0.4.1/examples/Coco_config/config_cocoMDS4.py +0 -95
  44. pyegeria-0.4.1/examples/Coco_config/config_cocoMDS5.py +0 -97
  45. pyegeria-0.4.1/examples/Coco_config/config_cocoMDS6.py +0 -112
  46. pyegeria-0.4.1/examples/Coco_config/config_cocoMDSx.py +0 -114
  47. pyegeria-0.4.1/examples/Coco_config/config_cocoView1.py +0 -158
  48. pyegeria-0.4.1/examples/Coco_config/config_exchangeDL01.py +0 -104
  49. pyegeria-0.4.1/examples/Coco_config/config_governDL01.py +0 -79
  50. pyegeria-0.4.1/examples/Coco_config/config_monitorDev01.py +0 -58
  51. pyegeria-0.4.1/examples/Coco_config/config_monitorGov01.py +0 -217
  52. pyegeria-0.4.1/examples/Coco_config/globals.py +0 -153
  53. pyegeria-0.4.1/examples/Coco_config/start_all_coco.py +0 -9
  54. pyegeria-0.4.1/examples/Jupyter Notebooks/P-egeria-server-config.ipynb +0 -2137
  55. pyegeria-0.4.1/examples/Jupyter Notebooks/README.md +0 -2
  56. pyegeria-0.4.1/examples/Jupyter Notebooks/common/P-environment-check.ipynb +0 -115
  57. pyegeria-0.4.1/examples/Jupyter Notebooks/common/__init__.py +0 -15
  58. pyegeria-0.4.1/examples/Jupyter Notebooks/common/common-functions.ipynb +0 -4694
  59. pyegeria-0.4.1/examples/Jupyter Notebooks/common/environment-check.ipynb +0 -53
  60. pyegeria-0.4.1/examples/Jupyter Notebooks/common/globals.ipynb +0 -184
  61. pyegeria-0.4.1/examples/Jupyter Notebooks/common/globals.py +0 -153
  62. pyegeria-0.4.1/examples/Jupyter Notebooks/common/orig_globals.py +0 -151
  63. pyegeria-0.4.1/examples/__init__.py +0 -4
  64. pyegeria-0.4.1/examples/__pycache__/__init__.cpython-312.pyc +0 -0
  65. pyegeria-0.4.1/examples/widgets/.DS_Store +0 -0
  66. pyegeria-0.4.1/examples/widgets/README.md +0 -34
  67. pyegeria-0.4.1/examples/widgets/__init__.py +0 -4
  68. pyegeria-0.4.1/examples/widgets/__pycache__/__init__.cpython-312.pyc +0 -0
  69. pyegeria-0.4.1/examples/widgets/__pycache__/server_status_widget.cpython-312-pytest-7.4.4.pyc +0 -0
  70. pyegeria-0.4.1/examples/widgets/operational/view_asset_events.py +0 -77
  71. pyegeria-0.4.1/examples/widgets/personal_organizer/__init__.py +0 -0
  72. pyegeria-0.4.1/pyproject.toml +0 -42
  73. pyegeria-0.4.1/setup.cfg +0 -4
  74. pyegeria-0.4.1/setup.py +0 -83
  75. pyegeria-0.4.1/src/pyegeria/core_guids.py +0 -128
  76. pyegeria-0.4.1/src/pyegeria.egg-info/SOURCES.txt +0 -125
  77. pyegeria-0.4.1/src/pyegeria.egg-info/dependency_links.txt +0 -1
  78. pyegeria-0.4.1/src/pyegeria.egg-info/requires.txt +0 -9
  79. pyegeria-0.4.1/src/pyegeria.egg-info/top_level.txt +0 -1
  80. pyegeria-0.4.1/tests/test_Xglossary_manager_omvs.py +0 -273
  81. pyegeria-0.4.1/tests/test_asset_catalog_omvs.py +0 -247
  82. pyegeria-0.4.1/tests/test_automated_curation_omvs.py +0 -1062
  83. pyegeria-0.4.1/tests/test_client.py +0 -97
  84. pyegeria-0.4.1/tests/test_collection_manager_omvs.py +0 -1193
  85. pyegeria-0.4.1/tests/test_core_omag_server_config.py +0 -1622
  86. pyegeria-0.4.1/tests/test_full_omag_server_config.py +0 -334
  87. pyegeria-0.4.1/tests/test_glossary_omvs.py +0 -261
  88. pyegeria-0.4.1/tests/test_loaded_resources.py +0 -78
  89. pyegeria-0.4.1/tests/test_my_profile_omvs.py +0 -281
  90. pyegeria-0.4.1/tests/test_platform_services.py +0 -854
  91. pyegeria-0.4.1/tests/test_project_manager_omvs.py +0 -704
  92. pyegeria-0.4.1/tests/test_registered_info.py +0 -151
  93. pyegeria-0.4.1/tests/test_runtime_manager.py +0 -226
  94. pyegeria-0.4.1/tests/test_server_operations.py +0 -194
  95. pyegeria-0.4.1/tests/test_util_exp.py +0 -213
  96. pyegeria-0.4.1/tests/test_valid_metadata_omvs.py +0 -390
  97. pyegeria-0.4.1/tests/test_validators.py +0 -219
  98. {pyegeria-0.4.1 → pyegeria-0.5.1}/LICENSE +0 -0
  99. {pyegeria-0.4.1 → pyegeria-0.5.1}/README.md +0 -0
  100. {pyegeria-0.4.1/examples/Doc_Samples → pyegeria-0.5.1/examples/doc_samples}/Create_Collection_Sample.py +0 -0
  101. {pyegeria-0.4.1/examples/Doc_Samples → pyegeria-0.5.1/examples/doc_samples}/Create_Sustainability_Collection_Sample.py +0 -0
  102. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/catalog_user/README.md +0 -0
  103. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/catalog_user/__init__.py +0 -0
  104. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/developer/README.md +0 -0
  105. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/developer/__init__.py +0 -0
  106. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/operational/README.md +0 -0
  107. {pyegeria-0.4.1 → pyegeria-0.5.1}/examples/widgets/personal_organizer/README.md +0 -0
  108. {pyegeria-0.4.1/examples/widgets/operational → pyegeria-0.5.1/examples/widgets/personal_organizer}/__init__.py +0 -0
  109. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/Xfeedback_manager_omvs.py +0 -0
  110. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/Xloaded_resources_omvs.py +0 -0
  111. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/_client.py +0 -0
  112. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/_deprecated_gov_engine.py +0 -0
  113. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/_exceptions.py +0 -0
  114. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/_globals.py +0 -0
  115. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/_validators.py +0 -0
  116. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/action_author_omvs.py +0 -0
  117. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/asset_catalog_omvs.py +0 -0
  118. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/collection_manager_omvs.py +0 -0
  119. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/core_omag_server_config.py +0 -0
  120. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/full_omag_server_config.py +0 -0
  121. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/glossary_browser_omvs.py +0 -0
  122. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/glossary_manager_omvs.py +0 -0
  123. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/my_profile_omvs.py +0 -0
  124. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/platform_services.py +0 -0
  125. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/project_manager_omvs.py +0 -0
  126. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/registered_info.py +0 -0
  127. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/runtime_manager_omvs.py +0 -0
  128. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/server_operations.py +0 -0
  129. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/utils.py +0 -0
  130. {pyegeria-0.4.1/src → pyegeria-0.5.1}/pyegeria/valid_metadata_omvs.py +0 -0
@@ -1,27 +1,26 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.4.1
3
+ Version: 0.5.1
4
4
  Summary: A python client for Egeria
5
- Home-page: https://egeria-project.org/egeria-python
6
- Author: Dan Wolfson
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.12,<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
- Requires-Python: >=3.10
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Requires-Dist: confluent-kafka (>=2.5.0,<3.0.0)
17
+ Requires-Dist: httpx (>=0.27.0,<0.28.0)
18
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
19
+ Requires-Dist: rich (>=13.7.1,<14.0.0)
20
+ Requires-Dist: urllib3 (>=2.2.2,<3.0.0)
21
+ Requires-Dist: validators (>=0.32.0,<0.33.0)
22
+ Project-URL: Repository, https://github.com/odpi/egeria-python
15
23
  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
24
 
26
25
  <!-- SPDX-License-Identifier: CC-BY-4.0 -->
27
26
  <!-- Copyright Contributors to the ODPi Egeria project. -->
@@ -118,7 +118,7 @@ def display_assets(search_string: str, guid: str=None, server: str = good_server
118
118
  print_exception_response(e)
119
119
  assert e.related_http_code != "200", "Invalid parameters"
120
120
 
121
- if __name__ == "__main__":
121
+ def main():
122
122
  sus_guid = "f9b78b26-6025-43fa-9299-a905cc6d1575"
123
123
  parser = argparse.ArgumentParser()
124
124
  parser.add_argument("--server", help="Name of the server to display status for")
@@ -135,4 +135,7 @@ if __name__ == "__main__":
135
135
  guid = sus_guid if args.sustainability else None
136
136
 
137
137
  search_string = Prompt.ask("Enter the asset you are searching for:", default="*")
138
- display_assets(search_string, guid,server, url, userid)
138
+ display_assets(search_string, guid,server, url, userid)
139
+
140
+ if __name__ == "__main__":
141
+ main()
@@ -229,7 +229,7 @@ def asset_viewer(asset_guid: str, server_name:str, platform_url:str, user:str):
229
229
  print_exception_response(e)
230
230
 
231
231
 
232
- if __name__ == "__main__":
232
+ def main():
233
233
  parser = argparse.ArgumentParser()
234
234
 
235
235
  parser.add_argument("--server", help="Name of the server to display status for")
@@ -243,3 +243,6 @@ if __name__ == "__main__":
243
243
 
244
244
  asset_guid = Prompt.ask("Enter the Asset GUID to view:", default="8e35b39e-6ee7-4d60-aff5-4b09406c5e79")
245
245
  asset_viewer(asset_guid,server, url, userid)
246
+
247
+ if __name__ == "__main__":
248
+ main()
@@ -63,7 +63,7 @@ def collection_viewer(root: str, server_name: str, platform_url: str, user: str)
63
63
  print_exception_response(e)
64
64
 
65
65
 
66
- if __name__ == "__main__":
66
+ def main():
67
67
  parser = argparse.ArgumentParser()
68
68
 
69
69
  parser.add_argument("--server", help="Name of the server to display status for")
@@ -77,3 +77,6 @@ if __name__ == "__main__":
77
77
 
78
78
  root_collection = Prompt.ask("Enter the Root Collection to start from:", default="Digital Products Root")
79
79
  collection_viewer(root_collection, server, url, userid)
80
+
81
+ if __name__ == "__main__":
82
+ main()
@@ -115,7 +115,7 @@ def display_glossary_terms(search_string: str, guid: str=None, server: str = goo
115
115
  print_exception_response(e)
116
116
  assert e.related_http_code != "200", "Invalid parameters"
117
117
 
118
- if __name__ == "__main__":
118
+ def main():
119
119
  sus_guid = "f9b78b26-6025-43fa-9299-a905cc6d1575"
120
120
  parser = argparse.ArgumentParser()
121
121
  parser.add_argument("--server", help="Name of the server to display status for")
@@ -132,4 +132,7 @@ if __name__ == "__main__":
132
132
  guid = sus_guid if args.sustainability else None
133
133
 
134
134
  search_string = Prompt.ask("Enter the term you are searching for:", default="*")
135
- display_glossary_terms(search_string, guid,server, url, userid)
135
+ display_glossary_terms(search_string, guid,server, url, userid)
136
+
137
+ if __name__ == "__main__":
138
+ main()
@@ -11,17 +11,13 @@ A simple display for glossary terms
11
11
  """
12
12
 
13
13
  import argparse
14
- import httpx
15
14
  import json
16
- import time
17
15
 
18
- from rich import box
19
16
  from rich import print
20
17
  from rich.console import Console
21
18
  from rich.prompt import Prompt
22
19
  from rich.text import Text
23
20
  from rich.tree import Tree
24
- from rich.json import JSON
25
21
 
26
22
  from pyegeria import (
27
23
  InvalidParameterException,
@@ -30,7 +26,6 @@ from pyegeria import (
30
26
  print_exception_response,
31
27
  Client
32
28
  )
33
- from pyegeria import ProjectManager
34
29
 
35
30
 
36
31
  def display_guid(guid: str, server: str, url: str, username: str):
@@ -67,7 +62,7 @@ def display_guid(guid: str, server: str, url: str, username: str):
67
62
  else:
68
63
  print_exception_response(e)
69
64
 
70
- if __name__ == "__main__":
65
+ def main():
71
66
 
72
67
  parser = argparse.ArgumentParser()
73
68
  parser.add_argument("--server", help="Name of the server to display status for")
@@ -83,4 +78,7 @@ if __name__ == "__main__":
83
78
 
84
79
  guid = Prompt.ask("Enter the GUID to retrieve:", default=None)
85
80
 
86
- display_guid(guid, server, url, userid)
81
+ display_guid(guid, server, url, userid)
82
+
83
+ if __name__ == "__main__":
84
+ main()
@@ -7,33 +7,19 @@ A simple viewer for collections - provide the root and we display the hierarchy
7
7
 
8
8
  """
9
9
 
10
- import time
11
10
  import argparse
12
11
 
13
- from rich.box import Box
14
- from rich.markdown import Markdown
12
+ from rich import print
13
+ from rich.panel import Panel
15
14
  from rich.prompt import Prompt
16
-
17
- from pyegeria._exceptions import (
18
- InvalidParameterException,
19
- PropertyServerException,
20
- UserNotAuthorizedException,
21
- print_exception_response,
22
- )
23
- from rich.table import Table
24
- from rich.live import Live
25
15
  from rich.text import Text
26
16
  from rich.tree import Tree
27
- from rich.markdown import Markdown
28
17
 
29
- from rich import print
30
- from rich.console import Group
31
- from rich.panel import Panel
32
- from rich import box, align
33
- from rich.layout import Layout
34
- import rich
35
- from pyegeria import (CollectionManager, UserNotAuthorizedException, PropertyServerException,
18
+ from pyegeria import (UserNotAuthorizedException, PropertyServerException,
36
19
  InvalidParameterException, AutomatedCuration)
20
+ from pyegeria._exceptions import (
21
+ print_exception_response,
22
+ )
37
23
 
38
24
  disable_ssl_warnings = True
39
25
 
@@ -95,7 +81,7 @@ def tech_viewer(tech: str, server_name:str, platform_url:str, user:str):
95
81
  print_exception_response(e)
96
82
 
97
83
 
98
- if __name__ == "__main__":
84
+ def main():
99
85
  parser = argparse.ArgumentParser()
100
86
 
101
87
  parser.add_argument("--server", help="Name of the server to display status for")
@@ -109,3 +95,6 @@ if __name__ == "__main__":
109
95
 
110
96
  tech = Prompt.ask("Enter the Technology to start from:", default="PostgreSQL Server")
111
97
  tech_viewer(tech,server, url, userid)
98
+
99
+ if __name__ == "__main__":
100
+ main()
@@ -74,7 +74,7 @@ def display_asset_types(server: str, url: str, username: str):
74
74
  r_client.close_session()
75
75
 
76
76
 
77
- if __name__ == "__main__":
77
+ def main():
78
78
  parser = argparse.ArgumentParser()
79
79
  parser.add_argument("--server", help="Name of the server to display status for")
80
80
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -89,3 +89,6 @@ if __name__ == "__main__":
89
89
  guid = None
90
90
 
91
91
  display_asset_types(server, url, userid)
92
+
93
+ if __name__ == "__main__":
94
+ main()
@@ -116,7 +116,7 @@ def display_registered_svcs(service: str, server: str , url: str,
116
116
  a_client.close_session()
117
117
 
118
118
 
119
- if __name__ == "__main__":
119
+ def main():
120
120
  parser = argparse.ArgumentParser()
121
121
  parser.add_argument("--server", help="Name of the server to display status for")
122
122
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -133,3 +133,6 @@ if __name__ == "__main__":
133
133
  svc_kind = Prompt.ask("Enter the service type you are searching for:", default="all")
134
134
 
135
135
  display_registered_svcs(svc_kind, server, url, userid, password=password)
136
+
137
+ if __name__ == "__main__":
138
+ main()
@@ -104,8 +104,7 @@ def display_list(type_name:str, server: str, url: str ,
104
104
  else:
105
105
  print_exception_response(e)
106
106
 
107
- if __name__ == "__main__":
108
-
107
+ def main():
109
108
  parser = argparse.ArgumentParser()
110
109
  parser.add_argument("--server", help="Name of the server to display status for")
111
110
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -120,4 +119,7 @@ if __name__ == "__main__":
120
119
  save_output = args.save_output if args.save_output is not None else False
121
120
  type_name = Prompt.ask("Enter the Type Name to retrieve:", default="AssetOwner")
122
121
 
123
- display_list(type_name, server, url, userid, save_output)
122
+ display_list(type_name, server, url, userid, save_output)
123
+
124
+ if __name__ == "__main__":
125
+ main()
@@ -109,7 +109,7 @@ def display_tech_types(search_string:str = "*", server: str = server,
109
109
  a_client.close_session()
110
110
 
111
111
 
112
- if __name__ == "__main__":
112
+ def main():
113
113
  parser = argparse.ArgumentParser()
114
114
  parser.add_argument("--server", help="Name of the server to display status for")
115
115
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -128,7 +128,8 @@ if __name__ == "__main__":
128
128
 
129
129
  display_tech_types(search_string, server, url, userid, password)
130
130
 
131
-
131
+ if __name__ == "__main__":
132
+ main()
132
133
 
133
134
 
134
135
 
@@ -23,7 +23,6 @@ from pyegeria import (
23
23
  PropertyServerException,
24
24
  UserNotAuthorizedException,
25
25
  print_exception_response,
26
- RegisteredInfo,
27
26
  AutomatedCuration
28
27
  )
29
28
 
@@ -106,7 +105,7 @@ def display_tech_types(search_string:str = "*", server: str = good_server_3, url
106
105
  a_client.close_session()
107
106
 
108
107
 
109
- if __name__ == "__main__":
108
+ def main():
110
109
  parser = argparse.ArgumentParser()
111
110
  parser.add_argument("--server", help="Name of the server to display status for")
112
111
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -122,3 +121,6 @@ if __name__ == "__main__":
122
121
  search_string = Prompt.ask("Enter the technology you are searching for:", default="*")
123
122
 
124
123
  display_tech_types(search_string, server, url, userid)
124
+
125
+ if __name__ == "__main__":
126
+ main()
@@ -10,22 +10,22 @@ Unit tests for the Utils helper functions using the Pytest framework.
10
10
  A simple display for glossary terms
11
11
  """
12
12
 
13
- import time
14
- import json
15
13
  import argparse
14
+ import json
15
+ import time
16
+
17
+ from rich import box
18
+ from rich import print
19
+ from rich.console import Console
20
+ from rich.prompt import Prompt
21
+ from rich.table import Table
22
+
16
23
  from pyegeria import (
17
24
  InvalidParameterException,
18
25
  PropertyServerException,
19
26
  UserNotAuthorizedException,
20
27
  print_exception_response,
21
28
  )
22
- from rich.table import Table
23
- from rich.live import Live
24
- from rich import box
25
- from rich.prompt import Prompt
26
- from rich.tree import Tree
27
- from rich import print
28
- from rich.console import Console
29
29
  from pyegeria import ValidMetadataManager
30
30
 
31
31
  disable_ssl_warnings = True
@@ -125,8 +125,7 @@ def display_values(property_name: str, type_name: str=None, server: str = good_s
125
125
  else:
126
126
  print_exception_response(e)
127
127
 
128
- if __name__ == "__main__":
129
-
128
+ def main():
130
129
  parser = argparse.ArgumentParser()
131
130
  parser.add_argument("--server", help="Name of the server to display status for")
132
131
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -141,4 +140,7 @@ if __name__ == "__main__":
141
140
  save_output = args.save_output if args.save_output is not None else False
142
141
  property_name = Prompt.ask("Enter the Property to retrieve:", default="projectHealth")
143
142
  type_name = Prompt.ask("Enter the Metadata Type to filter on:", default="Project")
144
- display_values(property_name, type_name,server, url, userid, save_output)
143
+ display_values(property_name, type_name,server, url, userid, save_output)
144
+
145
+ if __name__ == "__main__":
146
+ main()
@@ -0,0 +1,7 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+
6
+ """
7
+ import pyegeria
@@ -121,7 +121,7 @@ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str):
121
121
  print_exception_response(e)
122
122
 
123
123
 
124
- if __name__ == "__main__":
124
+ def main():
125
125
  parser = argparse.ArgumentParser()
126
126
 
127
127
  parser.add_argument("--server", help="Name of the server to display status for")
@@ -135,3 +135,6 @@ if __name__ == "__main__":
135
135
 
136
136
  tech_name = Prompt.ask("Enter the Asset Name to view:", default="Apache Kafka Server")
137
137
  tech_viewer(tech_name,server, url, userid)
138
+
139
+ if __name__ == "__main__":
140
+ main()
@@ -5,12 +5,15 @@ Copyright Contributors to the ODPi Egeria project.
5
5
 
6
6
  Display the status of cataloged platforms and servers.
7
7
  """
8
- import sys
9
- import time
10
8
  import argparse
9
+ import sys
11
10
 
12
- from rich import json
11
+ from rich import print
12
+ from rich.console import Console
13
+ from rich.markdown import Markdown
13
14
  from rich.panel import Panel
15
+ from rich.prompt import Prompt
16
+ from rich.tree import Tree
14
17
 
15
18
  from pyegeria import (
16
19
  InvalidParameterException,
@@ -19,15 +22,6 @@ from pyegeria import (
19
22
  print_exception_response,
20
23
  AutomatedCuration
21
24
  )
22
- from rich.table import Table
23
- from rich.live import Live
24
- from rich.console import Console
25
- from rich.markdown import Markdown
26
- from rich.tree import Tree
27
- from rich.prompt import Prompt
28
- from rich.panel import Panel
29
- from rich.text import Text
30
- from rich import print
31
25
 
32
26
  disable_ssl_warnings = True
33
27
  console = Console(width=200)
@@ -121,7 +115,7 @@ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str):
121
115
  print_exception_response(e)
122
116
 
123
117
 
124
- if __name__ == "__main__":
118
+ def main():
125
119
  parser = argparse.ArgumentParser()
126
120
 
127
121
  parser.add_argument("--server", help="Name of the server to display status for")
@@ -135,3 +129,6 @@ if __name__ == "__main__":
135
129
 
136
130
  tech_name = Prompt.ask("Enter the Asset Name to view:", default="Apache Kafka Server")
137
131
  tech_viewer(tech_name,server, url, userid)
132
+
133
+ if __name__ == "__main__":
134
+ main()
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+ Display the status of cataloged platforms and servers.
7
+ """
8
+ import json
9
+ import sys
10
+ import time
11
+ import argparse
12
+ from datetime import datetime
13
+ from rich.prompt import Prompt
14
+ from rich.table import Table
15
+ from rich.live import Live
16
+ from rich.console import Console
17
+ from rich.markdown import Markdown
18
+ from confluent_kafka import Consumer, KafkaException
19
+
20
+ def main():
21
+
22
+ disable_ssl_warnings = True
23
+ console = Console(width=200)
24
+ now = datetime.now()
25
+ current_time = now.strftime("%H:%M:%S")
26
+
27
+ earliest_latest = Prompt.ask("Msgs from earliest or latest:", default="earliest")
28
+
29
+ # Define the Kafka consumer configuration.
30
+ config = {
31
+ 'bootstrap.servers': 'localhost:9092', # replace with your Kafka broker(s)
32
+ 'group.id': f"view_asset_events:{current_time}", # replace with your consumer group
33
+ 'auto.offset.reset': earliest_latest # can be set to 'earliest' or 'latest'
34
+ }
35
+
36
+ # Initialize a Kafka consumer.
37
+ consumer = Consumer(config)
38
+
39
+ # Subscribe to a Kafka topic.
40
+ consumer.subscribe(['egeria.omag.server.active-metadata-store.omas.assetconsumer.outTopic']) # replace with your Kafka topic
41
+
42
+ try:
43
+ while True:
44
+ msg = consumer.poll(1.0) # timeout set to 1 second
45
+
46
+ if msg is None:
47
+ continue
48
+ elif msg.error():
49
+ raise KafkaException(msg.error())
50
+ else:
51
+ event = json.loads(msg.value())
52
+ event_time = event["eventTime"]
53
+ event_type = event["eventType"]
54
+ guid = event["elementHeader"]["guid"]
55
+
56
+ type_name = event["elementHeader"]["type"]["typeName"]
57
+ origin = event["elementHeader"]["origin"]["sourceServer"]
58
+
59
+ element_properties = event["elementProperties"]
60
+ element_properties_keys = element_properties.keys()
61
+ props = " "
62
+ for key in element_properties_keys:
63
+ value = element_properties[key]
64
+ props += f"* {key}: {value}\n"
65
+ console.rule(style= "[bold red]")
66
+ console.rule(f"\tMessage TimeStamp: {event_time}\t eventType: {event_type}\t typeName: {type_name}\t guid: {guid}")
67
+ msg = (
68
+
69
+ f"properties: \n{props}\n\n")
70
+ msg = Markdown(msg)
71
+
72
+ console.print(msg)
73
+ finally:
74
+ # Close down consumer to commit final offsets.
75
+ consumer.close()
76
+
77
+ if __name__ == "__main__":
78
+ main()
@@ -85,7 +85,7 @@ def display_status(server: str, url: str, username: str):
85
85
  p_client2.close_session()
86
86
  p_client3.close_session()
87
87
 
88
- if __name__ == "__main__":
88
+ def main():
89
89
  parser = argparse.ArgumentParser()
90
90
  parser.add_argument("--server", help="Name of the server to display status for")
91
91
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -97,3 +97,6 @@ if __name__ == "__main__":
97
97
  userid = args.userid if args.userid is not None else 'garygeeke'
98
98
 
99
99
  display_status(server, url, userid)
100
+
101
+ if __name__ == "__main__":
102
+ main()
@@ -118,7 +118,7 @@ def display_status_engine_actions(server: str, url: str, user: str):
118
118
  g_client.close_session()
119
119
 
120
120
 
121
- if __name__ == "__main__":
121
+ def main():
122
122
  parser = argparse.ArgumentParser()
123
123
  parser.add_argument("--server", help="Name of the server to display status for")
124
124
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -130,3 +130,6 @@ if __name__ == "__main__":
130
130
  userid = args.userid if args.userid is not None else 'garygeeke'
131
131
  print(f"Starting display_status_engine_actions with {server}, {url}, {userid}")
132
132
  display_status_engine_actions(server=server, url=url, user=userid)
133
+
134
+ if __name__ == "__main__":
135
+ main()
@@ -106,7 +106,7 @@ def display_gov_actions_status(server: str = good_server_3, url: str = good_plat
106
106
  s_client.close_session()
107
107
 
108
108
 
109
- if __name__ == "__main__":
109
+ def main():
110
110
  parser = argparse.ArgumentParser()
111
111
  parser.add_argument("--server", help="Name of the server to display status for")
112
112
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -117,3 +117,6 @@ if __name__ == "__main__":
117
117
  url = args.url if args.url is not None else "https://localhost:9443"
118
118
  userid = args.userid if args.userid is not None else 'garygeeke'
119
119
  display_gov_actions_status(server=server, url=url, username=userid)
120
+
121
+ if __name__ == "__main__":
122
+ main()
@@ -17,9 +17,7 @@ import time
17
17
 
18
18
  from rich import box
19
19
  from rich.live import Live
20
- from rich.markdown import Markdown
21
20
  from rich.table import Table
22
- from rich.text import Text
23
21
 
24
22
  from pyegeria import ServerOps, AutomatedCuration
25
23
  from pyegeria._exceptions import (
@@ -121,7 +119,7 @@ def display_integration_daemon_status(integ_server: str, integ_url: str,
121
119
  a_client.close_session()
122
120
 
123
121
 
124
- if __name__ == "__main__":
122
+ def main():
125
123
  parser = argparse.ArgumentParser()
126
124
  parser.add_argument("--integ_server", help="Name of the integration server to display status for")
127
125
  parser.add_argument("--integ_url", help="URL Platform to connect to")
@@ -138,3 +136,6 @@ if __name__ == "__main__":
138
136
  display_integration_daemon_status(integ_server=integ_server, integ_url=integ_url,
139
137
  view_server = view_server, view_url = view_url,
140
138
  user=userid)
139
+
140
+ if __name__ == "__main__":
141
+ main()
@@ -109,7 +109,7 @@ def display_status(server: str, url: str, username: str):
109
109
  r_client.close_session()
110
110
 
111
111
 
112
- if __name__ == "__main__":
112
+ def main():
113
113
  parser = argparse.ArgumentParser()
114
114
  parser.add_argument("--server", help="Name of the server to display status for")
115
115
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -121,3 +121,7 @@ if __name__ == "__main__":
121
121
  userid = args.userid if args.userid is not None else 'erinoverview'
122
122
 
123
123
  display_status(server, url, userid)
124
+
125
+
126
+ if __name__ == "__main__":
127
+ main()
@@ -79,7 +79,7 @@ def display_status(server: str, url: str, username: str):
79
79
  c_client.close_session()
80
80
 
81
81
 
82
- if __name__ == "__main__":
82
+ def main():
83
83
  parser = argparse.ArgumentParser()
84
84
  parser.add_argument("--server", help="Name of the server to display status for")
85
85
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -91,3 +91,6 @@ if __name__ == "__main__":
91
91
  userid = args.userid if args.userid is not None else 'garygeeke'
92
92
 
93
93
  display_status(server, url, userid)
94
+
95
+ if __name__ == "__main__":
96
+ main()
@@ -12,16 +12,16 @@ A simple server status display
12
12
  import time
13
13
  import argparse
14
14
 
15
- from pyegeria._exceptions import (
15
+ from pyegeria import (
16
16
  InvalidParameterException,
17
17
  PropertyServerException,
18
18
  UserNotAuthorizedException,
19
19
  print_exception_response,
20
+ ServerOps
20
21
  )
21
22
  from rich.table import Table
22
23
  from rich.live import Live
23
24
 
24
- from pyegeria.server_operations import ServerOps
25
25
 
26
26
 
27
27
  def test_display_status(server: str, url: str , username: str ):
@@ -72,7 +72,7 @@ def test_display_status(server: str, url: str , username: str ):
72
72
  assert e.related_http_code != "200", "Invalid parameters"
73
73
 
74
74
 
75
- if __name__ == "__main__":
75
+ def main():
76
76
  parser = argparse.ArgumentParser()
77
77
  parser.add_argument("--server", help="Name of the server to display status for")
78
78
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -84,3 +84,6 @@ if __name__ == "__main__":
84
84
  userid = args.userid if args.userid is not None else 'garygeeke'
85
85
 
86
86
  test_display_status(server, url, userid)
87
+
88
+ if __name__ == "__main__":
89
+ main()