pyegeria 0.5.9.5__tar.gz → 0.6__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 (81) hide show
  1. {pyegeria-0.5.9.5 → pyegeria-0.6}/PKG-INFO +1 -1
  2. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/list_assets.py +1 -1
  3. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/list_todos.py +1 -0
  4. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/cli/egeria.py +1 -1
  5. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/cli/egeria_cat.py +1 -1
  6. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/cli/egeria_ops.py +1 -1
  7. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/cli/egeria_per.py +1 -1
  8. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/cli/egeria_tech.py +1 -1
  9. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/personal/monitor_my_todos.py +3 -3
  10. pyegeria-0.6/examples/widgets/personal/my_profile_actions.py +120 -0
  11. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/my_profile_omvs.py +4 -4
  12. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyproject.toml +1 -1
  13. {pyegeria-0.5.9.5 → pyegeria-0.6}/LICENSE +0 -0
  14. {pyegeria-0.5.9.5 → pyegeria-0.6}/README.md +0 -0
  15. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/doc_samples/Create_Collection_Sample.py +0 -0
  16. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/doc_samples/Create_Sustainability_Collection_Sample.py +0 -0
  17. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/README.md +0 -0
  18. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/__init__.py +0 -0
  19. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/get_asset_graph.py +0 -0
  20. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/get_collection.py +0 -0
  21. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/get_tech_type_elements.py +0 -0
  22. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/get_tech_type_template.py +0 -0
  23. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/list_glossary.py +0 -0
  24. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/list_projects.py +0 -0
  25. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/catalog_user/list_tech_types.py +0 -0
  26. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/cli/__init__.py +0 -0
  27. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/cli/ops_config.py +0 -0
  28. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/README.md +0 -0
  29. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/__init__.py +0 -0
  30. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/engine_actions.py +0 -0
  31. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/integration_daemon_actions.py +0 -0
  32. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/list_catalog_targets.py +0 -0
  33. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/load_archive.py +0 -0
  34. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/monitor_asset_events.py +0 -0
  35. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/monitor_coco_status.py +0 -0
  36. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/monitor_engine_activity.py +0 -0
  37. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/monitor_gov_eng_status.py +0 -0
  38. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/monitor_integ_daemon_status.py +0 -0
  39. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/monitor_platform_status.py +0 -0
  40. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/monitor_server_list.py +0 -0
  41. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/monitor_server_status.py +0 -0
  42. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/refresh_integration_daemon.py +0 -0
  43. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/operational/restart_integration_daemon.py +0 -0
  44. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/personal/README.md +0 -0
  45. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/personal/__init__.py +0 -0
  46. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/personal/list_my_profile.py +0 -0
  47. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/personal/list_my_roles.py +0 -0
  48. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/personal/monitor_open_todos.py +0 -0
  49. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/tech/README.md +0 -0
  50. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/tech/__init__.py +0 -0
  51. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/tech/get_guid_info.py +0 -0
  52. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/tech/get_tech_details.py +0 -0
  53. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/tech/list_asset_types.py +0 -0
  54. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/tech/list_registered_services.py +0 -0
  55. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/tech/list_relationship_types.py +0 -0
  56. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/tech/list_tech_templates.py +0 -0
  57. {pyegeria-0.5.9.5 → pyegeria-0.6}/examples/widgets/tech/list_valid_metadata_values.py +0 -0
  58. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/Xfeedback_manager_omvs.py +0 -0
  59. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/Xloaded_resources_omvs.py +0 -0
  60. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/__init__.py +0 -0
  61. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/_client.py +0 -0
  62. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/_deprecated_gov_engine.py +0 -0
  63. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/_exceptions.py +0 -0
  64. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/_globals.py +0 -0
  65. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/_validators.py +0 -0
  66. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/action_author_omvs.py +0 -0
  67. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/asset_catalog_omvs.py +0 -0
  68. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/automated_curation_omvs.py +0 -0
  69. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/collection_manager_omvs.py +0 -0
  70. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/core_omag_server_config.py +0 -0
  71. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/create_tech_guid_lists.py +0 -0
  72. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/full_omag_server_config.py +0 -0
  73. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/glossary_browser_omvs.py +0 -0
  74. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/glossary_manager_omvs.py +0 -0
  75. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/platform_services.py +0 -0
  76. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/project_manager_omvs.py +0 -0
  77. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/registered_info.py +0 -0
  78. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/runtime_manager_omvs.py +0 -0
  79. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/server_operations.py +0 -0
  80. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/utils.py +0 -0
  81. {pyegeria-0.5.9.5 → pyegeria-0.6}/pyegeria/valid_metadata_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.5.9.5
