pyegeria 0.7.0__py3-none-any.whl → 0.7.3__py3-none-any.whl

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.
@@ -40,7 +40,7 @@ try:
40
40
  display_name, description, collection_type,
41
41
  is_own_anchor)
42
42
  # Create first folder for Agriculture Insights
43
- parent_guid = "f53ea7c8-3107-4477-8459-9bc63f9e69af"
43
+ parent_guid = response
44
44
  parent_relationship_type_name = "CollectionMembership"
45
45
  display_name = "Agriculture Insights Collection"
46
46
  description = "A folder for agricultural insights data product collections"
@@ -65,14 +65,14 @@ def asset_viewer(asset_guid: str, server_name: str, platform_url: str, user: str
65
65
 
66
66
  def build_nested_elements(nested_element: dict) -> Markdown:
67
67
  ne_md = " "
68
-
69
- ne_created_by = nested_element["versions"]["createdBy"]
70
- ne_created_at = nested_element["versions"]["createTime"]
71
- ne_guid = nested_element["guid"]
68
+ ne_header = nested_element['elementHeader']
69
+ ne_created_by = ne_header["versions"]["createdBy"]
70
+ ne_created_at = ne_header["versions"]["createTime"]
71
+ ne_guid = ne_header["guid"]
72
72
  guid_list.append(ne_guid)
73
73
 
74
- ne_type = nested_element["type"]["typeName"]
75
- ne_classifications = nested_element["classifications"]
74
+ ne_type = ne_header["type"]["typeName"]
75
+ ne_classifications = ne_header["classifications"]
76
76
  ne_class_md = build_classifications(ne_classifications)
77
77
  # ne_class_md = " " if ne_class_md is None else ne_class_md
78
78
  ne_props = nested_element.get("properties", "---")
@@ -102,10 +102,11 @@ def display_assets(search_string: str, server: str, url: str, username: str, use
102
102
  match_tab.add_column("GUID", no_wrap=True, width=36)
103
103
  match_tab.add_column("Properties")
104
104
 
105
- for match in nested:
105
+ for match_t in nested:
106
+ match = match_t['elementHeader']
106
107
  match_type_name = match['type']['typeName']
107
108
  matching_guid = match['guid']
108
- match_props = match['properties']
109
+ match_props = match_t['properties']
109
110
  match_details_md = ""
110
111
  for key in match_props.keys():
111
112
  match_details_md += f"* {key}: {match_props[key]}\n"
@@ -499,14 +499,14 @@ def survey_uc_server(ctx, uc_endpoint):
499
499
  # Operations: Show
500
500
  #
501
501
 
502
- @cli.group('operations')
502
+ @cli.group('ops')
503
503
  @click.pass_context
504
- def operations(ctx):
504
+ def ops(ctx):
505
505
  """ Commands to understand and manage operations"""
506
506
  pass
507
507
 
508
508
 
509
- @operations.group("show")
509
+ @ops.group("show")
510
510
  @click.pass_context
511
511
  def show(ctx):
512
512
  """Display an Egeria Object"""
@@ -610,7 +610,7 @@ def integrations_status(ctx, connector):
610
610
  # Operations: Tell
611
611
  #
612
612
 
613
- @operations.group('tell')
613
+ @ops.group('tell')
614
614
  @click.pass_context
615
615
  def tell(ctx):
616
616
  """Perform actions an Egeria Objects"""
@@ -41,7 +41,7 @@ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
41
41
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
42
42
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
43
43
  EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
44
- EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
44
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '150'))
45
45
 
46
46
  def display_my_profile(server: str, url: str, username: str, user_pass:str,
47
47
  jupyter:bool=EGERIA_JUPYTER, width:int = EGERIA_WIDTH):
