pyegeria 0.8.4.50__tar.gz → 1.5.1.0.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.
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/PKG-INFO +7 -4
- pyegeria-1.5.1.0.1/README.md +40 -0
- pyegeria-1.5.1.0.1/commands/tech/get_element_graph.py +202 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1/pyegeria}/README.md +2 -4
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/automated_curation_omvs.py +8 -8
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/classification_manager_omvs.py +1 -1
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/valid_metadata_omvs.py +8 -2
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyproject.toml +3 -2
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/LICENSE +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/README.md +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/__init__.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/get_asset_graph.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/get_collection.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/get_project_dependencies.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/get_project_structure.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/get_tech_type_elements.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/get_tech_type_template.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/list_archives.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/list_assets.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/list_cert_types.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/list_glossary.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/list_projects.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/list_relationships.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/list_tech_types.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/list_todos.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cat/list_user_ids.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cli/__init__.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cli/egeria.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cli/egeria_cat.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cli/egeria_my.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cli/egeria_ops.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cli/egeria_tech.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/cli/ops_config.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/my/README.md +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/my/__init__.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/my/list_my_profile.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/my/list_my_roles.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/my/monitor_my_todos.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/my/monitor_open_todos.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/my/todo_actions.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/README.md +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/__init__.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/engine_actions.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/gov_server_actions.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/list_catalog_targets.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/load_archive.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/monitor_asset_events.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/monitor_engine_activity.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/monitor_engine_activity_c.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/monitor_gov_eng_status.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/monitor_integ_daemon_status.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/monitor_platform_status.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/monitor_server_startup.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/monitor_server_status.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/orig_monitor_server_list.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/orig_monitor_server_status.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/refresh_integration_daemon.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/ops/restart_integration_daemon.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/README.md +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/__init__.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/get_element_info.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/get_guid_info.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/get_tech_details.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/list_asset_types.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/list_elements.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/list_elements_for_classification.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/list_elements_x.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/list_registered_services.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/list_related_elements.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/list_related_specification.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/list_relationship_types.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/list_tech_templates.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/list_valid_metadata_values.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/commands/tech/x_list_related_elements.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/__init__.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/_client.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/_deprecated_gov_engine.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/_exceptions.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/_globals.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/_validators.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/asset_catalog_omvs.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/collection_manager_omvs.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/core_omag_server_config.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/create_tech_guid_lists.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/egeria_cat_client.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/egeria_client.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/egeria_config_client.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/egeria_my_client.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/egeria_tech_client.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/feedback_manager_omvs.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/full_omag_server_config.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/glossary_browser_omvs.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/glossary_manager_omvs.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/mermaid_utilities.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/my_profile_omvs.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/platform_services.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/project_manager_omvs.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/registered_info.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/runtime_manager_omvs.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/server_operations.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/tech_guids_26-09-2024 09:30.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/utils.py +0 -0
- {pyegeria-0.8.4.50 → pyegeria-1.5.1.0.1}/pyegeria/x_action_author_omvs.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyegeria
|
3
|
-
Version:
|
3
|
+
Version: 1.5.1.0.1
|
4
4
|
Summary: A python client for Egeria
|
5
5
|
Home-page: https://github.com/odpi/egeria-python
|
6
6
|
License: Apache 2.0
|
@@ -41,17 +41,20 @@ Description-Content-Type: text/markdown
|
|
41
41
|
|
42
42
|
# pyegeria: a python client for Egeria
|
43
43
|
|
44
|
-
This is
|
44
|
+
This is a package for easily using the Egeria
|
45
45
|
open metadata environment from python. Details about the
|
46
46
|
open source Egeria project can be found at [Egeria Project](https://egeria-project.org).
|
47
47
|
|
48
48
|
This package is in active development. There is initial
|
49
49
|
support for many of Egeria's services including configuration and operation. This client depends on
|
50
|
-
|
50
|
+
This release supports Egeria 5.1 - although most of the functions may work on earlier versions of Egeria as well.
|
51
51
|
|
52
52
|
The code is organized to mimic the existing Egeria Java Client structure.
|
53
53
|
|
54
|
-
|
54
|
+
The commands folder holds the Egeria Command Line Interface and corresponding commands
|
55
|
+
to visualize and use Egeria. The commands also serve as useful examples.
|
56
|
+
|
57
|
+
An examples folder holds some useful examples showing different facets of using pyegeria.
|
55
58
|
|
56
59
|
WARNING: files that start with "X" are in-progress placeholders that are not meant to be used..they will mature and
|
57
60
|
evolve.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
2
|
+
<!-- Copyright Contributors to the ODPi Egeria project. -->
|
3
|
+
|
4
|
+

|
5
|
+
|
6
|
+
[](LICENSE)
|
7
|
+
|
8
|
+
|
9
|
+
# pyegeria: a python client for Egeria
|
10
|
+
|
11
|
+
This is a package for easily using the Egeria
|
12
|
+
open metadata environment from python. Details about the
|
13
|
+
open source Egeria project can be found at [Egeria Project](https://egeria-project.org).
|
14
|
+
|
15
|
+
This package is in active development. There is initial
|
16
|
+
support for many of Egeria's services including configuration and operation. This client depends on
|
17
|
+
This release supports Egeria 5.1 - although most of the functions may work on earlier versions of Egeria as well.
|
18
|
+
|
19
|
+
The code is organized to mimic the existing Egeria Java Client structure.
|
20
|
+
|
21
|
+
The commands folder holds the Egeria Command Line Interface and corresponding commands
|
22
|
+
to visualize and use Egeria. The commands also serve as useful examples.
|
23
|
+
|
24
|
+
An examples folder holds some useful examples showing different facets of using pyegeria.
|
25
|
+
|
26
|
+
WARNING: files that start with "X" are in-progress placeholders that are not meant to be used..they will mature and
|
27
|
+
evolve.
|
28
|
+
|
29
|
+
All feedback is welcome. Please engage via our [community](http://egeria-project.org/guides/community/),
|
30
|
+
team calls, or via github issues in this repo. If interested in contributing,
|
31
|
+
you can engage via the community or directly reach out to
|
32
|
+
[dan.wolfson\@pdr-associates.com](mailto:dan.wolfson@pdr-associates.com?subject=pyegeria).
|
33
|
+
|
34
|
+
This is a learning experience.
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
----
|
39
|
+
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
|
40
|
+
Copyright Contributors to the ODPi Egeria project.
|
@@ -0,0 +1,202 @@
|
|
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.markdown import Markdown
|
20
|
+
from rich.table import Table
|
21
|
+
|
22
|
+
from pyegeria import (
|
23
|
+
InvalidParameterException,
|
24
|
+
PropertyServerException,
|
25
|
+
UserNotAuthorizedException,
|
26
|
+
print_exception_response,
|
27
|
+
EgeriaTech,
|
28
|
+
)
|
29
|
+
|
30
|
+
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
31
|
+
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
32
|
+
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
33
|
+
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
34
|
+
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
35
|
+
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
36
|
+
)
|
37
|
+
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
38
|
+
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
39
|
+
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
40
|
+
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
41
|
+
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
42
|
+
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
43
|
+
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "260"))
|
44
|
+
|
45
|
+
|
46
|
+
disable_ssl_warnings = True
|
47
|
+
|
48
|
+
|
49
|
+
def display_elements(
|
50
|
+
search_string: str,
|
51
|
+
prop_list: [str],
|
52
|
+
server: str,
|
53
|
+
url: str,
|
54
|
+
username: str,
|
55
|
+
user_password: str,
|
56
|
+
time_out: int = 60,
|
57
|
+
jupyter: bool = EGERIA_JUPYTER,
|
58
|
+
width: int = EGERIA_WIDTH,
|
59
|
+
):
|
60
|
+
console = Console(width=width, force_terminal=not jupyter, soft_wrap=True)
|
61
|
+
if (search_string is None) or (len(search_string) < 3):
|
62
|
+
raise ValueError(
|
63
|
+
"Invalid Search String - must be greater than four characters long"
|
64
|
+
)
|
65
|
+
g_client = EgeriaTech(server, url, username, user_password)
|
66
|
+
token = g_client.create_egeria_bearer_token()
|
67
|
+
|
68
|
+
def generate_table(search_string: str, prop_list: [str]) -> Table:
|
69
|
+
"""Make a new table."""
|
70
|
+
table = Table(
|
71
|
+
title=f"Assets containing the string {search_string} @ {time.asctime()}",
|
72
|
+
header_style="white on dark_blue",
|
73
|
+
style="bold white on black",
|
74
|
+
row_styles=["bold white on black"],
|
75
|
+
title_style="bold white on black",
|
76
|
+
caption_style="white on black",
|
77
|
+
show_lines=True,
|
78
|
+
box=box.ROUNDED,
|
79
|
+
caption=f"View Server '{server}' @ Platform - {url}",
|
80
|
+
expand=True,
|
81
|
+
)
|
82
|
+
# table.add_column("Qualified Name")
|
83
|
+
table.add_column("GUID", no_wrap=True)
|
84
|
+
table.add_column("Properties")
|
85
|
+
|
86
|
+
table.add_column("Classification Props", width=30)
|
87
|
+
table.add_column("Matching Elements")
|
88
|
+
|
89
|
+
classification = "Anchors"
|
90
|
+
open_type_name = None
|
91
|
+
property_value = search_string
|
92
|
+
property_names = prop_list
|
93
|
+
|
94
|
+
elements = g_client.find_elements_by_classification_with_property_value(
|
95
|
+
classification, property_value, property_names, open_type_name
|
96
|
+
)
|
97
|
+
if type(elements) is str:
|
98
|
+
return table
|
99
|
+
|
100
|
+
for element in elements:
|
101
|
+
template = False
|
102
|
+
guid = element["elementHeader"].get("guid", "---")
|
103
|
+
classifications = element["elementHeader"]["classifications"]
|
104
|
+
|
105
|
+
class_prop_md = ""
|
106
|
+
for classific in classifications:
|
107
|
+
class_prop = classific.get("classificationProperties", "---")
|
108
|
+
if type(class_prop) is dict:
|
109
|
+
for key in class_prop.keys():
|
110
|
+
class_prop_md += f"* {key}: {class_prop[key]}\n"
|
111
|
+
|
112
|
+
class_prop_out = Markdown(class_prop_md)
|
113
|
+
|
114
|
+
properties = element["properties"]
|
115
|
+
props_md = ""
|
116
|
+
if type(properties) is dict:
|
117
|
+
for key in properties.keys():
|
118
|
+
props_md += f"* {key}: {properties[key]}\n"
|
119
|
+
if key == "category" and properties[key] == "placeholderProperty":
|
120
|
+
template = True
|
121
|
+
props_out = Markdown(props_md)
|
122
|
+
|
123
|
+
if template: # Not interested in template elements in this method
|
124
|
+
continue
|
125
|
+
|
126
|
+
relationship = g_client.get_related_elements(guid, None, None)
|
127
|
+
|
128
|
+
if type(relationship) is list:
|
129
|
+
rel_md = ""
|
130
|
+
for rel in relationship:
|
131
|
+
match_tab = Table(expand=True)
|
132
|
+
match_tab.add_column("Type Name")
|
133
|
+
match_tab.add_column("GUID", no_wrap=True, width=36)
|
134
|
+
match_tab.add_column("Properties")
|
135
|
+
match = rel["relationshipHeader"]
|
136
|
+
match_type_name = match["type"]["typeName"]
|
137
|
+
matching_guid = match["guid"]
|
138
|
+
match_props = rel["relatedElement"]["properties"]
|
139
|
+
match_details_md = ""
|
140
|
+
for key in match_props.keys():
|
141
|
+
match_details_md += f"* {key}: {match_props[key]}\n"
|
142
|
+
match_details_out = Markdown(match_details_md)
|
143
|
+
match_tab.add_row(match_type_name, matching_guid, match_details_out)
|
144
|
+
|
145
|
+
table.add_row(guid, props_out, class_prop_out, match_tab)
|
146
|
+
|
147
|
+
g_client.close_session()
|
148
|
+
return table
|
149
|
+
|
150
|
+
try:
|
151
|
+
# with Live(generate_table(), refresh_per_second=4, screen=True) as live:
|
152
|
+
# while True:
|
153
|
+
# time.sleep(2)
|
154
|
+
# live.update(generate_table())
|
155
|
+
|
156
|
+
with console.pager(styles=True):
|
157
|
+
console.print(generate_table(search_string, prop_list), soft_wrap=True)
|
158
|
+
|
159
|
+
except (
|
160
|
+
InvalidParameterException,
|
161
|
+
PropertyServerException,
|
162
|
+
UserNotAuthorizedException,
|
163
|
+
) as e:
|
164
|
+
console.print_exception()
|
165
|
+
sys.exit(1)
|
166
|
+
|
167
|
+
except ValueError as e:
|
168
|
+
console.print(
|
169
|
+
f"\n\n====> Invalid Search String - must be greater than four characters long"
|
170
|
+
)
|
171
|
+
sys.exit(1)
|
172
|
+
|
173
|
+
|
174
|
+
def main():
|
175
|
+
parser = argparse.ArgumentParser()
|
176
|
+
parser.add_argument("--server", help="Name of the server to display status for")
|
177
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
178
|
+
parser.add_argument("--userid", help="User Id")
|
179
|
+
parser.add_argument("--password", help="User Password")
|
180
|
+
parser.add_argument("--time_out", help="Time Out")
|
181
|
+
|
182
|
+
args = parser.parse_args()
|
183
|
+
|
184
|
+
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
185
|
+
url = args.url if args.url is not None else EGERIA_PLATFORM_URL
|
186
|
+
userid = args.userid if args.userid is not None else EGERIA_USER
|
187
|
+
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
188
|
+
time_out = args.time_out if args.time_out is not None else 60
|
189
|
+
try:
|
190
|
+
search_string = Prompt.ask("Enter an asset search string:", default="")
|
191
|
+
prop_list = Prompt.ask(
|
192
|
+
"Enter the list of properties to search", default="anchorTypeName"
|
193
|
+
)
|
194
|
+
display_elements(
|
195
|
+
search_string, [prop_list], server, url, userid, user_pass, time_out
|
196
|
+
)
|
197
|
+
except KeyboardInterrupt:
|
198
|
+
pass
|
199
|
+
|
200
|
+
|
201
|
+
if __name__ == "__main__":
|
202
|
+
main()
|
@@ -8,18 +8,16 @@
|
|
8
8
|
|
9
9
|
# pyegeria: a python client for Egeria
|
10
10
|
|
11
|
-
This is
|
11
|
+
This is a package for easily using the Egeria
|
12
12
|
open metadata environment from python. Details about the
|
13
13
|
open source Egeria project can be found at [Egeria Project](https://egeria-project.org).
|
14
14
|
|
15
15
|
This package is in active development. There is initial
|
16
16
|
support for many of Egeria's services including configuration and operation. This client depends on
|
17
|
-
Egeria
|
17
|
+
This release supports Egeria 5.1 and above - although most of the functions may work on earlier versions of Egeria as well.
|
18
18
|
|
19
19
|
The code is organized to mimic the existing Egeria Java Client structure.
|
20
20
|
|
21
|
-
A new examples folder holds some useful text widgets that help to visualize the status of an Egeria deployment.
|
22
|
-
|
23
21
|
WARNING: files that start with "X" are in-progress placeholders that are not meant to be used..they will mature and
|
24
22
|
evolve.
|
25
23
|
|
@@ -2336,11 +2336,11 @@ class AutomatedCuration(Client):
|
|
2336
2336
|
) -> str:
|
2337
2337
|
"""Initiate a postgres database survey"""
|
2338
2338
|
|
2339
|
-
url = f"{self.curation_command_root}/governance-action-types/
|
2339
|
+
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2340
2340
|
|
2341
2341
|
body = {
|
2342
2342
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
2343
|
-
"governanceActionTypeQualifiedName": "
|
2343
|
+
"governanceActionTypeQualifiedName": "survey-postgres-database",
|
2344
2344
|
"actionTargets": [
|
2345
2345
|
{
|
2346
2346
|
"class": "NewActionTarget",
|
@@ -2365,7 +2365,7 @@ class AutomatedCuration(Client):
|
|
2365
2365
|
) -> str:
|
2366
2366
|
"""Initiate a postgres server survey - Async version"""
|
2367
2367
|
|
2368
|
-
url = f"{self.curation_command_root}/governance-action-types/
|
2368
|
+
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2369
2369
|
|
2370
2370
|
body = {
|
2371
2371
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2426,7 +2426,7 @@ class AutomatedCuration(Client):
|
|
2426
2426
|
- AssetSurvey:survey-all-folders-and-files
|
2427
2427
|
"""
|
2428
2428
|
|
2429
|
-
url = f"{self.curation_command_root}/governance-action-types/
|
2429
|
+
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2430
2430
|
|
2431
2431
|
body = {
|
2432
2432
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2489,7 +2489,7 @@ class AutomatedCuration(Client):
|
|
2489
2489
|
async def _async_initiate_file_survey(self, file_guid: str) -> str:
|
2490
2490
|
"""Initiate a file survey - async version"""
|
2491
2491
|
|
2492
|
-
url = f"{self.curation_command_root}/governance-action-types/
|
2492
|
+
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2493
2493
|
|
2494
2494
|
body = {
|
2495
2495
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2525,7 +2525,7 @@ class AutomatedCuration(Client):
|
|
2525
2525
|
|
2526
2526
|
"""
|
2527
2527
|
|
2528
|
-
url = f"{self.curation_command_root}/governance-action-types/
|
2528
|
+
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2529
2529
|
|
2530
2530
|
body = {
|
2531
2531
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2576,7 +2576,7 @@ class AutomatedCuration(Client):
|
|
2576
2576
|
|
2577
2577
|
"""
|
2578
2578
|
|
2579
|
-
url = f"{self.curation_command_root}/governance-action-types/
|
2579
|
+
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2580
2580
|
|
2581
2581
|
body = {
|
2582
2582
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -2626,7 +2626,7 @@ class AutomatedCuration(Client):
|
|
2626
2626
|
|
2627
2627
|
"""
|
2628
2628
|
|
2629
|
-
url = f"{self.curation_command_root}/governance-action-types/
|
2629
|
+
url = f"{self.curation_command_root}/governance-action-types/initiate"
|
2630
2630
|
|
2631
2631
|
body = {
|
2632
2632
|
"class": "InitiateGovernanceActionTypeRequestBody",
|
@@ -89,7 +89,9 @@ class ValidMetadataManager(Client):
|
|
89
89
|
"preferredValue": "",
|
90
90
|
"dataType": "",
|
91
91
|
"isCaseSensitive": false,
|
92
|
-
"isDeprecated" : false
|
92
|
+
"isDeprecated" : false,
|
93
|
+
"effectiveFrom" : "2024-09-30T20:00:00.000Z",
|
94
|
+
"effectiveTo" : "2025-09-30T20:00:00.000Z",
|
93
95
|
}
|
94
96
|
"""
|
95
97
|
|
@@ -199,7 +201,9 @@ class ValidMetadataManager(Client):
|
|
199
201
|
"preferredValue": "put mapName value here",
|
200
202
|
"dataType": "",
|
201
203
|
"isCaseSensitive": false,
|
202
|
-
"isDeprecated" : false
|
204
|
+
"isDeprecated" : false,
|
205
|
+
"effectiveFrom" : "2024-09-30T20:00:00.000Z",
|
206
|
+
"effectiveTo" : "2025-09-30T20:00:00.000Z"
|
203
207
|
}
|
204
208
|
|
205
209
|
"""
|
@@ -315,6 +319,8 @@ class ValidMetadataManager(Client):
|
|
315
319
|
"preferredValue": "put mapName value here",
|
316
320
|
"dataType": "",
|
317
321
|
"isCaseSensitive": false,
|
322
|
+
"effectiveFrom" : "2024-09-30T20:00:00.000Z",
|
323
|
+
"effectiveTo" : "2025-09-30T20:00:00.000Z"
|
318
324
|
}
|
319
325
|
"""
|
320
326
|
url = (
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "pyegeria"
|
3
|
-
version = "
|
3
|
+
version = "1.5.1.0.1"
|
4
4
|
license = 'Apache 2.0'
|
5
5
|
authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
|
6
6
|
readme = "README.md"
|
@@ -116,7 +116,8 @@ pytest = "^8.2.2"
|
|
116
116
|
get_element_info = "commands.tech.get_element_info:main"
|
117
117
|
list_elements = "commands.tech.list_elements:main"
|
118
118
|
list_related_specification = "commands.tech.list_related_specification:main"
|
119
|
-
list_elements_by_classification = "commands.tech.
|
119
|
+
list_elements_by_classification = "commands.tech.list_elements_for_classification:main"
|
120
120
|
list_related_elements = "commands.tech.list_related_elements:main"
|
121
121
|
|
122
122
|
list_valid_metadata_values = "commands.tech.list_valid_metadata_values:main"
|
123
|
+
list_get_element_graph = "commands.tech.get_element_graph:main"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|