pyegeria 0.5.1__tar.gz → 0.5.3__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 (66) hide show
  1. {pyegeria-0.5.1 → pyegeria-0.5.3}/PKG-INFO +5 -2
  2. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/doc_samples/Create_Collection_Sample.py +2 -2
  3. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/developer/get_guid_info.py +2 -1
  4. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/__init__.py +3 -2
  5. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/utils.py +59 -61
  6. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyproject.toml +2 -2
  7. {pyegeria-0.5.1 → pyegeria-0.5.3}/LICENSE +0 -0
  8. {pyegeria-0.5.1 → pyegeria-0.5.3}/README.md +0 -0
  9. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/doc_samples/Create_Sustainability_Collection_Sample.py +0 -0
  10. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/catalog_user/README.md +0 -0
  11. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/catalog_user/__init__.py +0 -0
  12. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/catalog_user/list_assets.py +0 -0
  13. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/catalog_user/view_asset_graph.py +0 -0
  14. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/catalog_user/view_collection.py +0 -0
  15. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/catalog_user/view_glossary.py +0 -0
  16. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/developer/README.md +0 -0
  17. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/developer/__init__.py +0 -0
  18. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/developer/get_tech_details.py +0 -0
  19. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/developer/list_asset_types.py +0 -0
  20. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/developer/list_registered_services.py +0 -0
  21. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/developer/list_relationship_types.py +0 -0
  22. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/developer/list_tech_templates.py +0 -0
  23. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/developer/list_tech_types.py +0 -0
  24. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/developer/list_valid_metadata_values.py +0 -0
  25. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/README.md +0 -0
  26. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/__init__.py +0 -0
  27. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/get_tech_type_elements.py +0 -0
  28. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/get_tech_type_template.py +0 -0
  29. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/view_asset_events.py +0 -0
  30. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/view_coco_status.py +0 -0
  31. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/view_eng_action_status.py +0 -0
  32. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/view_gov_eng_status.py +0 -0
  33. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/view_integ_daemon_status.py +0 -0
  34. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/view_platform_status.py +0 -0
  35. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/view_server_list.py +0 -0
  36. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/operational/view_server_status.py +0 -0
  37. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/personal_organizer/README.md +0 -0
  38. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/personal_organizer/__init__.py +0 -0
  39. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/personal_organizer/get_my_profile.py +0 -0
  40. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/personal_organizer/list_projects.py +0 -0
  41. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/personal_organizer/list_todos.py +0 -0
  42. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/personal_organizer/view_my_todos.py +0 -0
  43. {pyegeria-0.5.1 → pyegeria-0.5.3}/examples/widgets/personal_organizer/view_open_todos.py +0 -0
  44. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/Xfeedback_manager_omvs.py +0 -0
  45. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/Xloaded_resources_omvs.py +0 -0
  46. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/_client.py +0 -0
  47. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/_deprecated_gov_engine.py +0 -0
  48. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/_exceptions.py +0 -0
  49. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/_globals.py +0 -0
  50. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/_validators.py +0 -0
  51. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/action_author_omvs.py +0 -0
  52. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/asset_catalog_omvs.py +0 -0
  53. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/automated_curation_omvs.py +0 -0
  54. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/collection_manager_omvs.py +0 -0
  55. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/core_guids.py +0 -0
  56. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/core_omag_server_config.py +0 -0
  57. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/full_omag_server_config.py +0 -0
  58. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/glossary_browser_omvs.py +0 -0
  59. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/glossary_manager_omvs.py +0 -0
  60. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/my_profile_omvs.py +0 -0
  61. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/platform_services.py +0 -0
  62. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/project_manager_omvs.py +0 -0
  63. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/registered_info.py +0 -0
  64. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/runtime_manager_omvs.py +0 -0
  65. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/server_operations.py +0 -0
  66. {pyegeria-0.5.1 → pyegeria-0.5.3}/pyegeria/valid_metadata_omvs.py +0 -0
@@ -1,17 +1,20 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.5.1
3
+ Version: 0.5.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
7
7
  Keywords: egeria,metadata,governance
8
8
  Author: Dan Wolfson
9
9
  Author-email: dan.wolfson@pdr-associates.com
10
- Requires-Python: >=3.12,<4.0
10
+ Requires-Python: >=3.9,<4.0
11
11
  Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: License :: Other/Proprietary License
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
15
18
  Classifier: Programming Language :: Python :: 3.12
16
19
  Requires-Dist: confluent-kafka (>=2.5.0,<3.0.0)
17
20
  Requires-Dist: httpx (>=0.27.0,<0.28.0)
@@ -16,7 +16,7 @@ from pyegeria import CollectionManager, InvalidParameterException, PropertyServe
16
16
  view_server = 'view-server'
17
17
  platform_url = 'https://localhost:9443'
18
18
  user = 'erinoverview'
19
- console = Console()
19
+ console = Console(width=200)
20
20
 
21
21
  try:
22
22
  c_client = CollectionManager(view_server, platform_url,
@@ -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 = "97bbfe07-6696-4550-bf8b-6b577d25bef0"
43
+ parent_guid = "f53ea7c8-3107-4477-8459-9bc63f9e69af"
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"
@@ -58,8 +58,9 @@ def display_guid(guid: str, server: str, url: str, username: str):
58
58
 
59
59
  except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException, ValueError) as e:
60
60
  if type(e) is str:
61
- print(e)
61
+ print(e)
62
62
  else:
63
+ console.print(f"\n Looks like the GUID isn't know...detailed message follows\n")
63
64
  print_exception_response(e)
64
65
 
65
66
  def main():
@@ -23,7 +23,8 @@ if disable_ssl_warnings:
23
23
 
24
24
  from ._exceptions import (InvalidParameterException, PropertyServerException, UserNotAuthorizedException,
25
25
  print_exception_response)
26
- from .utils import print_response, body_slimmer, wrap_text
26
+ # from .utils import print_response, body_slimmer, wrap_text
27
+ from .utils import print_response, body_slimmer
27
28
  from ._client import Client
28
29
  from .automated_curation_omvs import AutomatedCuration
29
30
  from .core_omag_server_config import CoreServerConfig
@@ -47,4 +48,4 @@ from .runtime_manager_omvs import RuntimeManager
47
48
  from .action_author_omvs import GovernanceAuthor
48
49
  from .glossary_manager_omvs import GlossaryManager
49
50
 
50
- __version__ = "0.5"
51
+ __version__ = "0.5.2"
@@ -6,71 +6,69 @@ General utility functions in support of the Egeria Python Client package.
6
6
 
