pyegeria 1.5.1.1.30__tar.gz → 1.5.1.1.34__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 (117) hide show
  1. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/PKG-INFO +1 -1
  2. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/asset_catalog_omvs.py +110 -0
  3. pyegeria-1.5.1.1.34/pyegeria/commands/__init__.py +21 -0
  4. pyegeria-1.5.1.1.34/pyegeria/commands/cat/__init__.py +5 -0
  5. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_deployed_catalogs.py +27 -7
  6. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_deployed_database_schemas.py +25 -7
  7. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_deployed_databases.py +22 -6
  8. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_glossaries.py +25 -8
  9. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_terms.py +38 -11
  10. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cli/egeria.py +13 -13
  11. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cli/egeria_cat.py +20 -20
  12. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cli/egeria_tech.py +2 -2
  13. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/engine_actions.py +1 -1
  14. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/monitor_engine_activity_c.py +28 -9
  15. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/monitor_gov_eng_status.py +31 -1
  16. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/monitor_integ_daemon_status.py +43 -1
  17. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/monitor_platform_status.py +6 -6
  18. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/table_integ_daemon_status.py +48 -103
  19. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/glossary_manager_omvs.py +24 -11
  20. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyproject.toml +1 -1
  21. pyegeria-1.5.1.1.30/pyegeria/commands/__init__.py +0 -12
  22. pyegeria-1.5.1.1.30/pyegeria/commands/cat/__init__.py +0 -5
  23. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/LICENSE +0 -0
  24. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/README.md +0 -0
  25. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/README.md +0 -0
  26. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/__init__.py +0 -0
  27. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/_client.py +0 -0
  28. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/_deprecated_gov_engine.py +0 -0
  29. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/_exceptions.py +0 -0
  30. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/_globals.py +0 -0
  31. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/_validators.py +0 -0
  32. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/automated_curation_omvs.py +0 -0
  33. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/classification_manager_omvs.py +0 -0
  34. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/collection_manager_omvs.py +0 -0
  35. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/.DS_Store +0 -0
  36. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/README.md +0 -0
  37. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/__pycache__/server_status_widget.cpython-312-pytest-7.4.4.pyc +0 -0
  38. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/README.md +0 -0
  39. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/get_asset_graph.py +0 -0
  40. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/get_collection.py +0 -0
  41. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/get_project_dependencies.py +0 -0
  42. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/get_project_structure.py +0 -0
  43. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/get_tech_type_elements.py +0 -0
  44. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/get_tech_type_template.py +0 -0
  45. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/glossary_actions.py +0 -0
  46. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_archives.py +0 -0
  47. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_assets.py +0 -0
  48. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_cert_types.py +0 -0
  49. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_projects.py +0 -0
  50. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_relationships.py +0 -0
  51. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_tech_types.py +0 -0
  52. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_todos.py +0 -0
  53. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cat/list_user_ids.py +0 -0
  54. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cli/__init__.py +0 -0
  55. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cli/egeria_my.py +0 -0
  56. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cli/egeria_ops.py +0 -0
  57. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/cli/ops_config.py +0 -0
  58. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/my/README.md +0 -0
  59. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/my/__init__.py +0 -0
  60. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/my/list_my_profile.py +0 -0
  61. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/my/list_my_roles.py +0 -0
  62. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/my/monitor_my_todos.py +0 -0
  63. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/my/monitor_open_todos.py +0 -0
  64. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/my/todo_actions.py +0 -0
  65. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/README.md +0 -0
  66. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/__init__.py +0 -0
  67. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/gov_server_actions.py +0 -0
  68. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/list_catalog_targets.py +0 -0
  69. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/load_archive.py +0 -0
  70. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/monitor_asset_events.py +0 -0
  71. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/monitor_engine_activity.py +0 -0
  72. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/monitor_server_startup.py +0 -0
  73. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/monitor_server_status.py +0 -0
  74. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/orig_monitor_server_list.py +0 -0
  75. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/orig_monitor_server_status.py +0 -0
  76. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/refresh_integration_daemon.py +0 -0
  77. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/ops/restart_integration_daemon.py +0 -0
  78. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/README.md +0 -0
  79. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/__init__.py +0 -0
  80. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/get_element_graph.py +0 -0
  81. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/get_element_info.py +0 -0
  82. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/get_guid_info.py +0 -0
  83. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/get_tech_details.py +0 -0
  84. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_asset_types.py +0 -0
  85. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_elements.py +0 -0
  86. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_elements_for_classification.py +0 -0
  87. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_elements_x.py +0 -0
  88. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_gov_action_processes.py +0 -0
  89. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_registered_services.py +0 -0
  90. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_related_elements.py +0 -0
  91. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_related_specification.py +0 -0
  92. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_relationship_types.py +0 -0
  93. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_tech_templates.py +0 -0
  94. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/list_valid_metadata_values.py +0 -0
  95. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/table_tech_templates.py +0 -0
  96. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/commands/tech/x_list_related_elements.py +0 -0
  97. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/core_omag_server_config.py +0 -0
  98. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/create_tech_guid_lists.py +0 -0
  99. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/egeria_cat_client.py +0 -0
  100. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/egeria_client.py +0 -0
  101. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/egeria_config_client.py +0 -0
  102. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/egeria_my_client.py +0 -0
  103. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/egeria_tech_client.py +0 -0
  104. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/feedback_manager_omvs.py +0 -0
  105. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/full_omag_server_config.py +0 -0
  106. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/glossary_browser_omvs.py +0 -0
  107. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/mermaid_utilities.py +0 -0
  108. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/my_profile_omvs.py +0 -0
  109. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/platform_services.py +0 -0
  110. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/project_manager_omvs.py +0 -0
  111. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/registered_info.py +0 -0
  112. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/runtime_manager_omvs.py +0 -0
  113. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/server_operations.py +0 -0
  114. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/template_manager_omvs.py +0 -0
  115. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/utils.py +0 -0
  116. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/valid_metadata_omvs.py +0 -0
  117. {pyegeria-1.5.1.1.30 → pyegeria-1.5.1.1.34}/pyegeria/x_action_author_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 1.5.1.1.30
