pyegeria 0.7.11__tar.gz → 0.7.13__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 (86) hide show
  1. {pyegeria-0.7.11 → pyegeria-0.7.13}/PKG-INFO +1 -1
  2. pyegeria-0.7.13/examples/widgets/cat/list_relationships.py +144 -0
  3. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cli/egeria.py +10 -0
  4. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cli/egeria_cat.py +11 -0
  5. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/tech/get_tech_details.py +1 -1
  6. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyproject.toml +2 -2
  7. {pyegeria-0.7.11 → pyegeria-0.7.13}/LICENSE +0 -0
  8. {pyegeria-0.7.11 → pyegeria-0.7.13}/README.md +0 -0
  9. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/doc_samples/Create_Collection_Sample.py +0 -0
  10. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/doc_samples/Create_Sustainability_Collection_Sample.py +0 -0
  11. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/README.md +0 -0
  12. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/__init__.py +0 -0
  13. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/get_asset_graph.py +0 -0
  14. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/get_collection.py +0 -0
  15. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/get_project_structure.py +0 -0
  16. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/get_tech_type_elements.py +0 -0
  17. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/get_tech_type_template.py +0 -0
  18. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/list_assets.py +0 -0
  19. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/list_cert_types.py +0 -0
  20. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/list_glossary.py +0 -0
  21. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/list_projects.py +0 -0
  22. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/list_tech_types.py +0 -0
  23. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cat/list_todos.py +0 -0
  24. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cli/__init__.py +0 -0
  25. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cli/egeria_my.py +0 -0
  26. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cli/egeria_ops.py +0 -0
  27. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cli/egeria_tech.py +0 -0
  28. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/cli/ops_config.py +0 -0
  29. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/my/README.md +0 -0
  30. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/my/__init__.py +0 -0
  31. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/my/list_my_profile.py +0 -0
  32. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/my/list_my_roles.py +0 -0
  33. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/my/monitor_my_todos.py +0 -0
  34. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/my/monitor_open_todos.py +0 -0
  35. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/my/my_profile_actions.py +0 -0
  36. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/README.md +0 -0
  37. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/__init__.py +0 -0
  38. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/engine_actions.py +0 -0
  39. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/integration_daemon_actions.py +0 -0
  40. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/list_catalog_targets.py +0 -0
  41. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/load_archive.py +0 -0
  42. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/monitor_asset_events.py +0 -0
  43. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/monitor_coco_status.py +0 -0
  44. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/monitor_engine_activity.py +0 -0
  45. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/monitor_gov_eng_status.py +0 -0
  46. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/monitor_integ_daemon_status.py +0 -0
  47. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/monitor_platform_status.py +0 -0
  48. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/monitor_server_list.py +0 -0
  49. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/monitor_server_status.py +0 -0
  50. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/refresh_integration_daemon.py +0 -0
  51. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/ops/restart_integration_daemon.py +0 -0
  52. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/tech/README.md +0 -0
  53. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/tech/__init__.py +0 -0
  54. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/tech/get_guid_info.py +0 -0
  55. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/tech/list_asset_types.py +0 -0
  56. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/tech/list_elements.py +0 -0
  57. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/tech/list_registered_services.py +0 -0
  58. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/tech/list_relationship_types.py +0 -0
  59. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/tech/list_tech_templates.py +0 -0
  60. {pyegeria-0.7.11 → pyegeria-0.7.13}/examples/widgets/tech/list_valid_metadata_values.py +0 -0
  61. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/Xloaded_resources_omvs.py +0 -0
  62. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/__init__.py +0 -0
  63. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/_client.py +0 -0
  64. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/_deprecated_gov_engine.py +0 -0
  65. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/_exceptions.py +0 -0
  66. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/_globals.py +0 -0
  67. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/_validators.py +0 -0
  68. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/action_author_omvs.py +0 -0
  69. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/asset_catalog_omvs.py +0 -0
  70. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/automated_curation_omvs.py +0 -0
  71. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/classification_manager_omvs.py +0 -0
  72. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/collection_manager_omvs.py +0 -0
  73. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/core_omag_server_config.py +0 -0
  74. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/create_tech_guid_lists.py +0 -0
  75. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/feedback_manager_omvs.py +0 -0
  76. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/full_omag_server_config.py +0 -0
  77. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/glossary_browser_omvs.py +0 -0
  78. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/glossary_manager_omvs.py +0 -0
  79. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/my_profile_omvs.py +0 -0
  80. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/platform_services.py +0 -0
  81. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/project_manager_omvs.py +0 -0
  82. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/registered_info.py +0 -0
  83. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/runtime_manager_omvs.py +0 -0
  84. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/server_operations.py +0 -0
  85. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/utils.py +0 -0
  86. {pyegeria-0.7.11 → pyegeria-0.7.13}/pyegeria/valid_metadata_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.7.11
3
+ Version: 0.7.13
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,144 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+ List certification types
7
+
8
+
9
+ A simple display for certification types
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.markdown import Markdown
19
+ from rich.table import Table
20
+
21
+ from pyegeria import (
22
+ InvalidParameterException,
23
+ PropertyServerException,
24
+ UserNotAuthorizedException,
25
+ ClassificationManager
26
+ )
27
+
28
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
29
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
30
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
31
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
32
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
33
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
34
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
35
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
36
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
37
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
38
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
39
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
40
+
41
+
42
+ disable_ssl_warnings = True
43
+
44
+
45
+ def list_relationships(search_string: str, server: str, url: str, username: str, user_password: str, time_out: int = 60,
46
+ jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
47
+
48
+ console = Console(width=width, force_terminal=not jupyter, soft_wrap=True)
49
+ if (search_string is None) or ((len(search_string) < 3)) and (search_string != '*'):
50
+ raise ValueError("Invalid Search String - must be greater than four characters long")
51
+ g_client = ClassificationManager(server, url, user_id=username,user_pwd=user_password)
52
+ token = g_client.create_egeria_bearer_token(username, user_password)
53
+
54
+
55
+ def generate_table(search_string:str = None) -> Table:
56
+ """Make a new table."""
57
+ table = Table(
58
+ title=f"Relationship List for {search_string} @ {time.asctime()}",
59
+ header_style="white on dark_blue",
60
+ style="bold white on black",
61
+ row_styles=["bold white on black"],
62
+ title_style="bold white on black",
63
+ caption_style="white on black",
64
+ show_lines=True,
65
+ box=box.ROUNDED,
66
+ caption=f"View Server '{server}' @ Platform - {url}",
67
+ expand=True
68
+ )
69
+ table.add_column('End 1 Name')
70
+ table.add_column("End 1 GUID", no_wrap=True)
71
+ table.add_column('End 1 Type')
72
+ table.add_column('End 2 Name')
73
+ table.add_column("End 2 GUID", no_wrap=True)
74
+ table.add_column("End 2 Type")
75
+ table.add_column("Properties", min_width=40)
76
+
77
+ rel_list = g_client.get_relationships(search_string, page_size=100, time_out=time_out)
78
+ if type(rel_list) is str:
79
+ return table
80
+
81
+ for rel in rel_list:
82
+ end1_name = rel['end1'].get('uniqueName','---')
83
+ end1_guid = rel['end1']['guid']
84
+ end1_type = rel['end1']['type']['typeName']
85
+ end2_name = rel['end2'].get('uniqueName', '---')
86
+ end2_guid = rel['end2']['guid']
87
+ end2_type = rel['end2']['type']['typeName']
88
+
89
+ rel_md = ''
90
+ for key in rel['properties'].keys():
91
+ rel_md += f"* {key}: {rel['properties'][key]}\n"
92
+
93
+ rel_out = Markdown(rel_md)
94
+
95
+ table.add_row(
96
+ end1_name, end1_guid, end1_type, end1_name, end2_guid, end2_type, rel_out)
97
+
98
+ g_client.close_session()
99
+
100
+ return table
101
+
102
+ try:
103
+ # with Live(generate_table(), refresh_per_second=4, screen=True) as live:
104
+ # while True:
105
+ # time.sleep(2)
106
+ # live.update(generate_table())
107
+
108
+ with console.pager(styles=True):
109
+ console.print(generate_table(search_string), soft_wrap=True)
110
+
111
+
112
+ except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
113
+ console.print_exception()
114
+ sys.exit(1)
115
+
116
+ except ValueError as e:
117
+ console.print(f"\n\n====> Invalid Search String - must be greater than four characters long")
118
+ sys.exit(1)
119
+
120
+
121
+ def main():
122
+ parser = argparse.ArgumentParser()
123
+ parser.add_argument("--server", help="Name of the server to display status for")
124
+ parser.add_argument("--url", help="URL Platform to connect to")
125
+ parser.add_argument("--userid", help="User Id")
126
+ parser.add_argument("--password", help="User Password")
127
+ parser.add_argument("--time_out", help="Time Out")
128
+
129
+ args = parser.parse_args()
130
+
131
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
132
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
133
+ userid = args.userid if args.userid is not None else EGERIA_USER
134
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
135
+ time_out = args.time_out if args.time_out is not None else 60
136
+ try:
137
+ # search_string = Prompt.ask("Enter an asset search string:", default="*")
138
+ search_string = 'Certification'
139
+ list_relationships(search_string, server, url, userid, user_pass, time_out)
140
+ except(KeyboardInterrupt):
141
+ pass
142
+
143
+ if __name__ == "__main__":
144
+ main()
@@ -51,6 +51,7 @@ from examples.widgets.tech.list_relationship_types import display_relationship_t
51
51
  from examples.widgets.tech.list_tech_templates import display_templates_spec
52
52
  from examples.widgets.tech.list_valid_metadata_values import display_metadata_values
53
53
  from examples.widgets.tech.list_elements import list_elements
54
+ from examples.widgets.cat.list_relationships import list_relationships
54
55
 
55
56
  @tui()
56
57
  # @tui('menu', 'menu', 'A textual command line interface')
@@ -396,6 +397,15 @@ def show_project_structure(ctx, project):
396
397
  project_structure_viewer(project, c.view_server, c.view_server_url, c.userid,
397
398
  c.password, c.jupyter, c.width, c.timeout)
398
399
 
400
+ @show.command('relationships')
401
+ @click.option('--relationship', default = 'Certification',
402
+ help="Relationship type name to search for.")
403
+ @click.pass_context
404
+ def show_relationships(ctx, relationship):
405
+ """Show the structure of the project starting from a root project"""
406
+ c = ctx.obj
407
+ list_relationships(relationship, c.view_server, c.view_server_url, c.userid,
408
+ c.password, c.jupyter, c.width, c.timeout)
399
409
 
400
410
 
401
411
 
@@ -23,6 +23,7 @@ from examples.widgets.cat.list_projects import display_project_list
23
23
  from examples.widgets.cat.list_todos import display_to_dos
24
24
  from examples.widgets.cat.get_project_structure import project_structure_viewer
25
25
  from examples.widgets.cat.list_cert_types import display_certifications
26
+ from examples.widgets.cat.list_relationships import list_relationships
26
27
 
27
28
  # from pyegeria import ServerOps
28
29
  from examples.widgets.cli.ops_config import Config
@@ -211,6 +212,16 @@ def show_project_structure(ctx, project):
211
212
  project_structure_viewer(project, c.view_server, c.view_server_url, c.userid,
212
213
  c.password, c.jupyter, c.width, c.timeout)
213
214
 
215
+ @show.command('relationships')
216
+ @click.option('--relationship', default = 'Certification',
217
+ help="Relationship type name to search for.")
218
+ @click.pass_context
219
+ def show_relationships(ctx, relationship):
220
+ """Show the structure of the project starting from a root project"""
221
+ c = ctx.obj
222
+ list_relationships(relationship, c.view_server, c.view_server_url, c.userid,
223
+ c.password, c.jupyter, c.width, c.timeout)
224
+
214
225
 
215
226
 
216
227
  @show.command('to-dos')
@@ -70,7 +70,7 @@ def tech_details_viewer(tech: str, server_name: str, platform_url: str, user: st
70
70
  if ext_ref is not None:
71
71
  uri = ext_ref[0]["properties"].get("uri", "---")
72
72
  # console.print(f" {type(ext_ref)}, {len(ext_ref)}")
73
- l2 = tree.add(Panel(Text(f'* URI: {uri}', style)))
73
+ l2 = tree.add(Panel(Markdown(f'* URI: {uri}', style)))
74
74
 
75
75
  resource_list = tech_details.get('resourceList', None)
76
76
  if resource_list:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "0.7.11"
3
+ version = "0.7.13"
4
4
  license = 'Apache 2.0'
5
5
  authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
6
6
  readme = "README.md"
@@ -63,7 +63,7 @@ pytest = "^8.2.2"
63
63
  list_todos = "examples.widgets.cat.list_todos:main"
64
64
  list_cert_types = "examples.widgets.cat.list_cert_types:main"
65
65
  get_project_structure = "examples.widgets.cat.get_project_structure:main"
66
-
66
+ list_relationships = "examples.widgets.cat.list_relationships:main"
67
67
 
68
68
  monitor_asset_events = "examples.widgets.ops.monitor_asset_events:main"
69
69
  monitor_coco_status = "examples.widgets.ops.monitor_coco_status:main"
File without changes
File without changes
File without changes
File without changes