7
7
  """
8
8
  import json
9
- import textwrap
10
9
  from rich import print, print_json
11
- import pandas as pd
12
- from tabulate import tabulate
13
10
 
14
11
 
15
- def wrap_text(df: pd.DataFrame, wrap_len: int = 30) -> pd.DataFrame:
16
- """ Wrap the text in a dataframe
17
- Parameters
18
- ----------
19
- df : pandas.DataFrame
20
- The DataFrame to wrap the text in.
21
- wrap_len : int, optional
22
- The maximum length of each cell's contents to wrap. Defaults to 30.
23
-
24
- Returns
25
- -------
26
- pandas.DataFrame
27
- A new DataFrame with the wrapped text.
28
-
29
- """
30
-
31
- # Helper function to wrap text in a particular cell
32
- def wrap_cell_contents(cell_contents: str, wrap: int = 30) -> str:
33
- """ Wrap the text in a cell
34
- Parameters
35
- ----------
36
- cell_contents : str or any
37
- The contents of a cell in a dataframe.
38
- wrap : int, optional
39
- The maximum width at which to wrap the cell contents. Default is 30.
40
-
41
- Returns
42
- -------
43
- str or any
44
- If the cell_contents is a string and its length is greater than wrap_len,
45
- the contents are wrapped at wrap_len width using textwrap.
46
- Otherwise, the original cell_contents are returned as is.
47
- """
48
- if isinstance(cell_contents, str) and len(cell_contents) > wrap:
49
- return textwrap.fill(cell_contents, width=wrap)
50
- else:
51
- return cell_contents
52
-
53
- # Apply the helper function to each element in the DataFrame
54
- return df.map(lambda x: wrap_cell_contents(x, wrap_len))
55
-
56
-
57
- def print_nice_table(df, wrap_len: int = 20, tablefmt: str = "grid") -> None:
58
- """ Print a nice table from the data frame"""
59
- print(tabulate(wrap_text(df, wrap_len), headers="keys", tablefmt=tablefmt))
60
-
61
12
 
62
- def get_json_as_table(input_json, wrap_len: int = 30, tablefmt: str = "grid") -> str:
63
- """ return the input json as a table"""
64
- data = json.loads(json.dumps(input_json))
65
- df = pd.json_normalize(data)
66
- return tabulate(wrap_text(df, wrap_len), headers="keys", tablefmt=tablefmt)
67
-
68
-
69
- def print_json_list_as_table(input_json, wrap_len: int = 30, tablefmt: str = "grid") -> None:
70
- """ print a json list as a table"""
71
- data = json.loads(json.dumps(input_json))
72
- df = pd.json_normalize(data)
73
- print(tabulate(wrap_text(df, wrap_len), headers="keys", tablefmt=tablefmt))
13
+ # def wrap_text(df: pd.DataFrame, wrap_len: int = 30) -> pd.DataFrame:
14
+ # """ Wrap the text in a dataframe
15
+ # Parameters
16
+ # ----------
17
+ # df : pandas.DataFrame
18
+ # The DataFrame to wrap the text in.
19
+ # wrap_len : int, optional
20
+ # The maximum length of each cell's contents to wrap. Defaults to 30.
21
+ #
22
+ # Returns
23
+ # -------
24
+ # pandas.DataFrame
25
+ # A new DataFrame with the wrapped text.
26
+ #
27
+ # """
28
+ #
29
+ # # Helper function to wrap text in a particular cell
30
+ # def wrap_cell_contents(cell_contents: str, wrap: int = 30) -> str:
31
+ # """ Wrap the text in a cell
32
+ # Parameters
33
+ # ----------
34
+ # cell_contents : str or any
35
+ # The contents of a cell in a dataframe.
36
+ # wrap : int, optional
37
+ # The maximum width at which to wrap the cell contents. Default is 30.
38
+ #
39
+ # Returns
40
+ # -------
41
+ # str or any
42
+ # If the cell_contents is a string and its length is greater than wrap_len,
43
+ # the contents are wrapped at wrap_len width using textwrap.
44
+ # Otherwise, the original cell_contents are returned as is.
45
+ # """
46
+ # if isinstance(cell_contents, str) and len(cell_contents) > wrap:
47
+ # return textwrap.fill(cell_contents, width=wrap)
48
+ # else:
49
+ # return cell_contents
50
+ #
51
+ # # Apply the helper function to each element in the DataFrame
52
+ # return df.map(lambda x: wrap_cell_contents(x, wrap_len))
53
+ #
54
+ #
55
+ # def print_nice_table(df, wrap_len: int = 20, tablefmt: str = "grid") -> None:
56
+ # """ Print a nice table from the data frame"""
57
+ # print(tabulate(wrap_text(df, wrap_len), headers="keys", tablefmt=tablefmt))
58
+ #
59
+ #
60
+ # def get_json_as_table(input_json, wrap_len: int = 30, tablefmt: str = "grid") -> str:
61
+ # """ return the input json as a table"""
62
+ # data = json.loads(json.dumps(input_json))
63
+ # df = pd.json_normalize(data)
64
+ # return tabulate(wrap_text(df, wrap_len), headers="keys", tablefmt=tablefmt)
65
+ #
66
+ #
67
+ # def print_json_list_as_table(input_json, wrap_len: int = 30, tablefmt: str = "grid") -> None:
68
+ # """ print a json list as a table"""
69
+ # data = json.loads(json.dumps(input_json))
70
+ # df = pd.json_normalize(data)
71
+ # print(tabulate(wrap_text(df, wrap_len), headers="keys", tablefmt=tablefmt))
74
72
 
75
73
 
76
74
  def print_rest_request_body(body):
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "0.5.1"
3
+ version = "0.5.3"
4
4
  license = 'Apache 2.0'
5
5
  authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
6
6
  readme = "README.md"
@@ -24,7 +24,7 @@ packages = [
24
24
  ]
25
25
 
26
26
  [tool.poetry.dependencies]
27
- python = "^3.12"
27
+ python = "^3.9"
28
28
  httpx = "^0.27.0"
29
29
  rich = "^13.7.1"
30
30
  validators = "^0.32.0"
File without changes
File without changes
File without changes
File without changes