3
+ Version: 0.6
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -46,7 +46,7 @@ disable_ssl_warnings = True
46
46
  def display_assets(search_string: str, server: str, url: str, username: str, user_password: str, time_out: int = 60,
47
47
  jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
48
48
  console = Console(width=width, force_terminal=not jupyter, soft_wrap=True)
49
- if (search_string is None) or (len(search_string) < 4):
49
+ if (search_string is None) or (len(search_string) < 3):
50
50
  raise ValueError("Invalid Search String - must be greater than four characters long")
51
51
  g_client = AssetCatalog(server, url, username)
52
52
  token = g_client.create_egeria_bearer_token(username, user_password)
@@ -77,6 +77,7 @@ def display_to_dos(search_string: str, server: str, url: str, username: str, use
77
77
  priority = " "
78
78
  due = " "
79
79
  completed = " "
80
+
80
81
  status = " "
81
82
  sponsor = " "
82
83
  else:
@@ -72,7 +72,7 @@ from examples.widgets.tech.list_valid_metadata_values import display_metadata_va
72
72
  @click.option('--admin_user', default='garygeeke', envvar='EGERIA_ADMIN_USER', help='Egeria admin user')
73
73
  @click.option('--admin_user_password', default='secret', envvar='EGERIA_ADMIN_PASSWORD',
74
74
  help='Egeria admin password')
75
- @click.option('--userid', default='garygeeke', envvar='EGERIA_USER', help='Egeria user')
75
+ @click.option('--userid', default='erinoverview', envvar='EGERIA_USER', help='Egeria user')
76
76
  @click.option('--password', default='secret', envvar='EGERIA_PASSWORD',
77
77
  help='Egeria user password')
78
78
  @click.option('--timeout', default=60, help='Number of seconds to wait')
@@ -63,7 +63,7 @@ from examples.widgets.cli.ops_config import Config
63
63
  @click.option('--admin_user', default='garygeeke', envvar='EGERIA_ADMIN_USER', help='Egeria admin user')
64
64
  @click.option('--admin_user_password', default='secret', envvar='EGERIA_ADMIN_PASSWORD',
65
65
  help='Egeria admin password')
66
- @click.option('--userid', default='garygeeke', envvar='EGERIA_USER', help='Egeria user')
66
+ @click.option('--userid', default='erinoverview', envvar='EGERIA_USER', help='Egeria user')
67
67
  @click.option('--password', default='secret', envvar='EGERIA_PASSWORD',
68
68
  help='Egeria user password')
69
69
  @click.option('--timeout', default=60, help='Number of seconds to wait')
@@ -66,7 +66,7 @@ from examples.widgets.operational.restart_integration_daemon import restart_conn
66
66
  @click.option('--admin_user', default='garygeeke', envvar='EGERIA_ADMIN_USER', help='Egeria admin user')
67
67
  @click.option('--admin_user_password', default='secret', envvar='EGERIA_ADMIN_PASSWORD',
68
68
  help='Egeria admin password')
69
- @click.option('--userid', default='garygeeke', envvar='EGERIA_USER', help='Egeria user')
69
+ @click.option('--userid', default='erinoverview', envvar='EGERIA_USER', help='Egeria user')
70
70
  @click.option('--password', default='secret', envvar='EGERIA_PASSWORD',
71
71
  help='Egeria user password')
72
72
  @click.option('--timeout', default=60, help='Number of seconds to wait')
@@ -58,7 +58,7 @@ from examples.widgets.personal.list_my_roles import display_my_roles
58
58
  @click.option('--admin_user', default='garygeeke', envvar='EGERIA_ADMIN_USER', help='Egeria admin user')
59
59
  @click.option('--admin_user_password', default='secret', envvar='EGERIA_ADMIN_PASSWORD',
60
60
  help='Egeria admin password')
61
- @click.option('--userid', default='garygeeke', envvar='EGERIA_USER', help='Egeria user')
61
+ @click.option('--userid', default='erinoverview', envvar='EGERIA_USER', help='Egeria user')
62
62
  @click.option('--password', default='secret', envvar='EGERIA_PASSWORD',
63
63
  help='Egeria user password')
64
64
  @click.option('--timeout', default=60, help='Number of seconds to wait')
@@ -64,7 +64,7 @@ from examples.widgets.catalog_user.get_tech_type_template import template_viewer
64
64
  @click.option('--admin_user', default='garygeeke', envvar='EGERIA_ADMIN_USER', help='Egeria admin user')
65
65
  @click.option('--admin_user_password', default='secret', envvar='EGERIA_ADMIN_PASSWORD',
66
66
  help='Egeria admin password')
67
- @click.option('--userid', default='garygeeke', envvar='EGERIA_USER', help='Egeria user')
67
+ @click.option('--userid', default='erinoverview', envvar='EGERIA_USER', help='Egeria user')
68
68
  @click.option('--password', default='secret', envvar='EGERIA_PASSWORD',
69
69
  help='Egeria user password')
70
70
  @click.option('--timeout', default=60, help='Number of seconds to wait')
@@ -72,10 +72,10 @@ def display_my_todos(server: str, url: str, user: str, user_pass:str,
72
72
  name = props["name"]
73
73
  todo_type_name = props.get("toDoType", " ")
74
74
  todo_guid = item["elementHeader"].get("guid", "---")
75
- created = props.get("creationTime", " ")
76
- priority = str(props.get("priority", " "))
75
+ created = props.get("creationTime", "---")
76
+ priority = str(props.get("priority", "---"))
77
77
  due = props.get("dueTime", " ")
78
- completed = props.get("completionTime", " ")
78
+ completed = props.get("completionTime", "---")
79
79
  status = props.get("status")
80
80
 
81
81
  for actor in item["assignedActors"]:
@@ -0,0 +1,120 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+
6
+
7
+ This script restarts an integration daemon.
8
+
9
+ """
10
+
11
+ import os
12
+ from rich import print, print_json
13
+ from rich.console import Console
14
+
15
+ import click
16
+ from pyegeria import ServerOps, AutomatedCuration, INTEGRATION_GUIDS, Platform
17
+ from pyegeria._exceptions import (
18
+ InvalidParameterException,
19
+ PropertyServerException,
20
+ UserNotAuthorizedException,
21
+ print_exception_response,
22
+ )
23
+
24
+
25
+ @click.command('add-todo')
26
+ @click.argument('integration-connector')
27
+ @click.argument('metadata-element-guid')
28
+ @click.argument('catalog-target-name')
29
+ @click.pass_context
30
+ def add_catalog_target(ctx, integration_connector: str, metadata_element_guid:str, catalog_target_name:str)-> str:
31
+ """Add catalog targets to the specified integration connector"""
32
+ try:
33
+ if integration_connector not in INTEGRATION_GUIDS.keys():
34
+ click.echo('Integration connector is not known')
35
+
36
+ c = ctx.obj
37
+ a_client = AutomatedCuration(c.view_server, c.view_server_url, c.userid, c.password)
38
+ token = a_client.create_egeria_bearer_token()
39
+
40
+ guid = a_client.add_catalog_target(INTEGRATION_GUIDS[integration_connector], metadata_element_guid,
41
+ catalog_target_name)
42
+
43
+ click.echo(f"Added catalog target to {integration_connector} with a return guid of {guid}")
44
+
45
+
46
+ except (InvalidParameterException, PropertyServerException) as e:
47
+ print_exception_response(e)
48
+
49
+
50
+
51
+ @click.command('remove-target')
52
+ @click.argument('relationship-guid')
53
+ @click.pass_context
54
+ def remove_catalog_target(ctx, relationship_guid: str):
55
+ """Remove the catalog target specified by the relationship guidr"""
56
+ try:
57
+ c = ctx.obj
58
+ a_client = AutomatedCuration(c.view_server, c.view_server_url, c.userid, c.password)
59
+ token = a_client.create_egeria_bearer_token()
60
+
61
+ a_client.remove_catalog_target(relationship_guid)
62
+
63
+ click.echo(f"Removed catalog target with relationship guid of {relationship_guid}")
64
+
65
+
66
+ except (InvalidParameterException, PropertyServerException) as e:
67
+ print_exception_response(e)
68
+
69
+
70
+ @click.command('update-target')
71
+ @click.argument('relationship-guid')
72
+ @click.argument('catalog-target-name')
73
+ @click.pass_context
74
+ def update_catalog_target(ctx, relationship_guid: str, catalog_target_name:str):
75
+ """Update the catalog target specified by the relationship guid """
76
+ try:
77
+ c = ctx.obj
78
+ a_client = AutomatedCuration(c.view_server, c.view_server_url, c.userid, c.password)
79
+ token = a_client.create_egeria_bearer_token()
80
+
81
+ guid = a_client.update_catalog_target(relationship_guid, catalog_target_name)
82
+
83
+ click.echo(f"Update catalog target with relationship guid of {relationship_guid} to a catalog target name of "
84
+ f"{catalog_target_name} with a return guid of {guid}")
85
+
86
+
87
+ except (InvalidParameterException, PropertyServerException) as e:
88
+ print_exception_response(e)
89
+
90
+
91
+ @click.command('stop')
92
+ @click.pass_context
93
+ def stop_server(ctx):
94
+ """Stop an integration daemon"""
95
+ try:
96
+ c = ctx.obj
97
+ p_client = Platform(c.integration_daemon, c.integration_daemon_url, c.userid, c.password)
98
+
99
+ p_client.shutdown_server()
100
+
101
+ click.echo(f"Stopped server {c.integration_daemon}")
102
+ except (InvalidParameterException, PropertyServerException) as e:
103
+ print_exception_response(e)
104
+
105
+
106
+ @click.command('start')
107
+ @click.pass_context
108
+ def start_server(ctx):
109
+ """Start or restart an integration daemon from its known configuration """
110
+ try:
111
+ c = ctx.obj
112
+ p_client = Platform(c.integration_daemon, c.integration_daemon_url, c.userid, c.password)
113
+
114
+ p_client.activate_server_stored_config()
115
+
116
+ click.echo(f"Started server {c.integration_daemon}")
117
+
118
+ except (InvalidParameterException, PropertyServerException) as e:
119
+ print_exception_response(e)
120
+
@@ -156,7 +156,7 @@ class MyProfile(Client):
156
156
 
157
157
  response = await self._async_make_request("POST", url, body)
158
158
 
159
- return response.json().get("toDoElements", "No entries found")
159
+ return response.json().get("elements", "No entries found")
160
160
 
161
161
  def get_assigned_actions(self, actor_guid: str, status: str = "OPEN", server_name: str = None, start_from: int = 0,
162
162
  page_size: int = 100) -> list | str:
@@ -472,7 +472,7 @@ class MyProfile(Client):
472
472
 
473
473
  response = await self._async_make_request("GET", url)
474
474
  # return response.text if response is not None else "No Results"
475
- return json.loads(response.text).get("toDoElement", "No TODO returned")
475
+ return json.loads(response.text).get("elements", "No TODO returned")
476
476
 
477
477
  def get_to_do(self, todo_guid: str, server_name: str = None) -> dict | str:
478
478
  """ Get a To-Do item. Async version.
@@ -773,7 +773,7 @@ class MyProfile(Client):
773
773
 
774
774
  response = await self._async_make_request("POST", url, body)
775
775
  # return response.text
776
- return response.json().get("toDoElements", "No ToDos found")
776
+ return response.json().get("elements", "No ToDos found")
777
777
 
778
778
  def find_to_do(self, search_string: str, server_name: str = None, status: str = "OPEN",
779
779
  starts_with: bool = False, ends_with: bool = False, ignore_case: bool = True,
@@ -861,7 +861,7 @@ class MyProfile(Client):
861
861
  f"{todo_type}?startFrom={start_from}&pageSize={page_size}")
862
862
 
863
863
  response = await self._async_make_request("POST", url, body)
864
- return response.json().get("toDoElements","No ToDos found")
864
+ return response.json().get("elements","No ToDos found")
865
865
 
866
866
  def get_to_dos_by_type(self, todo_type: str, server_name: str = None, status: str = "OPEN",
867
867
  start_from: int = 0, page_size: int = 100) -> list | str:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "0.5.9.5"
3
+ version = "0.6"
4
4
  license = 'Apache 2.0'
5
5
  authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes