pyegeria 1.5.1.1.28__tar.gz → 1.5.1.1.30__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 (117) hide show
  1. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/PKG-INFO +1 -1
  2. pyegeria-1.5.1.1.30/pyegeria/commands/__init__.py +12 -0
  3. pyegeria-1.5.1.1.30/pyegeria/commands/cat/__init__.py +5 -0
  4. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/glossary_actions.py +0 -88
  5. pyegeria-1.5.1.1.30/pyegeria/commands/cat/list_glossaries.py +131 -0
  6. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cli/egeria.py +18 -2
  7. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cli/egeria_cat.py +18 -3
  8. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/__init__.py +6 -6
  9. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyproject.toml +2 -2
  10. pyegeria-1.5.1.1.28/pyegeria/commands/__init__.py +0 -14
  11. pyegeria-1.5.1.1.28/pyegeria/commands/cat/__init__.py +0 -5
  12. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/LICENSE +0 -0
  13. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/README.md +0 -0
  14. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/README.md +0 -0
  15. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/__init__.py +0 -0
  16. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/_client.py +0 -0
  17. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/_deprecated_gov_engine.py +0 -0
  18. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/_exceptions.py +0 -0
  19. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/_globals.py +0 -0
  20. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/_validators.py +0 -0
  21. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/asset_catalog_omvs.py +0 -0
  22. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/automated_curation_omvs.py +0 -0
  23. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/classification_manager_omvs.py +0 -0
  24. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/collection_manager_omvs.py +0 -0
  25. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/.DS_Store +0 -0
  26. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/README.md +0 -0
  27. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/__pycache__/server_status_widget.cpython-312-pytest-7.4.4.pyc +0 -0
  28. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/README.md +0 -0
  29. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/get_asset_graph.py +0 -0
  30. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/get_collection.py +0 -0
  31. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/get_project_dependencies.py +0 -0
  32. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/get_project_structure.py +0 -0
  33. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/get_tech_type_elements.py +0 -0
  34. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/get_tech_type_template.py +0 -0
  35. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_archives.py +0 -0
  36. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_assets.py +0 -0
  37. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_cert_types.py +0 -0
  38. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_deployed_catalogs.py +0 -0
  39. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_deployed_database_schemas.py +0 -0
  40. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_deployed_databases.py +0 -0
  41. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_projects.py +0 -0
  42. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_relationships.py +0 -0
  43. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_tech_types.py +0 -0
  44. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_terms.py +0 -0
  45. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_todos.py +0 -0
  46. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cat/list_user_ids.py +0 -0
  47. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cli/__init__.py +0 -0
  48. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cli/egeria_my.py +0 -0
  49. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cli/egeria_ops.py +0 -0
  50. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cli/egeria_tech.py +0 -0
  51. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/cli/ops_config.py +0 -0
  52. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/my/README.md +0 -0
  53. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/my/__init__.py +0 -0
  54. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/my/list_my_profile.py +0 -0
  55. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/my/list_my_roles.py +0 -0
  56. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/my/monitor_my_todos.py +0 -0
  57. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/my/monitor_open_todos.py +0 -0
  58. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/my/todo_actions.py +0 -0
  59. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/README.md +0 -0
  60. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/engine_actions.py +0 -0
  61. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/gov_server_actions.py +0 -0
  62. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/list_catalog_targets.py +0 -0
  63. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/load_archive.py +0 -0
  64. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/monitor_asset_events.py +0 -0
  65. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/monitor_engine_activity.py +0 -0
  66. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/monitor_engine_activity_c.py +0 -0
  67. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/monitor_gov_eng_status.py +0 -0
  68. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/monitor_integ_daemon_status.py +0 -0
  69. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/monitor_platform_status.py +0 -0
  70. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/monitor_server_startup.py +0 -0
  71. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/monitor_server_status.py +0 -0
  72. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/orig_monitor_server_list.py +0 -0
  73. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/orig_monitor_server_status.py +0 -0
  74. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/refresh_integration_daemon.py +0 -0
  75. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/restart_integration_daemon.py +0 -0
  76. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/ops/table_integ_daemon_status.py +0 -0
  77. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/README.md +0 -0
  78. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/__init__.py +0 -0
  79. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/get_element_graph.py +0 -0
  80. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/get_element_info.py +0 -0
  81. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/get_guid_info.py +0 -0
  82. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/get_tech_details.py +0 -0
  83. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_asset_types.py +0 -0
  84. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_elements.py +0 -0
  85. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_elements_for_classification.py +0 -0
  86. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_elements_x.py +0 -0
  87. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_gov_action_processes.py +0 -0
  88. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_registered_services.py +0 -0
  89. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_related_elements.py +0 -0
  90. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_related_specification.py +0 -0
  91. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_relationship_types.py +0 -0
  92. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_tech_templates.py +0 -0
  93. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/list_valid_metadata_values.py +0 -0
  94. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/table_tech_templates.py +0 -0
  95. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/commands/tech/x_list_related_elements.py +0 -0
  96. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/core_omag_server_config.py +0 -0
  97. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/create_tech_guid_lists.py +0 -0
  98. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/egeria_cat_client.py +0 -0
  99. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/egeria_client.py +0 -0
  100. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/egeria_config_client.py +0 -0
  101. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/egeria_my_client.py +0 -0
  102. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/egeria_tech_client.py +0 -0
  103. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/feedback_manager_omvs.py +0 -0
  104. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/full_omag_server_config.py +0 -0
  105. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/glossary_browser_omvs.py +0 -0
  106. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/glossary_manager_omvs.py +0 -0
  107. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/mermaid_utilities.py +0 -0
  108. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/my_profile_omvs.py +0 -0
  109. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/platform_services.py +0 -0
  110. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/project_manager_omvs.py +0 -0
  111. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/registered_info.py +0 -0
  112. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/runtime_manager_omvs.py +0 -0
  113. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/server_operations.py +0 -0
  114. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/template_manager_omvs.py +0 -0
  115. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/utils.py +0 -0
  116. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/valid_metadata_omvs.py +0 -0
  117. {pyegeria-1.5.1.1.28 → pyegeria-1.5.1.1.30}/pyegeria/x_action_author_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 1.5.1.1.28