@@ -71,13 +71,13 @@ def display_my_profile(server: str, url: str, username: str, user_pass:str,
71
71
  for k in profile_props[key].keys():
72
72
  p_md += f"\t* {k}: {profile_props[key][k]}\n"
73
73
  profile_props_md += p_md
74
- t1 = tree.add(Panel(Markdown(profile_props_md),title="Profile Properties"))
74
+ t1 = tree.add(Panel(Markdown(profile_props_md),title="Profile Properties", expand=False))
75
75
 
76
76
 
77
77
  id_list_md=""
78
78
  for identities in my_profiles["userIdentities"]:
79
79
  id_list_md += f"* {identities['userIdentity']['properties']['userId']}\n"
80
- t2 = tree.add(Panel(Markdown(id_list_md), title="Identities"))
80
+ t2 = tree.add(Panel(Markdown(id_list_md), title="Identities", expand=False))
81
81
 
82
82
  contact_methods = my_profiles['contactMethods']
83
83
  for method in contact_methods:
@@ -85,7 +85,7 @@ def display_my_profile(server: str, url: str, username: str, user_pass:str,
85
85
  contact_methods_md = ""
86
86
  for key in contact.keys():
87
87
  contact_methods_md += f"* {key}: {contact[key]}\n"
88
- t3 = tree.add(Panel(Markdown(contact_methods_md), title="Contact Methods"))
88
+ t3 = tree.add(Panel(Markdown(contact_methods_md), title="Contact Methods", expand=False))
89
89
 
90
90
  my_roles = my_profiles["roles"]
91
91
  table = Table(
@@ -105,7 +105,7 @@ def display_my_profile(server: str, url: str, username: str, user_pass:str,
105
105
  table.add_row(
106
106
  role_type, role, role_guid
107
107
  )
108
- t4 = tree.add(Panel(table, title="Roles" ),expanded=True)
108
+ t4 = tree.add(Panel(table, title="Roles", expand=False ),expanded=True)
109
109
 
110
110
  print(tree)
111
111
 
@@ -41,8 +41,10 @@ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
41
41
  EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
42
42
 
43
43
 
44
+
44
45
  def display_catalog_targets(connector: str, server: str, url: str, username: str, user_password: str,
45
46
  jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
47
+ console = Console(force_terminal=not jupyter, width=width, soft_wrap=True)
46
48
  def generate_table() -> Table:
47
49
  """Make a new table."""
48
50
  table = Table(
@@ -24,7 +24,7 @@ from pyegeria import (
24
24
  InvalidParameterException,
25
25
  PropertyServerException,
26
26
  UserNotAuthorizedException,
27
- Client
27
+ Client, ClassificationManager
28
28
  )
29
29
 
30
30
 
@@ -48,12 +48,16 @@ def display_guid(guid: str, server: str, url: str, username: str, user_password:
48
48
  c = Client(server, url, user_id=username)
49
49
  url = (f"{url}/servers/{server}/open-metadata/repository-services/users/{username}/"
50
50
  f"instances/entity/{guid}")
51
+ # c = ClassificationManager(server, url)
52
+
53
+ bearer_token = c.create_egeria_bearer_token(username, user_password)
51
54
 
52
55
  try:
53
56
  console = Console(width=width, force_terminal=not jupyter, style="bold white on black")
54
57
  r = c.make_request("GET", url)
55
58
  if r.status_code == 200:
56
59
  pass
60
+ # r = c.retrieve_instance_for_guid(guid)
57
61
  e = r.json()['entity']
58
62
  p = e['properties']['instanceProperties']
59
63
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.7.0
3
+ Version: 0.7.3
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -1,20 +1,20 @@
1
- examples/doc_samples/Create_Collection_Sample.py,sha256=D8nhc4qLXIzAqVdJQjmFIS-jL6FzmYCMZyEviXnUbvg,11874
1
+ examples/doc_samples/Create_Collection_Sample.py,sha256=bz4QUbimAbp-Tn21Sr0DhwlGq53xeyNU8M23fvkjEI0,11844
2
2
  examples/doc_samples/Create_Sustainability_Collection_Sample.py,sha256=iLBm1LwRLi42Gayyb-wcWZ5NySQ6sc4kVSmwIAzP2Po,5049
3
3
  examples/widgets/cat/README.md,sha256=-aaAnIT2fcfU63vajgB-RzQk4l4yFdhkyVfSaTPiqRY,967
4
4
  examples/widgets/cat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- examples/widgets/cat/get_asset_graph.py,sha256=Q23n_svJBii58hgaMPLpliN8wqKl4yhnhCCk2IU2nvM,11168
5
+ examples/widgets/cat/get_asset_graph.py,sha256=5YwgV4D1_R9pptPJuIFbPOjWpZBnfPiEan33_To75TE,11194
6
6
  examples/widgets/cat/get_collection.py,sha256=DBZ5-XkoYsz4WmMSPz0Ao0wz3DlAUQve89KI26-44nc,4613
7
7
  examples/widgets/cat/get_project_structure.py,sha256=-ruR649KZoyxJxiITUd9YFq9kn_uxcnybqVTa_7iiic,5692
8
8
  examples/widgets/cat/get_tech_type_elements.py,sha256=SvnDWfBIA1NzpkKZj4-ZapIeM2SEhe5jJt7rTkvTzaA,6129
9
9
  examples/widgets/cat/get_tech_type_template.py,sha256=gMFVcgCIm09GQu1Vsc5ZUVH9XLhItAG1eVGZJrcnHeQ,6174
10
- examples/widgets/cat/list_assets.py,sha256=imVun2GB3zoEjaQxKJVGcalI7yZv5Dg_ksb7tYCIVLE,6476
10
+ examples/widgets/cat/list_assets.py,sha256=bNwSaBDz661hfnc2Rn4j4HPHAugKvz0XwN9L1m4FVQk,6529
11
11
  examples/widgets/cat/list_cert_types.py,sha256=-FEftRK36pOAXYr8OprvL6T_FcRyVtgfqzSKX74XC5o,7004
12
12
  examples/widgets/cat/list_glossary.py,sha256=zljSzVKYysFZVmVhHJt0fYFDmAG9azIphOs4MOIfA7g,5395
13
13
  examples/widgets/cat/list_projects.py,sha256=jP6HoVqGi-w4R1itgdAW1zamPLsgkvjvh8reRj0v10Q,7432
14
14
  examples/widgets/cat/list_tech_types.py,sha256=20T4v6L5qeebSsaL1nGkFMDAIsy2W3A3SMm1RcgFoh0,4609
15
15
  examples/widgets/cat/list_todos.py,sha256=wD9HevGcc4G_bxV25VUz1rRssdZHE33mF5zmJ6Lprt8,5522
16
16
  examples/widgets/cli/__init__.py,sha256=6d_R0KZBNnJy9EBz9J2xvGFlx-3j_ZPqPCxKgdvYeDQ,291
17
- examples/widgets/cli/egeria.py,sha256=t56SnK1vm_PHh13pB19HqfOgAuZz33s-rQwMabsVed8,22907
17
+ examples/widgets/cli/egeria.py,sha256=Uh_OUMmh223H9c5wNjUtM3lNZP1m9oVRApolCtlSq6s,22879
18
18
  examples/widgets/cli/egeria_cat.py,sha256=f9KxOPAEFbeEtSAdk_czcBDLqCKsHkrpdiBuDDo-iUw,10301
19
19
  examples/widgets/cli/egeria_my.py,sha256=xi2j1hzNnjDruJeR1qa8K9JPDgzaL_COsMkcieT4Vo8,5653
20
20
  examples/widgets/cli/egeria_ops.py,sha256=ZOIQdpRZ5VgL282OpjNVmXvxxmmVxnOaEGF0sNIpzF0,10011
@@ -22,7 +22,7 @@ examples/widgets/cli/egeria_tech.py,sha256=C7eooVyjHTYwA-aEEaeqJgDgJRdmiK0M3dca7
22
22
  examples/widgets/cli/ops_config.py,sha256=m4AfPjf-fR4EBTx8Dc2mcgrfWwAxb30YGeV-v79bg4U,1450
23
23
  examples/widgets/my/README.md,sha256=ZheFhj_VoPMhcWjW3pGchHB0vH_A9PklSmrSkzKdrcQ,844
24
24
  examples/widgets/my/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- examples/widgets/my/list_my_profile.py,sha256=WERjdQTCGhs8yz7Xa8xKlKRY1eJvB2Iz79lYJjB2h1U,5423
25
+ examples/widgets/my/list_my_profile.py,sha256=zKNjG7iE0NNihnTv1ot1vodEJ321N-gfR6eTyHTWCQM,5479
26
26
  examples/widgets/my/list_my_roles.py,sha256=DCiNdnoHXQueUE5g73D3oRXfJ6LaUQGbibNtDRdicR8,5078
27
27
  examples/widgets/my/monitor_my_todos.py,sha256=2INaUuKE5obKysoGzJLPUpc-oRJvQsx8_qoGtv_eBDI,6405
28
28
  examples/widgets/my/monitor_open_todos.py,sha256=DIeWC-2tN1EtmgC2rWJfsGMVQhtNcngobJ8paBiXXBI,5396
@@ -31,7 +31,7 @@ examples/widgets/ops/README.md,sha256=PJsSDcvMv6E6og6y-cwvxFX5lhCII0UCwgKiM1T17M
31
31
  examples/widgets/ops/__init__.py,sha256=SCfzF3-aMx8EpqLWmH7JQf13gTmMAtHRbg69oseLvi8,480
32
32
  examples/widgets/ops/engine_actions.py,sha256=tvBhUs97OC3Q0FGSUVRskL9Q61c6NrLiNjdSH_04b_g,1444
33
33
  examples/widgets/ops/integration_daemon_actions.py,sha256=m17Oi8NJfs1qPaV6qRadse3HhLQT16FQA0jAIUYuCTk,3951
34
- examples/widgets/ops/list_catalog_targets.py,sha256=H0Igj_s7nhAV0vJUb0Np7DlJtAz36avljLBCuxt4p7Y,6609
34
+ examples/widgets/ops/list_catalog_targets.py,sha256=s8_tF1A-qs6pHowsUuXe2Uzhla4waduJ8q7DXkX8W9g,6689
35
35
  examples/widgets/ops/load_archive.py,sha256=duf3wq2ANRBiOj9KTFsw8TseEkJLKdzITAeTCjsMvI0,2453
36
36
  examples/widgets/ops/monitor_asset_events.py,sha256=cjdlVqE0XYnoRW3aorNbsVkjByDXefPBnllaZLelGls,3838
37
37
  examples/widgets/ops/monitor_coco_status.py,sha256=ERz3OJ0TXImNKHGD4gJvgT3pl2gS23ewAdUuYVLUhEE,3299
@@ -45,7 +45,7 @@ examples/widgets/ops/refresh_integration_daemon.py,sha256=QDB3dpAlLY8PhrGhAZG4tW
45
45
  examples/widgets/ops/restart_integration_daemon.py,sha256=fID7qGFL5RD6rfn9PgXf5kwI4MU0Ho_IGXnDVbKT5nU,2710
46
46
  examples/widgets/tech/README.md,sha256=nxDnfr3BCiGgW5G1VxWxiwUWJXIe5wreNuUeRyIt_hY,1343
47
47
  examples/widgets/tech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- examples/widgets/tech/get_guid_info.py,sha256=TSB6tUr2kJH5sIUc2TfGDPEi6ysb9c6TQ-Tp4sg0iyY,3945
48
+ examples/widgets/tech/get_guid_info.py,sha256=p-peTX1Mahi8fNmcNVHOVI3OjqjlJwZjv7gRdBI4l0Q,4137
49
49
  examples/widgets/tech/get_tech_details.py,sha256=b7i3kSTaZ2pZPcxkDccqY27bqeHJoYnPCxOvlKPH0hw,5753
50
50
  examples/widgets/tech/list_asset_types.py,sha256=PHPtCXqCHhIw0K59hUvoKdybp6IKPt_9Wc0AJVDtdrg,4181
51
51
  examples/widgets/tech/list_registered_services.py,sha256=TqZbT54vMGvHUAX_bovCce3A3eV_RbjSEtPP6u6ZJV0,6388
@@ -78,8 +78,8 @@ pyegeria/runtime_manager_omvs.py,sha256=oSVFeG_yBGXIvQR0EClLZqTZ6C5z5ReZzwm8cce8
78
78
  pyegeria/server_operations.py,sha256=ZX7FlJRrAC7RK4bq4wHWepEsYbbWlqkUZdsJrTplVVU,16534
79
79
  pyegeria/utils.py,sha256=pkVmS3RrbjaS9yz7FtOCwaOfV5FMqz-__Rt5koCnd9c,5374
80
80
  pyegeria/valid_metadata_omvs.py,sha256=aisdRodIwJSkyArAzfm_sEnBELh69xE8k4Nea-vHu8M,36745
81
- pyegeria-0.7.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
82
- pyegeria-0.7.0.dist-info/METADATA,sha256=bsrI24CE86BR8Wkr8vFZ0jYbJdTK7m7CXmwRTWOoXng,2774
83
- pyegeria-0.7.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
84
- pyegeria-0.7.0.dist-info/entry_points.txt,sha256=tgDYOGHc_YWRsrz0kyvouqOTdrHgiITKzF3GLVV-GvQ,2727
85
- pyegeria-0.7.0.dist-info/RECORD,,
81
+ pyegeria-0.7.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
82
+ pyegeria-0.7.3.dist-info/METADATA,sha256=oZOPe-DWYmA7AVOF3McWE5Td4vA8URGCVCuqibrHpKY,2774
83
+ pyegeria-0.7.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
84
+ pyegeria-0.7.3.dist-info/entry_points.txt,sha256=tgDYOGHc_YWRsrz0kyvouqOTdrHgiITKzF3GLVV-GvQ,2727
85
+ pyegeria-0.7.3.dist-info/RECORD,,