3
+ Version: 1.5.1.1.34
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -506,6 +506,116 @@ class AssetCatalog(Client):
506
506
  )
507
507
  return response
508
508
 
509
+ async def _async_get_asset_lineage_graph(
510
+ self,
511
+ asset_guid: str,
512
+ start_from: int = 0,
513
+ page_size: int = max_paging_size,
514
+ ) -> str | dict:
515
+ """Return the asset lineage including a mermaid markdown string. Async Version.
516
+ Parameters
517
+ ----------
518
+ asset_guid : str
519
+ The unique identity of the asset to get the graph for.
520
+
521
+ start_from : int, optional
522
+ The index from which to start fetching the engine actions. Default is 0.
523
+
524
+ page_size : int, optional
525
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
526
+
527
+ Returns
528
+ -------
529
+ str | dict
530
+ A dictionary of the asset graph that includes a mermaid markdown string.
531
+
532
+ Raises:
533
+ ------
534
+ InvalidParameterException
535
+ PropertyServerException
536
+ UserNotAuthorizedException
537
+
538
+ """
539
+
540
+ url = (
541
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/asset-catalog/assets/{asset_guid}/"
542
+ f"as-lineage-graph?startFrom={start_from}&pageSize={page_size}"
543
+ )
544
+
545
+ response = await self._async_make_request("POST", url)
546
+ return response.json().get("assetLineageGraph", "no asset found")
547
+
548
+ def get_asset_lineage_graph(
549
+ self,
550
+ asset_guid: str,
551
+ start_from: int = 0,
552
+ page_size: int = max_paging_size,
553
+ ) -> str | dict:
554
+ """Return the asset lineage including a mermaid markdown string. Async Version.
555
+ Parameters
556
+ ----------
557
+ asset_guid : str
558
+ The unique identity of the asset to get the graph for.
559
+
560
+ start_from : int, optional
561
+ The index from which to start fetching the engine actions. Default is 0.
562
+
563
+ page_size : int, optional
564
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
565
+
566
+ Returns
567
+ -------
568
+ dict or str
569
+ A dictionary of the asset graph.
570
+
571
+ Raises:
572
+ ------
573
+ InvalidParameterException
574
+ PropertyServerException
575
+ UserNotAuthorizedException
576
+
577
+ """
578
+
579
+ loop = asyncio.get_event_loop()
580
+ response = loop.run_until_complete(
581
+ self._async_get_asset_lineage_graph(asset_guid, start_from, page_size)
582
+ )
583
+ return response
584
+
585
+ def get_asset_lineage_mermaid_graph(
586
+ self,
587
+ asset_guid: str,
588
+ start_from: int = 0,
589
+ page_size: int = max_paging_size,
590
+ ) -> str:
591
+ """Return the lineage as mermaid markdown string. Async Version.
592
+ Parameters
593
+ ----------
594
+ asset_guid : str
595
+ The unique identity of the asset to get the graph for.
596
+
597
+ start_from : int, optional
598
+ The index from which to start fetching the engine actions. Default is 0.
599
+
600
+ page_size : int, optional
601
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
602
+
603
+ Returns
604
+ -------
605
+ str
606
+ A mermaid string representing the lineage.
607
+
608
+ Raises:
609
+ ------
610
+ InvalidParameterException
611
+ PropertyServerException
612
+ UserNotAuthorizedException
613
+
614
+ """
615
+
616
+ asset_graph = self.get_asset_lineage_graph(asset_guid, start_from, page_size)
617
+ return asset_graph.get("mermaidGraph")
618
+
509
619
  async def _async_get_assets_by_metadata_collection_id(
510
620
  self,
511
621
  metadata_collection_id: str,
@@ -0,0 +1,21 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+
6
+
7
+ pyegeria commands available also from python.
8
+ """
9
+
10
+ from .ops.monitor_gov_eng_status import display_gov_eng_status
11
+ from .ops.monitor_integ_daemon_status import display_integration_daemon_status
12
+ from .ops.table_integ_daemon_status import (
13
+ display_integration_daemon_status as table_integ_daemon_status,
14
+ )
15
+ from .ops.monitor_engine_activity_c import display_engine_activity_c
16
+
17
+ from .cat.list_glossaries import display_glossaries
18
+ from .cat.list_terms import display_glossary_terms
19
+ from .cat.list_deployed_catalogs import list_deployed_catalogs
20
+ from .cat.list_deployed_database_schemas import list_deployed_database_schemas
21
+ from .cat.list_deployed_databases import list_deployed_databases
@@ -0,0 +1,5 @@
1
+ # from .list_glossaries import display_glossaries
2
+ # from .list_terms import display_glossary_terms
3
+ # from .list_deployed_catalogs import list_deployed_catalogs
4
+ # from .list_deployed_database_schemas import list_deployed_database_schemas
5
+ # from .list_deployed_databases import list_deployed_databases
@@ -47,21 +47,41 @@ def check_if_template(header: dict) -> bool:
47
47
 
48
48
 
49
49
  def list_deployed_catalogs(
50
- catalog_server: str,
51
- server: str,
52
- url: str,
53
- username: str,
54
- password: str,
50
+ catalog_server: str = "*",
51
+ view_server: str = EGERIA_VIEW_SERVER,
52
+ view_url: str = EGERIA_VIEW_SERVER_URL,
53
+ user: str = EGERIA_USER,
54
+ user_pass: str = EGERIA_USER_PASSWORD,
55
55
  jupyter: bool = EGERIA_JUPYTER,
56
56
  width: int = EGERIA_WIDTH,
57
57
  ):
58
- c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
58
+ """
59
+ Display the list of deployed catalogs. These could be metadata catalogs or other catalogs such as database catalogs..
60
+
61
+ Parameters
62
+ ----------
63
+ catalog_server : str, optional
64
+ The name of the catalog server to query. Default is "*" for all catalog servers.
65
+ view_server : str, optional
66
+ The server providing the view. Default is EGERIA_VIEW_SERVER.
67
+ view_url : str, optional
68
+ The URL of the view server. Default is EGERIA_VIEW_SERVER_URL.
69
+ user : str, optional
70
+ The user ID for authentication. Default is EGERIA_USER.
71
+ user_pass : str, optional
72
+ The password for the user. Default is EGERIA_USER_PASSWORD.
73
+ jupyter : bool, optional
74
+ Enable Jupyter notebook output. Default is EGERIA_JUPYTER.
75
+ width : int, optional
76
+ The width of the console output. Default is EGERIA_WIDTH.
77
+ """
78
+ c_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
59
79
  token = c_client.create_egeria_bearer_token()
60
80
 
61
81
  def generate_table() -> Table:
62
82
  """Make a new table."""
63
83
  table = Table(
64
- caption=f"Databases found: {url} - {server} @ {time.asctime()}",
84
+ caption=f"Databases found: {view_url} - {view_server} @ {time.asctime()}",
65
85
  style="bold bright_white on black",
66
86
  row_styles=["bold bright_white on black"],
67
87
  header_style="white on dark_blue",
@@ -55,21 +55,39 @@ def make_prop_md(props: dict) -> str:
55
55
 
56
56
 
57
57
  def list_deployed_database_schemas(
58
- db_name: str,
59
- server: str,
60
- url: str,
61
- username: str,
62
- password: str,
58
+ db_name: str = "*",
59
+ view_server: str = EGERIA_VIEW_SERVER,
60
+ view_url: str = EGERIA_VIEW_SERVER_URL,
61
+ user: str = EGERIA_USER,
62
+ user_pass: str = EGERIA_USER_PASSWORD,
63
63
  jupyter: bool = EGERIA_JUPYTER,
64
64
  width: int = EGERIA_WIDTH,
65
65
  ):
66
- c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
66
+ """List schemas that have been deployed in database catalogs or databases.
67
+ Parameters
68
+ ----------
69
+ db_name : str
70
+ Name of the database or catalog to get schemas for, or '*' for all databases.
71
+ view_server : str
72
+ The view server to connect to.
73
+ view_url : str
74
+ URL of the view server.
75
+ user : str
76
+ Username for authentication.
77
+ user_pass : str
78
+ Password for authentication.
79
+ jupyter : bool
80
+ Whether to force the terminal output to behave as if in a Jupyter notebook.
81
+ width : int
82
+ Width of the console output.
83
+ """
84
+ c_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
67
85
  token = c_client.create_egeria_bearer_token()
68
86
 
69
87
  def generate_table() -> Table:
70
88
  """Make a new table."""
71
89
  table = Table(
72
- caption=f"Databases found: {url} - {server} @ {time.asctime()}",
90
+ caption=f"Databases found: {view_url} - {view_server} @ {time.asctime()}",
73
91
  style="bold bright_white on black",
74
92
  row_styles=["bold bright_white on black"],
75
93
  header_style="white on dark_blue",
@@ -47,20 +47,36 @@ def check_if_template(header: dict) -> bool:
47
47
 
48
48
 
49
49
  def list_deployed_databases(
50
- server: str,
51
- url: str,
52
- username: str,
53
- password: str,
50
+ view_server: str = EGERIA_VIEW_SERVER,
51
+ view_url: str = EGERIA_VIEW_SERVER_URL,
52
+ user: str = EGERIA_USER,
53
+ user_pass: str = EGERIA_USER_PASSWORD,
54
54
  jupyter: bool = EGERIA_JUPYTER,
55
55
  width: int = EGERIA_WIDTH,
56
56
  ):
57
- c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
57
+ """
58
+ Parameters
59
+ ----------
60
+ view_server : str
61
+ The view server name to which the Egeria client will connect. By default, this is set to EGERIA_VIEW_SERVER.
62
+ view_url : str
63
+ The URL of the Egeria view server. By default, this is set to EGERIA_VIEW_SERVER_URL.
64
+ user : str
65
+ The username used for authentication with the Egeria server. By default, it is set to EGERIA_USER.
66
+ user_pass : str
67
+ The password used for authentication with the Egeria server. By default, it is set to EGERIA_USER_PASSWORD.
68
+ jupyter : bool
69
+ A flag indicating whether the output is displayed within a Jupyter notebook. Default is set to EGERIA_JUPYTER.
70
+ width : int
71
+ The width of the output console. By default, it is set to EGERIA_WIDTH.
72
+ """
73
+ c_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
58
74
  token = c_client.create_egeria_bearer_token()
59
75
 
60
76
  def generate_table() -> Table:
61
77
  """Make a new table."""
62
78
  table = Table(
63
- caption=f"Databases found: {url} - {server} @ {time.asctime()}",
79
+ caption=f"Databases found: {view_url} - {view_server} @ {time.asctime()}",
64
80
  style="bold bright_white on black",
65
81
  row_styles=["bold bright_white on black"],
66
82
  header_style="white on dark_blue",
@@ -46,16 +46,33 @@ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
46
46
 
47
47
 
48
48
  def display_glossaries(
49
- search_string: str,
50
- server: str,
51
- url: str,
52
- userid: str,
53
- password: str,
49
+ search_string: str = "*",
50
+ view_server: str = EGERIA_VIEW_SERVER,
51
+ view_url: str = EGERIA_VIEW_SERVER_URL,
52
+ user: str = EGERIA_USER,
53
+ user_pass: str = EGERIA_USER_PASSWORD,
54
54
  jupyter: bool = EGERIA_JUPYTER,
55
55
  width: int = EGERIA_WIDTH,
56
56
  ):
57
- """List all glossaries"""
58
- m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
57
+ """Display either a specified glossary or all glossaries if the search_string is '*'.
58
+ Parameters
59
+ ----------
60
+ search_string : str, default is '*'
61
+ The string used to search for glossaries.
62
+ view_server : str
63
+ The view server name or address where the Egeria services are hosted.
64
+ view_url : str
65
+ The URL of the platform the view server is on.
66
+ user : str
67
+ The user ID for authentication with the Egeria server.
68
+ user_pass : str
69
+ The password for authentication with the Egeria server.
70
+ jupyter : bool, optional
71
+ A boolean indicating whether the output is intended for a Jupyter notebook (default is EGERIA_JUPYTER).
72
+ width : int, optional
73
+ The width of the console output (default is EGERIA_WIDTH).
74
+ """
75
+ m_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
59
76
  token = m_client.create_egeria_bearer_token()
60
77
  try:
61
78
  table = Table(
@@ -66,7 +83,7 @@ def display_glossaries(
66
83
  caption_style="white on black",
67
84
  show_lines=True,
68
85
  box=box.ROUNDED,
69
- caption=f"View Server '{server}' @ Platform - {url}",
86
+ caption=f"View Server '{view_server}' @ Platform - {view_url}",
70
87
  expand=True,
71
88
  )
72
89
  table.add_column("Glossary Name")
@@ -46,18 +46,45 @@ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
46
46
 
47
47
 
48
48
  def display_glossary_terms(
49
- search_string: str,
50
- glossary_guid: str,
51
- glossary_name: str,
52
- server: str,
53
- url: str,
54
- username: str,
55
- user_password: str,
49
+ search_string: str = "*",
50
+ glossary_guid: str = None,
51
+ glossary_name: str = None,
52
+ view_server: str = EGERIA_VIEW_SERVER,
53
+ view_url: str = EGERIA_VIEW_SERVER_URL,
54
+ user_id: str = EGERIA_USER,
55
+ user_pass: str = EGERIA_USER_PASSWORD,
56
56
  jupyter: bool = EGERIA_JUPYTER,
57
57
  width: int = EGERIA_WIDTH,
58
58
  ):
59
- """Display glossary terms in a table"""
60
- g_client = EgeriaTech(server, url, username, user_password)
59
+ """Display a table of glossary terms filtered by search_string and glossary, if specified. If no
60
+ filters then all terms are displayed. If glossary_guid or name is specified, then only terms from that
61
+ glossary are displayed.
62
+ Parameters
63
+ ----------
64
+ search_string : str, optional
65
+ The string to search for terms. Defaults to "*".
66
+ glossary_guid : str, optional
67
+ The unique identifier of the glossary. Defaults to None. If specified, then only terms from that glossary
68
+ are displayed. If both glossary_guid and glossary_name are provided then glossary_guid will take precedence.
69
+ glossary_name : str, optional
70
+ The display name of the glossary. Defaults to None. If specified, then only terms from that glossary
71
+ are displayed. If both glossary_guid and glossary_name are provided then glossary_guid will take precedence.
72
+ Note that the use of glossary display name relies on the qualified name conforming to convention. GUID is more
73
+ reliable.
74
+ view_server : str
75
+ The server where the glossary is hosted. Defaults to EGERIA_VIEW_SERVER.
76
+ view_url : str
77
+ The URL of the server where the glossary is hosted. Defaults to EGERIA_VIEW_SERVER_URL.
78
+ user_id : str
79
+ The user ID for authentication. Defaults to EGERIA_USER.
80
+ user_pass : str
81
+ The user password for authentication. Defaults to EGERIA_USER_PASSWORD.
82
+ jupyter : bool
83
+ Flag to indicate if the output should be formatted for Jupyter notebook. Defaults to EGERIA_JUPYTER.
84
+ width : int
85
+ The width of the console output. Defaults to EGERIA_WIDTH.
86
+ """
87
+ g_client = EgeriaTech(view_server, view_url, user_id, user_pass)
61
88
  token = g_client.create_egeria_bearer_token()
62
89
  if (glossary_name is not None) and (glossary_name != "*"):
63
90
  glossary_guid = g_client.__get_guid__(
@@ -78,7 +105,7 @@ def display_glossary_terms(
78
105
  caption_style="white on black",
79
106
  show_lines=True,
80
107
  box=box.ROUNDED,
81
- caption=f"View Server '{server}' @ Platform - {url}",
108
+ caption=f"View Server '{view_server}' @ Platform - {view_url}",
82
109
  expand=True,
83
110
  )
84
111
  table.add_column("Term Name")
@@ -117,7 +144,7 @@ def display_glossary_terms(
117
144
  display_name = Text(props["displayName"], style=style)
118
145
  qualified_name = props["qualifiedName"]
119
146
  term_guid = term["elementHeader"]["guid"]
120
- q_name = Text(f"{qualified_name}\n\t\t\t&\n{term_guid}", style=style)
147
+ q_name = Text(f"{qualified_name}\n\t\t&\n{term_guid}", style=style)
121
148
  abbrev = Text(props.get("abbreviation", " "), style=style)
122
149
  summary = Text(props.get("summary", " "), style=style)
123
150
  description = Text(props.get("description", " "), style=style)
@@ -356,7 +356,7 @@ def get_element_info(ctx, om_type):
356
356
  )
357
357
 
358
358
 
359
- @show.command("list-elements")
359
+ @show.command("elements")
360
360
  @click.pass_context
361
361
  @click.option("--om_type", default="Project", help="Metadata type to query")
362
362
  def list_element_info(ctx, om_type):
@@ -373,9 +373,9 @@ def list_element_info(ctx, om_type):
373
373
  )
374
374
 
375
375
 
376
- @show.command("list-processes")
376
+ @show.command("processes")
377
377
  @click.pass_context
378
- def list_element_info(ctx):
378
+ def list_process_info(ctx):
379
379
  """Display the valid metadata values for a property and type"""
380
380
  c = ctx.obj
381
381
  list_elements(
@@ -917,9 +917,9 @@ def show_todos(ctx):
917
917
  )
918
918
 
919
919
 
920
- @show.command("list-archives")
920
+ @show.command("archives")
921
921
  @click.pass_context
922
- def list_archives(ctx):
922
+ def archives(ctx):
923
923
  """Display a tree graph of information about an asset"""
924
924
  c = ctx.obj
925
925
  display_archive_list(
@@ -933,12 +933,12 @@ def list_archives(ctx):
933
933
  )
934
934
 
935
935
 
936
- @show.command("list-deployed-schemas")
936
+ @show.command("deployed-schemas")
937
937
  @click.option(
938
938
  "--search_catalog", default="*", help="What database or catalog to search"
939
939
  )
940
940
  @click.pass_context
941
- def list_deployed_schemas(search_catalog, ctx):
941
+ def deployed_schemas(search_catalog, ctx):
942
942
  """Display a tree graph of information about an asset"""
943
943
  c = ctx.obj
944
944
  list_deployed_database_schemas(
@@ -952,10 +952,10 @@ def list_deployed_schemas(search_catalog, ctx):
952
952
  )
953
953
 
954
954
 
955
- @show.command("list-catalogs")
955
+ @show.command("catalogs")
956
956
  @click.option("--search_server", default="*", help="Server to search for catalogs")
957
957
  @click.pass_context
958
- def list_catalogs(search_server, ctx):
958
+ def catalogs(search_server, ctx):
959
959
  """Display a tree graph of information about an asset"""
960
960
  c = ctx.obj
961
961
  list_deployed_catalogs(
@@ -969,9 +969,9 @@ def list_catalogs(search_server, ctx):
969
969
  )
970
970
 
971
971
 
972
- @show.command("list-databases")
972
+ @show.command("databases")
973
973
  @click.pass_context
974
- def list_databases(ctx):
974
+ def databases(ctx):
975
975
  """Display a tree graph of information about an asset"""
976
976
  c = ctx.obj
977
977
  list_deployed_databases(
@@ -979,10 +979,10 @@ def list_databases(ctx):
979
979
  )
980
980
 
981
981
 
982
- @show.command("list-glossaries")
982
+ @show.command("glossaries")
983
983
  @click.option("--search_string", default="*", help="Name to search for glossaries")
984
984
  @click.pass_context
985
- def list_glossaries(ctx, search_string):
985
+ def glossaries(ctx, search_string):
986
986
  """Display a tree graph of information about an asset"""
987
987
  c = ctx.obj
988
988
  display_glossaries(
@@ -500,7 +500,7 @@ def show_todos(ctx):
500
500
  )
501
501
 
502
502
 
503
- @show.command("list-archives")
503
+ @show.command("archives")
504
504
  @click.pass_context
505
505
  def list_archives(ctx):
506
506
  """Display a tree graph of information about an asset"""
@@ -516,10 +516,10 @@ def list_archives(ctx):
516
516
  )
517
517
 
518
518
 
519
- @show.command("list-schemas")
519
+ @show.command("deployed-schemas")
520
520
  @click.option("--catalog", default="*", help="What database or catalog to search")
521
521
  @click.pass_context
522
- def list_deployed_schemas(ctx, catalog):
522
+ def deployed_schemas(ctx, catalog):
523
523
  """Display a tree graph of information about an asset"""
524
524
  c = ctx.obj
525
525
  list_deployed_database_schemas(
@@ -533,7 +533,7 @@ def list_deployed_schemas(ctx, catalog):
533
533
  )
534
534
 
535
535
 
536
- @show.command("list-catalogs")
536
+ @show.command("catalogs")
537
537
  @click.option("--search_server", default="*", help="Server to search for catalogs")
538
538
  @click.pass_context
539
539
  def list_catalogs(ctx, search_server):
@@ -550,10 +550,10 @@ def list_catalogs(ctx, search_server):
550
550
  )
551
551
 
552
552
 
553
- @show.command("list-glossaries")
553
+ @show.command("glossaries")
554
554
  @click.option("--search_string", default="*", help="Name to search for glossaries")
555
555
  @click.pass_context
556
- def list_glossaries(ctx, search_string):
556
+ def glossaries(ctx, search_string):
557
557
  """Display a tree graph of information about an asset"""
558
558
  c = ctx.obj
559
559
  display_glossaries(
@@ -567,7 +567,7 @@ def list_glossaries(ctx, search_string):
567
567
  )
568
568
 
569
569
 
570
- @show.command("list-databases")
570
+ @show.command("databases")
571
571
  @click.pass_context
572
572
  def list_databases(ctx):
573
573
  """Display a tree graph of information about an asset"""
@@ -608,19 +608,19 @@ def survey(ctx):
608
608
  pass
609
609
 
610
610
 
611
- @survey.command("survey-uc-server")
612
- @click.pass_context
613
- @click.option(
614
- "--uc_endpoint",
615
- default="https://localhost:8080",
616
- help="Endpoint of the Unity Catalog Server to Survey",
617
- )
618
- def survey_uc_server(ctx, uc_endpoint):
619
- """Survey the Unity Catalog server at the given endpoint"""
620
- c = ctx.obj
621
- pass
622
- # restart_connector(connector, c.integration_daemon, c.integration_daemon_url,
623
- # c.userid, c.password)
611
+ # @survey.command("survey-uc-server")
612
+ # @click.pass_context
613
+ # @click.option(
614
+ # "--uc_endpoint",
615
+ # default="https://localhost:8080",
616
+ # help="Endpoint of the Unity Catalog Server to Survey",
617
+ # )
618
+ # def survey_uc_server(ctx, uc_endpoint):
619
+ # """Survey the Unity Catalog server at the given endpoint"""
620
+ # c = ctx.obj
621
+ # pass
622
+ # # restart_connector(connector, c.integration_daemon, c.integration_daemon_url,
623
+ # # c.userid, c.password)
624
624
 
625
625
 
626
626
  if __name__ == "__main__":
@@ -468,7 +468,7 @@ def valid_metadata_values(ctx, property, type_name):
468
468
  )
469
469
 
470
470
 
471
- @show.command("list-elements")
471
+ @show.command("elements")
472
472
  @click.pass_context
473
473
  @click.option("--om_type", default="Organization", help="Metadata type to query")
474
474
  def list_element_info(ctx, om_type):
@@ -485,7 +485,7 @@ def list_element_info(ctx, om_type):
485
485
  )
486
486
 
487
487
 
488
- @show.command("list-processes")
488
+ @show.command("processes")
489
489
  @click.pass_context
490
490
  def list_element_info(ctx):
491
491
  """Display the valid metadata values for a property and type"""
@@ -98,7 +98,7 @@ def start_server(ctx, server):
98
98
  p_client.close_session()
99
99
 
100
100
 
101
- @click.command("refresh-gov-eng-config")
101
+ @click.command("refresh")
102
102
  @click.pass_context
103
103
  # @click.option(
104
104
  # "--engine-host", default=EGERIA_ENGINE_HOST, help="Engine Host to refresh"