3
+ Version: 1.5.1.1.30
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -0,0 +1,12 @@
1
+ """
2
+
3
+ Widgets
4
+ """
5
+
6
+ from .ops.monitor_gov_eng_status import display_gov_eng_status
7
+ from .ops.monitor_integ_daemon_status import display_integration_daemon_status
8
+ from .cat.list_glossaries import display_glossaries
9
+ from .cat.list_terms import display_glossary_terms
10
+ from .ops.table_integ_daemon_status import (
11
+ display_integration_daemon_status as table_integ_daemon_status,
12
+ )
@@ -0,0 +1,5 @@
1
+ from .list_glossaries import display_glossaries
2
+ from .list_terms import display_glossary_terms
3
+ from .list_deployed_catalogs import list_deployed_catalogs
4
+ from .list_deployed_database_schemas import list_deployed_database_schemas
5
+ from .list_deployed_databases import list_deployed_databases
@@ -117,94 +117,6 @@ def create_glossary(
117
117
  m_client.close_session()
118
118
 
119
119
 
120
- def display_glossaries(
121
- search_string: str,
122
- server: str,
123
- url: str,
124
- userid: str,
125
- password: str,
126
- timeout: int,
127
- jupyter: bool,
128
- width: int,
129
- ):
130
- list_glossaries(
131
- search_string, server, url, userid, password, timeout, jupyter, width
132
- )
133
-
134
-
135
- @click.command("glossaries")
136
- @click.option("--search-string", default="*", help="Glossaries to search for")
137
- @click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use")
138
- @click.option(
139
- "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
140
- )
141
- @click.option("--userid", default=EGERIA_USER, help="Egeria user")
142
- @click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
143
- @click.option("--timeout", default=60, help="Number of seconds to wait")
144
- @click.option(
145
- "--jupyter",
146
- is_flag=True,
147
- default=False,
148
- envvar="EGERIA_JUPYTER",
149
- help="Enable for rendering in a Jupyter terminal",
150
- )
151
- @click.option(
152
- "--width",
153
- default=200,
154
- envvar="EGERIA_WIDTH",
155
- help="Screen width, in characters, to use",
156
- )
157
- def list_glossaries(
158
- search_string, server, url, userid, password, timeout, jupyter, width
159
- ):
160
- """List all glossaries"""
161
- m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
162
- token = m_client.create_egeria_bearer_token()
163
- try:
164
- table = Table(
165
- title=f"Glossary List @ {time.asctime()}",
166
- style="bright_white on black",
167
- header_style="bright_white on dark_blue",
168
- title_style="bold white on black",
169
- caption_style="white on black",
170
- show_lines=True,
171
- box=box.ROUNDED,
172
- caption=f"View Server '{server}' @ Platform - {url}",
173
- expand=True,
174
- )
175
- table.add_column("Glossary Name")
176
- table.add_column("Qualified Name / GUID", width=38, no_wrap=True)
177
- table.add_column("Language")
178
- table.add_column("Description")
179
- table.add_column("Usage")
180
-
181
- glossaries = m_client.find_glossaries(search_string)
182
- if type(glossaries) is list:
183
- sorted_glossary_list = sorted(
184
- glossaries, key=lambda k: k["glossaryProperties"]["displayName"]
185
- )
186
- for glossary in sorted_glossary_list:
187
- display_name = glossary["glossaryProperties"]["displayName"]
188
- qualified_name = glossary["glossaryProperties"]["qualifiedName"]
189
- guid = glossary["elementHeader"]["guid"]
190
- q_name = f"{qualified_name}\n\n{guid}"
191
- language = glossary["glossaryProperties"]["language"]
192
- description = glossary["glossaryProperties"]["description"]
193
- usage = glossary["glossaryProperties"]["usage"]
194
- table.add_row(display_name, q_name, language, description, usage)
195
- console = Console(
196
- style="bold bright_white on black",
197
- width=width,
198
- force_terminal=not jupyter,
199
- )
200
- console.print(table)
201
-
202
- except (InvalidParameterException, PropertyServerException) as e:
203
- print_exception_response(e)
204
- finally:
205
- m_client.close_session()
206
-
207
-
208
120
  @click.command("delete-glossary")
209
121
  @click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use")
210
122
  @click.option(
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+ Unit tests for the Utils helper functions using the Pytest framework.
7
+
8
+
9
+ A simple display for glossary terms
10
+ """
11
+ import argparse
12
+ import os
13
+ import sys
14
+ import time
15
+
16
+ from rich import box
17
+ from rich.console import Console
18
+ from rich.prompt import Prompt
19
+ from rich.table import Table
20
+ from rich.text import Text
21
+
22
+ from pyegeria import (
23
+ InvalidParameterException,
24
+ PropertyServerException,
25
+ UserNotAuthorizedException,
26
+ EgeriaTech,
27
+ print_exception_response,
28
+ )
29
+
30
+ disable_ssl_warnings = True
31
+
32
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
33
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
34
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
35
+ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
36
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
37
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
38
+ )
39
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
40
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
41
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
42
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
43
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
44
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
45
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
46
+
47
+
48
+ def display_glossaries(
49
+ search_string: str,
50
+ server: str,
51
+ url: str,
52
+ userid: str,
53
+ password: str,
54
+ jupyter: bool = EGERIA_JUPYTER,
55
+ width: int = EGERIA_WIDTH,
56
+ ):
57
+ """List all glossaries"""
58
+ m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
59
+ token = m_client.create_egeria_bearer_token()
60
+ try:
61
+ table = Table(
62
+ title=f"Glossary List @ {time.asctime()}",
63
+ style="bright_white on black",
64
+ header_style="bright_white on dark_blue",
65
+ title_style="bold white on black",
66
+ caption_style="white on black",
67
+ show_lines=True,
68
+ box=box.ROUNDED,
69
+ caption=f"View Server '{server}' @ Platform - {url}",
70
+ expand=True,
71
+ )
72
+ table.add_column("Glossary Name")
73
+ table.add_column("Qualified Name / GUID", width=38, no_wrap=True)
74
+ table.add_column("Language")
75
+ table.add_column("Description")
76
+ table.add_column("Usage")
77
+
78
+ glossaries = m_client.find_glossaries(search_string)
79
+ if type(glossaries) is list:
80
+ sorted_glossary_list = sorted(
81
+ glossaries, key=lambda k: k["glossaryProperties"]["displayName"]
82
+ )
83
+ for glossary in sorted_glossary_list:
84
+ display_name = glossary["glossaryProperties"]["displayName"]
85
+ qualified_name = glossary["glossaryProperties"]["qualifiedName"]
86
+ guid = glossary["elementHeader"]["guid"]
87
+ q_name = f"{qualified_name}\n\n{guid}"
88
+ language = glossary["glossaryProperties"]["language"]
89
+ description = glossary["glossaryProperties"]["description"]
90
+ usage = glossary["glossaryProperties"]["usage"]
91
+ table.add_row(display_name, q_name, language, description, usage)
92
+ console = Console(
93
+ style="bold bright_white on black",
94
+ width=width,
95
+ force_terminal=not jupyter,
96
+ )
97
+ console.print(table)
98
+
99
+ except (InvalidParameterException, PropertyServerException) as e:
100
+ print_exception_response(e)
101
+ finally:
102
+ m_client.close_session()
103
+
104
+
105
+ def main():
106
+ parser = argparse.ArgumentParser()
107
+ parser.add_argument("--server", help="Name of the server to display status for")
108
+ parser.add_argument("--url", help="URL Platform to connect to")
109
+ parser.add_argument("--userid", help="User Id")
110
+ parser.add_argument("--password", help="User Password")
111
+
112
+ args = parser.parse_args()
113
+
114
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
115
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
116
+ userid = args.userid if args.userid is not None else EGERIA_USER
117
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
118
+
119
+ try:
120
+ search_string = Prompt.ask(
121
+ "Enter the glossary you are searching for or '*' for all:", default="*"
122
+ )
123
+
124
+ display_glossaries(search_string, server, url, userid, user_pass)
125
+
126
+ except KeyboardInterrupt:
127
+ pass
128
+
129
+
130
+ if __name__ == "__main__":
131
+ main()
@@ -40,11 +40,12 @@ from pyegeria.commands.cat.list_deployed_databases import list_deployed_database
40
40
  from pyegeria.commands.cat.glossary_actions import (
41
41
  create_glossary,
42
42
  delete_glossary,
43
- list_glossaries,
44
43
  create_term,
45
44
  load_terms,
46
45
  export_terms,
47
46
  )
47
+ from pyegeria.commands.cat.list_glossaries import display_glossaries
48
+
48
49
  from pyegeria.commands.my.todo_actions import (
49
50
  mark_todo_complete,
50
51
  reassign_todo,
@@ -978,7 +979,22 @@ def list_databases(ctx):
978
979
  )
979
980
 
980
981
 
981
- show.add_command(list_glossaries)
982
+ @show.command("list-glossaries")
983
+ @click.option("--search_string", default="*", help="Name to search for glossaries")
984
+ @click.pass_context
985
+ def list_glossaries(ctx, search_string):
986
+ """Display a tree graph of information about an asset"""
987
+ c = ctx.obj
988
+ display_glossaries(
989
+ search_string,
990
+ c.view_server,
991
+ c.view_server_url,
992
+ c.userid,
993
+ c.password,
994
+ c.jupyter,
995
+ c.width,
996
+ )
997
+
982
998
 
983
999
  #
984
1000
  # Catalog User: Tell
@@ -23,9 +23,9 @@ from pyegeria.commands.cat.glossary_actions import (
23
23
  delete_glossary,
24
24
  create_term,
25
25
  load_terms,
26
- list_glossaries,
27
26
  export_terms,
28
27
  )
28
+ from pyegeria.commands.cat.list_glossaries import display_glossaries
29
29
  from pyegeria.commands.cat.list_archives import display_archive_list
30
30
  from pyegeria.commands.cat.list_assets import display_assets
31
31
  from pyegeria.commands.cat.list_cert_types import display_certifications
@@ -550,6 +550,23 @@ def list_catalogs(ctx, search_server):
550
550
  )
551
551
 
552
552
 
553
+ @show.command("list-glossaries")
554
+ @click.option("--search_string", default="*", help="Name to search for glossaries")
555
+ @click.pass_context
556
+ def list_glossaries(ctx, search_string):
557
+ """Display a tree graph of information about an asset"""
558
+ c = ctx.obj
559
+ display_glossaries(
560
+ search_string,
561
+ c.view_server,
562
+ c.view_server_url,
563
+ c.userid,
564
+ c.password,
565
+ c.jupyter,
566
+ c.width,
567
+ )
568
+
569
+
553
570
  @show.command("list-databases")
554
571
  @click.pass_context
555
572
  def list_databases(ctx):
@@ -560,8 +577,6 @@ def list_databases(ctx):
560
577
  )
561
578
 
562
579
 
563
- show.add_command(list_glossaries)
564
-
565
580
  #
566
581
  # Tell
567
582
  #
@@ -4,12 +4,12 @@ Copyright Contributors to the ODPi Egeria project.
4
4
 
5
5
 
6
6
  """
7
-
8
- from monitor_integ_daemon_status import display_integration_daemon_status
9
- from monitor_gov_eng_status import display_gov_eng_status
10
- from monitor_platform_status import display_status as display_platform_status
11
- from monitor_server_status import display_status as display_server_status
12
- from monitor_engine_activity_c import display_engine_activity_c
7
+ #
8
+ # from .monitor_integ_daemon_status import display_integration_daemon_status
9
+ # from .monitor_gov_eng_status import display_gov_eng_status
10
+ # from .monitor_platform_status import display_status as display_platform_status
11
+ # from .monitor_server_status import display_status as display_server_status
12
+ # from .monitor_engine_activity_c import display_engine_activity_c
13
13
 
14
14
  # import monitor_server_status
15
15
  # import monitor_server_list
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "1.5.1.1.28"
3
+ version = "1.5.1.1.30"
4
4
  license = 'Apache 2.0'
5
5
  authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
6
6
  readme = "README.md"
@@ -73,7 +73,7 @@ pytest = "^8.2.2"
73
73
  create_glossary = "pyegeria.commands.cat.glossary_actions:create_glossary"
74
74
  delete_glossary = "pyegeria.commands.cat.glossary_actions:delete_glossary"
75
75
  create_term = "pyegeria.commands.cat.glossary_actions:create_term"
76
- list_glossaries = "pyegeria.commands.cat.glossary_actions:list_glossaries"
76
+ list_glossaries = "pyegeria.commands.cat.list_glossaries:main"
77
77
  load_terms_from_file = "pyegeria.commands.cat.glossary_actions:load_terms"
78
78
  export_terms_to_file = "pyegeria.commands.cat.glossary_actions:export_terms"
79
79
 
@@ -1,14 +0,0 @@
1
- """
2
-
3
- Widgets
4
- """
5
-
6
- # from ops.monitor_gov_eng_status import display_gov_eng_status
7
- # from ops.monitor_integ_daemon_status import display_integration_daemon_status
8
- # from cat.glossary_actions import display_glossaries
9
- # from cat.list_terms import display_glossary_terms
10
- # from ops.table_integ_daemon_status import display_integration_daemon_status
11
- import ops
12
- import cat
13
- import tech
14
- import my
@@ -1,5 +0,0 @@
1
- from glossary_actions import display_glossaries
2
- from list_terms import display_glossary_terms
3
- from list_deployed_catalogs import list_deployed_catalogs
4
- from list_deployed_database_schemas import list_deployed_database_schemas
5
- from list_deployed_databases import list_deployed_databases
File without changes
File without changes