pyegeria 0.2.4__py3-none-any.whl → 5.3.0.dev3__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.
Files changed (239) hide show
  1. pyegeria/README.md +35 -0
  2. pyegeria/__init__.py +345 -14
  3. pyegeria/_client.py +376 -126
  4. pyegeria/_deprecated_gov_engine.py +451 -0
  5. pyegeria/_exceptions.py +6 -6
  6. pyegeria/_globals.py +7 -1
  7. pyegeria/_validators.py +9 -6
  8. pyegeria/asset_catalog_omvs.py +807 -0
  9. pyegeria/automated_curation_omvs.py +3760 -0
  10. pyegeria/classification_manager_omvs.py +5238 -0
  11. pyegeria/collection_manager_omvs.py +2727 -0
  12. pyegeria/commands/README.md +47 -0
  13. pyegeria/commands/__init__.py +22 -0
  14. pyegeria/commands/cat/README.md +16 -0
  15. pyegeria/commands/cat/__init__.py +1 -0
  16. pyegeria/commands/cat/exp_list_glossaries.py +156 -0
  17. pyegeria/commands/cat/get_asset_graph.py +319 -0
  18. pyegeria/commands/cat/get_collection.py +148 -0
  19. pyegeria/commands/cat/get_project_dependencies.py +168 -0
  20. pyegeria/commands/cat/get_project_structure.py +168 -0
  21. pyegeria/commands/cat/get_tech_type_elements.py +174 -0
  22. pyegeria/commands/cat/glossary_actions.py +362 -0
  23. pyegeria/commands/cat/list_assets.py +176 -0
  24. pyegeria/commands/cat/list_cert_types.py +194 -0
  25. pyegeria/commands/cat/list_collections.py +162 -0
  26. pyegeria/commands/cat/list_deployed_catalogs.py +217 -0
  27. pyegeria/commands/cat/list_deployed_database_schemas.py +251 -0
  28. pyegeria/commands/cat/list_deployed_databases.py +202 -0
  29. pyegeria/commands/cat/list_glossaries.py +150 -0
  30. pyegeria/commands/cat/list_projects.py +221 -0
  31. pyegeria/commands/cat/list_servers_deployed_imp.py +158 -0
  32. pyegeria/commands/cat/list_tech_type_elements.py +190 -0
  33. pyegeria/commands/cat/list_tech_types.py +140 -0
  34. pyegeria/commands/cat/list_terms.py +242 -0
  35. pyegeria/commands/cat/list_todos.py +189 -0
  36. pyegeria/commands/cat/list_user_ids.py +145 -0
  37. pyegeria/commands/cli/__init__.py +13 -0
  38. pyegeria/commands/cli/egeria.py +1844 -0
  39. pyegeria/commands/cli/egeria_cat.py +638 -0
  40. pyegeria/commands/cli/egeria_login_tui.py +313 -0
  41. pyegeria/commands/cli/egeria_my.py +248 -0
  42. pyegeria/commands/cli/egeria_ops.py +502 -0
  43. pyegeria/commands/cli/egeria_tech.py +618 -0
  44. pyegeria/commands/cli/ops_config.py +45 -0
  45. pyegeria/commands/cli/txt_custom_v2.tcss +19 -0
  46. pyegeria/commands/doc/README.md +145 -0
  47. pyegeria/commands/doc/Visual Command Reference/README.md +511 -0
  48. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/asset-graph 2024-11-20 at 15.56.42.png +0 -0
  49. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/assets-in-domain 2024-11-20 at 15.49.55@2x.png +0 -0
  50. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/elements-of-type 2024-11-20 at 16.01.35.png +0 -0
  51. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/tech-type-elements 2024-11-20 at 16.05.05.png +0 -0
  52. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
  53. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png +0 -0
  54. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
  55. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
  56. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
  57. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
  58. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
  59. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
  60. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
  61. pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
  62. pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
  63. pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
  64. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
  65. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
  66. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
  67. pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
  68. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
  69. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
  70. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
  71. pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
  72. pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
  73. pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
  74. pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
  75. pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
  76. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
  77. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
  78. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
  79. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
  80. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
  81. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
  82. pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
  83. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
  84. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
  85. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
  86. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
  87. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
  88. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
  89. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
  90. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
  91. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
  92. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
  93. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
  94. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
  95. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
  96. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
  97. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
  98. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
  99. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
  100. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
  101. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
  102. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
  103. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
  104. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
  105. pyegeria/commands/doc/glossary/basic-glossary-tui.md +109 -0
  106. pyegeria/commands/doc/glossary/images/delete-glossary-step1 2024-11-06 at 15.47.23@2x.png +0 -0
  107. pyegeria/commands/doc/glossary/images/delete-glossary-step2 2024-11-06 at 15.51.29@2x.png +0 -0
  108. pyegeria/commands/doc/glossary/images/delete-glossary-step3 2024-11-06 at 15.53.19@2x.png +0 -0
  109. pyegeria/commands/doc/glossary/images/delete-glossary-step4 2024-11-06 at 15.55.11@2x.png +0 -0
  110. pyegeria/commands/doc/glossary/images/out-create-glossary example 2024-11-05 at 20.38.04@2x.png +0 -0
  111. pyegeria/commands/doc/glossary/images/out-create-term 2024-11-06 at 20.48.29.png +0 -0
  112. pyegeria/commands/doc/glossary/images/out-delete-term 2024-11-07 at 03.57.25.png +0 -0
  113. pyegeria/commands/doc/glossary/images/out-display-terms-for-glossary-test 2024-11-06 at 20.51.28.png +0 -0
  114. pyegeria/commands/doc/glossary/images/out-export-example 2024-11-07 at 09.54.57.png +0 -0
  115. pyegeria/commands/doc/glossary/images/out-exported-terms 2024-11-06 at 21.06.32.png +0 -0
  116. pyegeria/commands/doc/glossary/images/out-glossary-list example 2024-11-05 at 20.41.02@2x.png +0 -0
  117. pyegeria/commands/doc/glossary/images/out-import-terms 2024-11-07 at 08.15.18.png +0 -0
  118. pyegeria/commands/doc/glossary/images/out-list-all-terms 2024-11-06 at 16.22.20@2x.png +0 -0
  119. pyegeria/commands/doc/glossary/images/out-list-terms-for-example 2024-11-06 at 16.40.12.png +0 -0
  120. pyegeria/commands/doc/glossary/images/out-list-terms-second 2024-11-06 at 16.45.13.png +0 -0
  121. pyegeria/commands/doc/glossary/images/out-pipx install pyegeria 2024-11-10 at 18.12.21.png +0 -0
  122. pyegeria/commands/doc/glossary/images/out-server-status-full 2024-11-10 at 18.25.14.png +0 -0
  123. pyegeria/commands/doc/glossary/images/out-servers-status 2024-11-10 at 18.15.42.png +0 -0
  124. pyegeria/commands/doc/glossary/images/out-upsert-import 2024-11-07 at 19.37.00.png +0 -0
  125. pyegeria/commands/doc/glossary/images/tui-2024-11-10 at 18.26.29.png +0 -0
  126. pyegeria/commands/doc/glossary/images/tui-create-glossary example 2024-11-05 at 20.34.24@2x.png +0 -0
  127. pyegeria/commands/doc/glossary/images/tui-create-term 2024-11-06 at 20.46.35.png +0 -0
  128. pyegeria/commands/doc/glossary/images/tui-delete-term 2024-11-07 at 03.51.57.png +0 -0
  129. pyegeria/commands/doc/glossary/images/tui-display-terms-for-example 2024-11-06 at 20.56.49.png +0 -0
  130. pyegeria/commands/doc/glossary/images/tui-export-example 2024-11-07 at 09.52.59.png +0 -0
  131. pyegeria/commands/doc/glossary/images/tui-hey-egeria 2024-11-10 at 18.31.01.png +0 -0
  132. pyegeria/commands/doc/glossary/images/tui-import-upsert-example 2024-11-07 at 10.08.37.png +0 -0
  133. pyegeria/commands/doc/glossary/images/tui-list-terms-second 2024-11-06 at 16.46.34.png +0 -0
  134. pyegeria/commands/doc/glossary/images/tui-load-archive.png +0 -0
  135. pyegeria/commands/doc/glossary/images/tui-server-status-full 2024-11-10 at 19.14.36.png +0 -0
  136. pyegeria/commands/doc/glossary/images/tui-show-glossaries 2024-11-07 at 20.00.05.png +0 -0
  137. pyegeria/commands/doc/glossary/images/tui-show-glossary-terms 2024-11-05 at 19.37.53@2x.png +0 -0
  138. pyegeria/commands/doc/glossary/images/tui-upsert 2024-11-07 at 11.49.04.png +0 -0
  139. pyegeria/commands/doc/glossary/images/upsert-example.om-terms 2024-11-07 at 11.44.05.png +0 -0
  140. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/README.md +346 -0
  141. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/CleanShot 2024-11-18 at 21.32.03@2x.png +0 -0
  142. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731421782704.png +0 -0
  143. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731422134920.png +0 -0
  144. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria 2024-11-12 at 20.38.43.png +0 -0
  145. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria cat 2024-11-12 at 21.41.43.png +0 -0
  146. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-list 2024-11-12 at 16.45.26.png +0 -0
  147. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-live 2024-11-12 at 16.44.12@2x.png +0 -0
  148. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status 2024-11-10 at 18.15.42@2x.png +0 -0
  149. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status-full 2024-11-10 at 18.25.14@2x.png +0 -0
  150. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/short-cut commands 2024-11-12 at 22.22.13.png +0 -0
  151. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-hey-egeria.png +0 -0
  152. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-integration-status-paging.png +0 -0
  153. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-load-archive 2024-11-10 at 19.19.09@2x.png +0 -0
  154. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status 2024-11-10 at 18.52.01@2x.png +0 -0
  155. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status-full 2024-11-10.png +0 -0
  156. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-status-paging 2024-11-12 at 16.26.14@2x.png +0 -0
  157. pyegeria/commands/my/README.md +17 -0
  158. pyegeria/commands/my/__init__.py +0 -0
  159. pyegeria/commands/my/list_my_profile.py +163 -0
  160. pyegeria/commands/my/list_my_roles.py +151 -0
  161. pyegeria/commands/my/monitor_my_todos.py +205 -0
  162. pyegeria/commands/my/monitor_open_todos.py +175 -0
  163. pyegeria/commands/my/todo_actions.py +242 -0
  164. pyegeria/commands/ops/README.md +24 -0
  165. pyegeria/commands/ops/__init__.py +22 -0
  166. pyegeria/commands/ops/gov_server_actions.py +177 -0
  167. pyegeria/commands/ops/list_archives.py +161 -0
  168. pyegeria/commands/ops/list_catalog_targets.py +203 -0
  169. pyegeria/commands/ops/load_archive.py +75 -0
  170. pyegeria/commands/ops/monitor_asset_events.py +107 -0
  171. pyegeria/commands/ops/monitor_engine_activity.py +270 -0
  172. pyegeria/commands/ops/monitor_engine_activity_c.py +286 -0
  173. pyegeria/commands/ops/monitor_gov_eng_status.py +288 -0
  174. pyegeria/commands/ops/monitor_integ_daemon_status.py +321 -0
  175. pyegeria/commands/ops/monitor_platform_status.py +188 -0
  176. pyegeria/commands/ops/monitor_server_startup.py +117 -0
  177. pyegeria/commands/ops/monitor_server_status.py +182 -0
  178. pyegeria/commands/ops/orig_monitor_server_list.py +140 -0
  179. pyegeria/commands/ops/orig_monitor_server_status.py +124 -0
  180. pyegeria/commands/ops/refresh_integration_daemon.py +83 -0
  181. pyegeria/commands/ops/restart_integration_daemon.py +82 -0
  182. pyegeria/commands/ops/table_integ_daemon_status.py +237 -0
  183. pyegeria/commands/ops/x_engine_actions.py +76 -0
  184. pyegeria/commands/tech/README.md +24 -0
  185. pyegeria/commands/tech/__init__.py +0 -0
  186. pyegeria/commands/tech/get_element_info.py +144 -0
  187. pyegeria/commands/tech/get_guid_info.py +134 -0
  188. pyegeria/commands/tech/get_tech_details.py +173 -0
  189. pyegeria/commands/tech/get_tech_type_template.py +166 -0
  190. pyegeria/commands/tech/list_anchored_elements.py +205 -0
  191. pyegeria/commands/tech/list_asset_types.py +123 -0
  192. pyegeria/commands/tech/list_elements.py +168 -0
  193. pyegeria/commands/tech/list_elements_for_classification.py +171 -0
  194. pyegeria/commands/tech/list_elements_x.py +191 -0
  195. pyegeria/commands/tech/list_gov_action_processes.py +139 -0
  196. pyegeria/commands/tech/list_registered_services.py +180 -0
  197. pyegeria/commands/tech/list_related_elements.py +207 -0
  198. pyegeria/commands/tech/list_related_specification.py +169 -0
  199. pyegeria/commands/tech/list_relationship_types.py +164 -0
  200. pyegeria/commands/tech/list_relationships.py +179 -0
  201. pyegeria/commands/tech/list_tech_templates.py +360 -0
  202. pyegeria/commands/tech/list_valid_metadata_values.py +178 -0
  203. pyegeria/commands/tech/table_tech_templates.py +238 -0
  204. pyegeria/commands/tech/x_list_related_elements.py +165 -0
  205. pyegeria/core_omag_server_config.py +550 -313
  206. pyegeria/create_tech_guid_lists.py +105 -0
  207. pyegeria/egeria_cat_client.py +78 -0
  208. pyegeria/egeria_client.py +117 -0
  209. pyegeria/egeria_config_client.py +45 -0
  210. pyegeria/egeria_my_client.py +56 -0
  211. pyegeria/egeria_tech_client.py +93 -0
  212. pyegeria/feedback_manager_omvs.py +4573 -0
  213. pyegeria/full_omag_server_config.py +1337 -0
  214. pyegeria/glossary_browser_omvs.py +2507 -0
  215. pyegeria/glossary_manager_omvs.py +3597 -0
  216. pyegeria/mermaid_utilities.py +218 -0
  217. pyegeria/metadata_explorer_omvs.py +2371 -0
  218. pyegeria/my_profile_omvs.py +1021 -0
  219. pyegeria/platform_services.py +259 -218
  220. pyegeria/project_manager_omvs.py +1854 -0
  221. pyegeria/registered_info.py +111 -108
  222. pyegeria/runtime_manager_omvs.py +2299 -0
  223. pyegeria/server_operations.py +178 -71
  224. pyegeria/template_manager_omvs.py +1414 -0
  225. pyegeria/utils.py +75 -85
  226. pyegeria/valid_metadata_omvs.py +1911 -0
  227. pyegeria/x_action_author_omvs.py +200 -0
  228. pyegeria-5.3.0.dev3.dist-info/METADATA +70 -0
  229. pyegeria-5.3.0.dev3.dist-info/RECORD +232 -0
  230. {pyegeria-0.2.4.dist-info → pyegeria-5.3.0.dev3.dist-info}/WHEEL +1 -1
  231. pyegeria-5.3.0.dev3.dist-info/entry_points.txt +81 -0
  232. pyegeria/config.toml +0 -11
  233. pyegeria/curation_omvs.py +0 -458
  234. pyegeria/exceptions.py +0 -382
  235. pyegeria/glossary_omvs.py +0 -639
  236. pyegeria/gov_engine.py +0 -573
  237. pyegeria-0.2.4.dist-info/METADATA +0 -57
  238. pyegeria-0.2.4.dist-info/RECORD +0 -19
  239. {pyegeria-0.2.4.dist-info/licenses → pyegeria-5.3.0.dev3.dist-info}/LICENSE +0 -0
@@ -0,0 +1,1414 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+ Template manager is a view service that supports managing metadata elements using templates.
6
+
7
+ """
8
+ import asyncio
9
+
10
+ from requests import Response
11
+
12
+ from pyegeria import (
13
+ Client,
14
+ max_paging_size,
15
+ body_slimmer,
16
+ InvalidParameterException,
17
+ default_time_out,
18
+ )
19
+
20
+
21
+ class TemplateManager(Client):
22
+ """Client to issue Template Manager requests.
23
+
24
+ Attributes:
25
+
26
+ view_server : str
27
+ Name of the server to use.
28
+ platform_url : str
29
+ URL of the server platform to connect to
30
+ user_id : str
31
+ The identity of the user calling the method - this sets a default optionally used by the methods
32
+ when the user doesn't pass the user_id on a method call.
33
+ user_pwd: str
34
+ The password associated with the user_id. Defaults to None
35
+ token: str, optional
36
+ Bearer token
37
+
38
+ Methods:
39
+
40
+ """
41
+
42
+ def __init__(
43
+ self,
44
+ view_server: str,
45
+ platform_url: str,
46
+ user_id: str,
47
+ user_pwd: str = None,
48
+ token: str = None,
49
+ time_out: int = default_time_out,
50
+ ):
51
+ self.view_server = view_server
52
+ self.time_out = time_out
53
+ Client.__init__(self, view_server, platform_url, user_id, user_pwd, token=token)
54
+ self.command_root = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/template-manager"
55
+
56
+ #
57
+ # Maintain the metadata elements that makes up the template
58
+ #
59
+ async def _async_create_metadata_element_in_store(self, body: dict) -> str:
60
+ """Create a new metadata element in the metadata store. The type name comes from the open metadata types.
61
+ The selected type also controls the names and types of the properties that are allowed.
62
+ This version of the method allows access to advanced features such as multiple states and
63
+ effectivity dates. Async version.
64
+
65
+ Parameters
66
+ ----------
67
+ body : dict
68
+ The definition of the element to create. A sample is below.
69
+
70
+ Returns
71
+ -------
72
+ str: If successful, the GUID of the element created; otherwise None is returned.
73
+
74
+ Raises
75
+ ------
76
+ InvalidParameterException
77
+ PropertyServerException
78
+ UserNotAuthorizedException
79
+
80
+ Notes
81
+ =====
82
+
83
+ Example of the body:
84
+
85
+ {
86
+ "class" : "NewOpenMetadataElementRequestBody",
87
+ "externalSourceGUID" : "666",
88
+ "externalSourceName" : "radio1",
89
+ "typeName" : "",
90
+ "initialStatus" : "ACTIVE",
91
+ "initialClassifications" : {},
92
+ "anchorGUID" : "",
93
+ "isOwnAnchor" : false,
94
+ "effectiveFrom" : "{{$isoTimestamp}}",
95
+ "effectiveTo": "{{$isoTimestamp}}",
96
+ "properties" : {},
97
+ "parentGUID" : "",
98
+ "parentRelationshipTypeName" : "",
99
+ "parentRelationshipProperties" : {},
100
+ "parentAtEnd1" : true,
101
+ "effectiveTime" : "{{$isoTimestamp}}"
102
+ }
103
+
104
+ """
105
+
106
+ url = f"{self.command_root}/metadata-elements"
107
+ response = await self._async_make_request("POST", url, body_slimmer(body))
108
+ guid = response.json().get("guid", None)
109
+ return guid
110
+
111
+ def create_metadata_element_in_store(self, body: dict) -> str:
112
+ """Create a new metadata element in the metadata store. The type name comes from the open metadata types.
113
+ The selected type also controls the names and types of the properties that are allowed.
114
+ This version of the method allows access to advanced features such as multiple states and
115
+ effectivity dates.
116
+
117
+ Parameters
118
+ ----------
119
+ body : dict
120
+ The definition of the element to create. A sample is below.
121
+
122
+ Returns
123
+ -------
124
+ str: If successful, the GUID of the element created; otherwise None is returned.
125
+
126
+ Raises
127
+ ------
128
+ InvalidParameterException
129
+ PropertyServerException
130
+ UserNotAuthorizedException
131
+
132
+ Notes
133
+ =====
134
+
135
+ Example of the body:
136
+
137
+ {
138
+ "class" : "NewOpenMetadataElementRequestBody",
139
+ "externalSourceGUID" : "666",
140
+ "externalSourceName" : "radio1",
141
+ "typeName" : "",
142
+ "initialStatus" : "ACTIVE",
143
+ "initialClassifications" : {},
144
+ "anchorGUID" : "",
145
+ "isOwnAnchor" : false,
146
+ "effectiveFrom" : "{{$isoTimestamp}}",
147
+ "effectiveTo": "{{$isoTimestamp}}",
148
+ "properties" : {},
149
+ "parentGUID" : "",
150
+ "parentRelationshipTypeName" : "",
151
+ "parentRelationshipProperties" : {},
152
+ "parentAtEnd1" : true,
153
+ "effectiveTime" : "{{$isoTimestamp}}"
154
+ }
155
+
156
+ """
157
+ loop = asyncio.get_event_loop()
158
+ response = loop.run_until_complete(
159
+ self._async_create_metadata_element_in_store(body)
160
+ )
161
+ return response
162
+
163
+ async def _async_create_metadata_element_from_template(self, body: dict) -> str:
164
+ """Create a new metadata element in the metadata store using a template. The type name comes from the
165
+ open metadata types. The selected type also controls the names and types of the properties that are allowed.
166
+ Async version.
167
+
168
+ Parameters
169
+ ----------
170
+ body : dict
171
+ The definition of the element to create. A sample is the notes below.
172
+
173
+ Returns
174
+ -------
175
+ None
176
+
177
+ Raises
178
+ ------
179
+ InvalidParameterException
180
+ PropertyServerException
181
+ UserNotAuthorizedException
182
+
183
+ Notes
184
+ -----
185
+ Example of the body:
186
+
187
+ {
188
+ "class" : "TemplateRequestBody",
189
+ "externalSourceGUID" : "",
190
+ "externalSourceName" : "",
191
+ "typeName" : "",
192
+ "templateGUID" : "",
193
+ "anchorGUID" : "",
194
+ "isOwnAnchor" : false,
195
+ "effectiveFrom" : "{{$isoTimestamp}}",
196
+ "effectiveTo": "{{$isoTimestamp}}",
197
+ "replacementProperties" : { },
198
+ "placeholderProperties" : {
199
+ "placeholderName1" : "placeholderValue1",
200
+ "placeholderName2" : "placeholderValue2"
201
+ },
202
+ "parentGUID" : "",
203
+ "parentRelationshipTypeName" : "",
204
+ "parentRelationshipProperties" : {},
205
+ "parentAtEnd1" : true,
206
+ "effectiveTime" : "{{$isoTimestamp}}"
207
+ }
208
+
209
+ """
210
+ url = f"{self.command_root}/metadata-elements/from-templates"
211
+
212
+ response = await self._async_make_request("POST", url, body_slimmer(body))
213
+ guid = response.json().get("guid", None)
214
+ return guid
215
+
216
+ def create_metadata_element_from_template(self, body: dict) -> str:
217
+ """Create a new metadata element in the metadata store using a template. The type name comes from the
218
+ open metadata types. The selected type also controls the names and types of the properties that are allowed.
219
+
220
+ Parameters
221
+ ----------
222
+ body : dict
223
+ dict containing the definition of the element to create. A sample is the notes below.
224
+
225
+ Returns
226
+ -------
227
+ None
228
+
229
+ Raises
230
+ ------
231
+ InvalidParameterException
232
+ PropertyServerException
233
+ UserNotAuthorizedException
234
+
235
+ Notes
236
+ -----
237
+ Example of the body:
238
+
239
+ {
240
+ "class" : "UpdatePropertiesRequestBody",
241
+ "externalSourceGUID" : "",
242
+ "externalSourceName" : "",
243
+ "forLineage" : false,
244
+ "forDuplicateProcessing" : false,
245
+ "effectiveTime" : "{{$isoTimestamp}}"
246
+ }
247
+
248
+ """
249
+ loop = asyncio.get_event_loop()
250
+ response = loop.run_until_complete(
251
+ self._async_create_metadata_element_from_template(body)
252
+ )
253
+ return response
254
+
255
+ async def _async_update_metadata_element_in_store(
256
+ self, element_guid: str, body: dict
257
+ ) -> None:
258
+ """Update the properties of a specific metadata element. The properties must match the type definition
259
+ associated with the metadata element when it was created. However, it is possible to update a few
260
+ properties, or replace all them by the value used in the replaceProperties flag.
261
+ Async version.
262
+
263
+ Parameters
264
+ ----------
265
+ element_guid : str
266
+ The identity of the metadata element to update.
267
+ body : dict
268
+ The definition of the element to create. A sample is the notes below.
269
+
270
+ Returns
271
+ -------
272
+ None
273
+
274
+ Raises
275
+ ------
276
+ InvalidParameterException
277
+ PropertyServerException
278
+ UserNotAuthorizedException
279
+
280
+ Notes
281
+ -----
282
+ Example of the body:
283
+
284
+ {
285
+ "class" : "TemplateRequestBody",
286
+ "externalSourceGUID" : "",
287
+ "externalSourceName" : "",
288
+ "typeName" : "",
289
+ "templateGUID" : "",
290
+ "anchorGUID" : "",
291
+ "isOwnAnchor" : false,
292
+ "effectiveFrom" : "{{$isoTimestamp}}",
293
+ "effectiveTo": "{{$isoTimestamp}}",
294
+ "replacementProperties" : { },
295
+ "placeholderProperties" : {
296
+ "placeholderName1" : "placeholderValue1",
297
+ "placeholderName2" : "placeholderValue2"
298
+ },
299
+ "parentGUID" : "",
300
+ "parentRelationshipTypeName" : "",
301
+ "parentRelationshipProperties" : {},
302
+ "parentAtEnd1" : true,
303
+ "effectiveTime" : "{{$isoTimestamp}}"
304
+ }
305
+
306
+ """
307
+ url = f"{self.command_root}/metadata-elements/{element_guid}/update-properties"
308
+ await self._async_make_request("POST", url, body_slimmer(body))
309
+ return
310
+
311
+ def update_metadata_element_in_store(self, element_guid: str, body: dict) -> None:
312
+ """Update the properties of a specific metadata element. The properties must match the type definition
313
+ associated with the metadata element when it was created. However, it is possible to update a few
314
+ properties, or replace all them by the value used in the replaceProperties flag.
315
+
316
+ Parameters
317
+ ----------
318
+ element_guid : str
319
+ The identity of the metadata element to update.
320
+ body : dict
321
+ The definition of the element to create. A sample is the notes below.
322
+
323
+ Returns
324
+ -------
325
+ None
326
+
327
+ Raises
328
+ ------
329
+ InvalidParameterException
330
+ PropertyServerException
331
+ UserNotAuthorizedException
332
+
333
+ Notes
334
+ -----
335
+ Example of the body:
336
+
337
+ {
338
+ "class" : "TemplateRequestBody",
339
+ "externalSourceGUID" : "",
340
+ "externalSourceName" : "",
341
+ "typeName" : "",
342
+ "templateGUID" : "",
343
+ "anchorGUID" : "",
344
+ "isOwnAnchor" : false,
345
+ "effectiveFrom" : "{{$isoTimestamp}}",
346
+ "effectiveTo": "{{$isoTimestamp}}",
347
+ "replacementProperties" : { },
348
+ "placeholderProperties" : {
349
+ "placeholderName1" : "placeholderValue1",
350
+ "placeholderName2" : "placeholderValue2"
351
+ },
352
+ "parentGUID" : "",
353
+ "parentRelationshipTypeName" : "",
354
+ "parentRelationshipProperties" : {},
355
+ "parentAtEnd1" : true,
356
+ "effectiveTime" : "{{$isoTimestamp}}"
357
+ }
358
+
359
+ """
360
+ loop = asyncio.get_event_loop()
361
+ loop.run_until_complete(
362
+ self._async_update_metadata_element_in_store(element_guid, body)
363
+ )
364
+ return
365
+
366
+ async def _async_update_metadata_element_status_in_store(
367
+ self, element_guid: str, body: dict
368
+ ) -> None:
369
+ """Update the status of a specific metadata element. The new status must match a status value that is defined
370
+ for the element's type assigned when it was created. Async version.
371
+
372
+ Parameters
373
+ ----------
374
+ element_guid : str
375
+ The identity of the metadata element to update.
376
+ body : dict
377
+ The definition of the element to create. A sample is the notes below.
378
+
379
+ Returns
380
+ -------
381
+ None
382
+
383
+ Raises
384
+ ------
385
+ InvalidParameterException
386
+ PropertyServerException
387
+ UserNotAuthorizedException
388
+
389
+ Notes
390
+ -----
391
+ Example of the body:
392
+
393
+ {
394
+ "class" : "UpdateStatusRequestBody",
395
+ "externalSourceGUID" : "",
396
+ "externalSourceName" : "",
397
+ "forLineage" : false,
398
+ "forDuplicateProcessing" : false,
399
+ "effectiveTime" : "{{$isoTimestamp}}"
400
+ }
401
+
402
+ """
403
+ url = f"{self.command_root}/metadata-elements/{element_guid}/update-status"
404
+ await self._async_make_request("POST", url, body_slimmer(body))
405
+ return
406
+
407
+ def update_metadata_element_status_in_store(
408
+ self, element_guid: str, body: dict
409
+ ) -> None:
410
+ """Update the status of a specific metadata element. The new status must match a status value that is defined
411
+ for the element's type assigned when it was created.
412
+
413
+ Parameters
414
+ ----------
415
+ element_guid : str
416
+ The identity of the metadata element to update.
417
+ body : dict
418
+ The definition of the element to create. A sample is the notes below.
419
+
420
+ Returns
421
+ -------
422
+ None
423
+
424
+ Raises
425
+ ------
426
+ InvalidParameterException
427
+ PropertyServerException
428
+ UserNotAuthorizedException
429
+
430
+ Notes
431
+ -----
432
+ Example of the body:
433
+
434
+ {
435
+ "class" : "UpdateStatusRequestBody",
436
+ "externalSourceGUID" : "",
437
+ "externalSourceName" : "",
438
+ "forLineage" : false,
439
+ "forDuplicateProcessing" : false,
440
+ "effectiveTime" : "{{$isoTimestamp}}"
441
+ }
442
+
443
+ """
444
+ loop = asyncio.get_event_loop()
445
+ loop.run_until_complete(
446
+ self._async_update_metadata_element_status_in_store(element_guid, body)
447
+ )
448
+ return
449
+
450
+ async def _async_update_metadata_element_effectivity_in_store(
451
+ self, element_guid: str, body: dict
452
+ ) -> None:
453
+ """Update the effectivity dates control the visibility of the element through specific APIs.
454
+ Async version.
455
+
456
+ Parameters
457
+ ----------
458
+ element_guid : str
459
+ The identity of the metadata element to update.
460
+ body : dict
461
+ The definition of the element to create. A sample is the notes below.
462
+
463
+ Returns
464
+ -------
465
+ None
466
+
467
+ Raises
468
+ ------
469
+ InvalidParameterException
470
+ PropertyServerException
471
+ UserNotAuthorizedException
472
+
473
+ Notes
474
+ -----
475
+ Example of the body:
476
+
477
+ {
478
+ "class" : "UpdateEffectivityDatesRequestBody",
479
+ "externalSourceGUID" : "",
480
+ "externalSourceName" : "",
481
+ "effectiveFrom" : "{{$isoTimestamp}}",
482
+ "effectiveTo": "{{$isoTimestamp}}",
483
+ "forLineage" : false,
484
+ "forDuplicateProcessing" : false,
485
+ "effectiveTime" : "{{$isoTimestamp}}"
486
+ }
487
+
488
+ """
489
+ url = f"{self.command_root}/metadata-elements/{element_guid}/update-effectivity"
490
+ await self._async_make_request("POST", url, body_slimmer(body))
491
+ return
492
+
493
+ def update_metadata_element_effectivity_in_store(
494
+ self, element_guid: str, body: dict
495
+ ) -> None:
496
+ """Update the effectivity dates control the visibility of the element through specific APIs.
497
+ Async version.
498
+
499
+ Parameters
500
+ ----------
501
+ element_guid : str
502
+ The identity of the metadata element to update.
503
+ body : dict
504
+ The definition of the element to create. A sample is the notes below.
505
+
506
+ Returns
507
+ -------
508
+ None
509
+
510
+ Raises
511
+ ------
512
+ InvalidParameterException
513
+ PropertyServerException
514
+ UserNotAuthorizedException
515
+
516
+ Notes
517
+ -----
518
+ Example of the body:
519
+
520
+ {
521
+ "class" : "UpdateEffectivityDatesRequestBody",
522
+ "externalSourceGUID" : "",
523
+ "externalSourceName" : "",
524
+ "effectiveFrom" : "{{$isoTimestamp}}",
525
+ "effectiveTo": "{{$isoTimestamp}}",
526
+ "forLineage" : false,
527
+ "forDuplicateProcessing" : false,
528
+ "effectiveTime" : "{{$isoTimestamp}}"
529
+ }
530
+
531
+ """
532
+ loop = asyncio.get_event_loop()
533
+ loop.run_until_complete(
534
+ self._async_update_metadata_element_effectivity_in_store(element_guid, body)
535
+ )
536
+ return
537
+
538
+ async def _async_delete_metadata_element_in_store(
539
+ self, element_guid: str, body: dict
540
+ ) -> None:
541
+ """Delete a metadata element.
542
+ Async version.
543
+
544
+ Parameters
545
+ ----------
546
+ element_guid : str
547
+ The identity of the metadata element to update.
548
+ body : dict
549
+ The definition of the element to create. A sample is the notes below.
550
+
551
+ Returns
552
+ -------
553
+ None
554
+
555
+ Raises
556
+ ------
557
+ InvalidParameterException
558
+ PropertyServerException
559
+ UserNotAuthorizedException
560
+
561
+ Notes
562
+ -----
563
+ Example of the body:
564
+
565
+ {
566
+ "class" : "UpdateRequestBody",
567
+ "externalSourceGUID" : "",
568
+ "externalSourceName" : "",
569
+ "forLineage" : false,
570
+ "forDuplicateProcessing" : false,
571
+ "effectiveTime" : "{{$isoTimestamp}}"
572
+ }
573
+
574
+ """
575
+ url = f"{self.command_root}/metadata-elements/{element_guid}/delete"
576
+ await self._async_make_request("POST", url, body_slimmer(body))
577
+ return
578
+
579
+ def delete_metadata_element_in_store(self, element_guid: str, body: dict) -> None:
580
+ """Delete a metadata element.
581
+
582
+ Parameters
583
+ ----------
584
+ element_guid : str
585
+ The identity of the metadata element to update.
586
+ body : dict
587
+ The definition of the element to create. A sample is the notes below.
588
+
589
+ Returns
590
+ -------
591
+ None
592
+
593
+ Raises
594
+ ------
595
+ InvalidParameterException
596
+ PropertyServerException
597
+ UserNotAuthorizedException
598
+
599
+ Notes
600
+ -----
601
+ Example of the body:
602
+
603
+ {
604
+ "class" : "UpdateRequestBody",
605
+ "externalSourceGUID" : "",
606
+ "externalSourceName" : "",
607
+ "forLineage" : false,
608
+ "forDuplicateProcessing" : false,
609
+ "effectiveTime" : "{{$isoTimestamp}}"
610
+ }
611
+
612
+ """
613
+ loop = asyncio.get_event_loop()
614
+ loop.run_until_complete(
615
+ self._async_delete_metadata_element_in_store(element_guid, body)
616
+ )
617
+ return
618
+
619
+ async def _async_archive_metadata_element_in_store(
620
+ self, element_guid: str, body: dict
621
+ ) -> None:
622
+ """Archive a specific metadata element.
623
+ Async version.
624
+
625
+ Parameters
626
+ ----------
627
+ element_guid : str
628
+ The identity of the metadata element to update.
629
+ body : dict
630
+ The definition of the element to create. A sample is the notes below.
631
+
632
+ Returns
633
+ -------
634
+ None
635
+
636
+ Raises
637
+ ------
638
+ InvalidParameterException
639
+ PropertyServerException
640
+ UserNotAuthorizedException
641
+
642
+ Notes
643
+ -----
644
+ Example of the body:
645
+
646
+ {
647
+ "class" : "ArchiveRequestBody",
648
+ "externalSourceGUID" : "",
649
+ "externalSourceName" : "",
650
+ "archiveProperties" : {
651
+ "archiveDate" : "{{$isoTimestamp}}",
652
+ "archiveProcess" : "",
653
+ "archiveProperties": {
654
+ "propertyName1" : "propertyValue1",
655
+ "propertyName2" : "propertyValue2"
656
+ }
657
+ },
658
+ "forLineage" : false,
659
+ "forDuplicateProcessing" : false,
660
+ "effectiveTime" : "{{$isoTimestamp}}"
661
+ }
662
+
663
+ """
664
+ url = f"{self.command_root}/metadata-elements/{element_guid}/archive"
665
+ await self._async_make_request("POST", url, body_slimmer(body))
666
+ return
667
+
668
+ def archive_metadata_element_in_store(self, element_guid: str, body: dict) -> None:
669
+ """Archive a specific metadata element.
670
+
671
+ Parameters
672
+ ----------
673
+ element_guid : str
674
+ The identity of the metadata element to update.
675
+ body : dict
676
+ The definition of the element to create. A sample is the notes below.
677
+
678
+ Returns
679
+ -------
680
+ None
681
+
682
+ Raises
683
+ ------
684
+ InvalidParameterException
685
+ PropertyServerException
686
+ UserNotAuthorizedException
687
+
688
+ Notes
689
+ -----
690
+ Example of the body:
691
+
692
+ "class" : "ArchiveRequestBody",
693
+ "externalSourceGUID" : "",
694
+ "externalSourceName" : "",
695
+ "archiveProperties" : {
696
+ "archiveDate" : "{{$isoTimestamp}}",
697
+ "archiveProcess" : "",
698
+ "archiveProperties": {
699
+ "propertyName1" : "propertyValue1",
700
+ "propertyName2" : "propertyValue2"
701
+ }
702
+ },
703
+ "forLineage" : false,
704
+ "forDuplicateProcessing" : false,
705
+ "effectiveTime" : "{{$isoTimestamp}}"
706
+ }
707
+
708
+ """
709
+ loop = asyncio.get_event_loop()
710
+ loop.run_until_complete(
711
+ self._async_archive_metadata_element_in_store(element_guid, body)
712
+ )
713
+ return
714
+
715
+ async def _async_classify_metadata_element_in_store(
716
+ self, element_guid: str, classification: str, body: dict
717
+ ) -> None:
718
+ """Add a new classification to the metadata element. Note that only one classification with the same name can
719
+ be attached to a metadata element. Async version.
720
+
721
+ Parameters
722
+ ----------
723
+ element_guid : str
724
+ The identity of the metadata element to update.
725
+ classification : str
726
+ The classification name to apply.
727
+ body : dict
728
+ The definition of the element to create. A sample is the notes below.
729
+
730
+ Returns
731
+ -------
732
+ None
733
+
734
+ Raises
735
+ ------
736
+ InvalidParameterException
737
+ PropertyServerException
738
+ UserNotAuthorizedException
739
+
740
+ Notes
741
+ -----
742
+ Example of the body:
743
+
744
+ {
745
+ "class" : "NewClassificationRequestBody",
746
+ "externalSourceGUID" : "",
747
+ "externalSourceName" : "",
748
+ "forLineage" : false,
749
+ "forDuplicateProcessing" : false,
750
+ "effectiveTime" : "{{$isoTimestamp}}"
751
+ }
752
+
753
+ """
754
+ url = f"{self.command_root}/metadata-elements/{element_guid}/classifications/{classification}"
755
+ await self._async_make_request("POST", url, body_slimmer(body))
756
+ return
757
+
758
+ def classify_metadata_element_in_store(
759
+ self, element_guid: str, classification: str, body: dict
760
+ ) -> None:
761
+ """Add a new classification to the metadata element. Note that only one classification with the same name can
762
+ be attached to a metadata element.
763
+
764
+ Parameters
765
+ ----------
766
+ element_guid : str
767
+ The identity of the metadata element to update.
768
+ classification : str
769
+ The classification name to apply.
770
+ body : dict
771
+ The definition of the element to create. A sample is the notes below.
772
+
773
+ Returns
774
+ -------
775
+ None
776
+
777
+ Raises
778
+ ------
779
+ InvalidParameterException
780
+ PropertyServerException
781
+ UserNotAuthorizedException
782
+
783
+ Notes
784
+ -----
785
+ Example of the body:
786
+
787
+ {
788
+ "class" : "NewClassificationRequestBody",
789
+ "externalSourceGUID" : "",
790
+ "externalSourceName" : "",
791
+ "forLineage" : false,
792
+ "forDuplicateProcessing" : false,
793
+ "effectiveTime" : "{{$isoTimestamp}}"
794
+ }
795
+
796
+ """
797
+ loop = asyncio.get_event_loop()
798
+ loop.run_until_complete(
799
+ self._async_classify_metadata_element_in_store(
800
+ element_guid, classification, body
801
+ )
802
+ )
803
+ return
804
+
805
+ async def _async_reclassify_metadata_element_in_store(
806
+ self, element_guid: str, classification: str, body: dict
807
+ ) -> None:
808
+ """Update the properties of a classification that is currently attached to a specific metadata element.
809
+ Async version.
810
+
811
+ Parameters
812
+ ----------
813
+ element_guid : str
814
+ The identity of the metadata element to update.
815
+ classification: str
816
+ The classification name to apply.
817
+ body : dict
818
+ The definition of the element to create. A sample is the notes below.
819
+
820
+ Returns
821
+ -------
822
+ None
823
+
824
+ Raises
825
+ ------
826
+ InvalidParameterException
827
+ PropertyServerException
828
+ UserNotAuthorizedException
829
+
830
+ Notes
831
+ -----
832
+ Example of the body:
833
+
834
+ {
835
+ "class" : "UpdatePropertiesRequestBody",
836
+ "externalSourceGUID" : "",
837
+ "externalSourceName" : "",
838
+ "forLineage" : false,
839
+ "forDuplicateProcessing" : false,
840
+ "effectiveTime" : "{{$isoTimestamp}}"
841
+ }
842
+
843
+ """
844
+ url = f"{self.command_root}/metadata-elements/{element_guid}/classifications/{classification}/update-properties"
845
+ await self._async_make_request("POST", url, body_slimmer(body))
846
+ return
847
+
848
+ def reclassify_metadata_element_in_store(
849
+ self, element_guid: str, classification: str, body: dict
850
+ ) -> None:
851
+ """Update the properties of a classification that is currently attached to a specific metadata element.
852
+
853
+ Parameters
854
+ ----------
855
+ element_guid : str
856
+ The identity of the metadata element to update.
857
+ classification: str
858
+ The classification name to apply.
859
+ body : dict
860
+ The definition of the element to create. A sample is the notes below.
861
+
862
+ Returns
863
+ -------
864
+ None
865
+
866
+ Raises
867
+ ------
868
+ InvalidParameterException
869
+ PropertyServerException
870
+ UserNotAuthorizedException
871
+
872
+ Notes
873
+ -----
874
+ Example of the body:
875
+
876
+ {
877
+ "class" : "UpdatePropertiesRequestBody",
878
+ "externalSourceGUID" : "",
879
+ "externalSourceName" : "",
880
+ "forLineage" : false,
881
+ "forDuplicateProcessing" : false,
882
+ "effectiveTime" : "{{$isoTimestamp}}"
883
+ }
884
+
885
+ """
886
+ loop = asyncio.get_event_loop()
887
+ loop.run_until_complete(
888
+ self._async_reclassify_metadata_element_in_store(
889
+ element_guid, classification, body
890
+ )
891
+ )
892
+ return
893
+
894
+ async def _async_update_classification_effectivity_in_store(
895
+ self, element_guid: str, classification: str, body: dict
896
+ ) -> None:
897
+ """Update the effectivity dates of a specific classification attached to a metadata element.
898
+ The effectivity dates control the visibility of the classification through specific APIs.
899
+ Async version.
900
+
901
+ Parameters
902
+ ----------
903
+ element_guid : str
904
+ The identity of the metadata element to update.
905
+ classification: str
906
+ The classification name to apply.
907
+ body : dict
908
+ The definition of the element to create. A sample is the notes below.
909
+
910
+ Returns
911
+ -------
912
+ None
913
+
914
+ Raises
915
+ ------
916
+ InvalidParameterException
917
+ PropertyServerException
918
+ UserNotAuthorizedException
919
+
920
+ Notes
921
+ -----
922
+ Example of the body:
923
+
924
+ {
925
+ "class" : "UpdateEffectivityDatesRequestBody",
926
+ "externalSourceGUID" : "",
927
+ "externalSourceName" : "",
928
+ "effectiveFrom" : "{{$isoTimestamp}}",
929
+ "effectiveTo": "{{$isoTimestamp}}",
930
+ "forLineage" : false,
931
+ "forDuplicateProcessing" : false,
932
+ "effectiveTime" : "{{$isoTimestamp}}"
933
+ }
934
+ """
935
+ url = f"{self.command_root}/metadata-elements/{element_guid}/classifications/{classification}/update-effectivity"
936
+ await self._async_make_request("POST", url, body_slimmer(body))
937
+ return
938
+
939
+ def update_classification_effectivity_in_store(
940
+ self, element_guid: str, classification: str, body: dict
941
+ ) -> None:
942
+ """Update the effectivity dates of a specific classification attached to a metadata element.
943
+ The effectivity dates control the visibility of the classification through specific APIs.
944
+
945
+
946
+ Parameters
947
+ ----------
948
+ element_guid : str
949
+ The identity of the metadata element to update.
950
+ classification: str
951
+ The classification name to apply.
952
+ body : dict
953
+ The definition of the element to create. A sample is the notes below.
954
+
955
+ Returns
956
+ -------
957
+ None
958
+
959
+ Raises
960
+ ------
961
+ InvalidParameterException
962
+ PropertyServerException
963
+ UserNotAuthorizedException
964
+
965
+ Notes
966
+ -----
967
+ Example of the body:
968
+
969
+ {
970
+ "class" : "UpdateEffectivityDatesRequestBody",
971
+ "externalSourceGUID" : "",
972
+ "externalSourceName" : "",
973
+ "effectiveFrom" : "{{$isoTimestamp}}",
974
+ "effectiveTo": "{{$isoTimestamp}}",
975
+ "forLineage" : false,
976
+ "forDuplicateProcessing" : false,
977
+ "effectiveTime" : "{{$isoTimestamp}}"
978
+ }
979
+ """
980
+ loop = asyncio.get_event_loop()
981
+ loop.run_until_complete(
982
+ self._async_update_classification_effectivity_in_store(
983
+ element_guid, classification, body
984
+ )
985
+ )
986
+ return
987
+
988
+ async def _async_declassify_metadata_element_in_store(
989
+ self, element_guid: str, classification: str, body: dict
990
+ ) -> None:
991
+ """Remove the named classification from a specific metadata element. Async version.
992
+
993
+ Parameters
994
+ ----------
995
+ element_guid : str
996
+ The identity of the metadata element to update.
997
+ classification: str
998
+ The classification name to apply.
999
+ body : dict
1000
+ The definition of the element to create. A sample is the notes below.
1001
+
1002
+ Returns
1003
+ -------
1004
+ None
1005
+
1006
+ Raises
1007
+ ------
1008
+ InvalidParameterException
1009
+ PropertyServerException
1010
+ UserNotAuthorizedException
1011
+
1012
+ Notes
1013
+ -----
1014
+ Example of the body:
1015
+
1016
+ {
1017
+ "class" : "UpdateRequestBody",
1018
+ "externalSourceGUID" : "",
1019
+ "externalSourceName" : "",
1020
+ "forLineage" : false,
1021
+ "forDuplicateProcessing" : false,
1022
+ "effectiveTime" : "{{$isoTimestamp}}"
1023
+ }
1024
+ """
1025
+ url = f"{self.command_root}/metadata-elements/{element_guid}/classifications/{classification}/delete"
1026
+ await self._async_make_request("POST", url, body_slimmer(body))
1027
+ return
1028
+
1029
+ def declassify_metadata_element_in_store(
1030
+ self, element_guid: str, classification: str, body: dict
1031
+ ) -> None:
1032
+ """Remove the named classification from a specific metadata element.
1033
+
1034
+ Parameters
1035
+ ----------
1036
+ element_guid : str
1037
+ The identity of the metadata element to update.
1038
+ classification: str
1039
+ The classification name to apply.
1040
+ body : dict
1041
+ The definition of the element to create. A sample is the notes below.
1042
+
1043
+ Returns
1044
+ -------
1045
+ None
1046
+
1047
+ Raises
1048
+ ------
1049
+ InvalidParameterException
1050
+ PropertyServerException
1051
+ UserNotAuthorizedException
1052
+
1053
+ Notes
1054
+ -----
1055
+ Example of the body:
1056
+
1057
+ {
1058
+ "class" : "UpdateRequestBody",
1059
+ "externalSourceGUID" : "",
1060
+ "externalSourceName" : "",
1061
+ "forLineage" : false,
1062
+ "forDuplicateProcessing" : false,
1063
+ "effectiveTime" : "{{$isoTimestamp}}"
1064
+ }
1065
+ """
1066
+ loop = asyncio.get_event_loop()
1067
+ loop.run_until_complete(
1068
+ self._async_declassify_metadata_element_in_store(
1069
+ element_guid, classification, body
1070
+ )
1071
+ )
1072
+ return
1073
+
1074
+ async def _async_create_related_elements_in_store(self, body: dict) -> str:
1075
+ """Create a relationship between two metadata elements. It is important to put the right element at each end
1076
+ of the relationship according to the type definition since this will affect how the relationship is
1077
+ interpreted. Async version.
1078
+
1079
+ Parameters
1080
+ ----------
1081
+ body : dict
1082
+ The definition of the element to create. A sample is the notes below.
1083
+
1084
+ Returns
1085
+ -------
1086
+ str containing the relationship GUID.
1087
+
1088
+ Raises
1089
+ ------
1090
+ InvalidParameterException
1091
+ PropertyServerException
1092
+ UserNotAuthorizedException
1093
+
1094
+ Notes
1095
+ -----
1096
+ Example of the body:
1097
+
1098
+ {
1099
+ "class" : "NewRelatedElementsRequestBody",
1100
+ "externalSourceGUID" : "",
1101
+ "externalSourceName" : "",
1102
+ "forLineage" : false,
1103
+ "forDuplicateProcessing" : false,
1104
+ "effectiveTime" : "{{$isoTimestamp}}"
1105
+ "typeName": "string",
1106
+ "metadataElement1GUID": "string",
1107
+ "metadataElement2GUID": "string",
1108
+ }
1109
+ """
1110
+ url = f"{self.command_root}/related-elements"
1111
+ response = await self._async_make_request("POST", url, body_slimmer(body))
1112
+ guid = response.json().get("guid", None)
1113
+ return guid
1114
+
1115
+ def create_related_elements_in_store(self, body: dict) -> str:
1116
+ """Create a relationship between two metadata elements. It is important to put the right element at each end
1117
+ of the relationship according to the type definition since this will affect how the relationship is
1118
+ interpreted.
1119
+
1120
+ Parameters
1121
+ ----------
1122
+ body : dict
1123
+ The definition of the element to create. A sample is the notes below.
1124
+
1125
+ Returns
1126
+ -------
1127
+ str containing the relationship GUID.
1128
+
1129
+ Raises
1130
+ ------
1131
+ InvalidParameterException
1132
+ PropertyServerException
1133
+ UserNotAuthorizedException
1134
+
1135
+ Notes
1136
+ -----
1137
+ Example of the body:
1138
+
1139
+ {
1140
+ "class" : "NewRelatedElementsRequestBody",
1141
+ "externalSourceGUID" : "",
1142
+ "externalSourceName" : "",
1143
+ "forLineage" : false,
1144
+ "forDuplicateProcessing" : false,
1145
+ "effectiveTime" : "{{$isoTimestamp}}"
1146
+ "typeName": "string",
1147
+ "metadataElement1GUID": "string",
1148
+ "metadataElement2GUID": "string",
1149
+ }
1150
+ """
1151
+ loop = asyncio.get_event_loop()
1152
+ response = loop.run_until_complete(
1153
+ self._async_create_related_elements_in_store(body)
1154
+ )
1155
+ return response
1156
+
1157
+ async def _async_update_related_elements_in_store(
1158
+ self, relationship_guid: str, body: dict
1159
+ ) -> None:
1160
+ """Update the properties associated with a relationship. Async version.
1161
+
1162
+ Parameters
1163
+ ----------
1164
+ relationship_guid : str
1165
+ The identity of the relationship to update.
1166
+ body : dict
1167
+ The definition of the element to create. A sample is the notes below.
1168
+
1169
+ Returns
1170
+ -------
1171
+ None
1172
+
1173
+ Raises
1174
+ ------
1175
+ InvalidParameterException
1176
+ PropertyServerException
1177
+ UserNotAuthorizedException
1178
+
1179
+ Notes
1180
+ -----
1181
+ Example of the body:
1182
+
1183
+ {
1184
+ "class" : "UpdatePropertiesRequestBody",
1185
+ "externalSourceGUID" : "",
1186
+ "externalSourceName" : "",
1187
+ "forLineage" : false,
1188
+ "forDuplicateProcessing" : false,
1189
+ "typeName": "string",
1190
+ "metadataElement1GUID": "string",
1191
+ "metadataElement2GUID": "string",
1192
+ "effectiveTime" : "{{$isoTimestamp}}"
1193
+ }
1194
+ """
1195
+ url = f"{self.command_root}/related-elements/{relationship_guid}/update-properties"
1196
+ await self._async_make_request("POST", url, body_slimmer(body))
1197
+ return
1198
+
1199
+ def update_related_elements_in_store(
1200
+ self, relationship_guid: str, body: dict
1201
+ ) -> None:
1202
+ """Update the properties associated with a relationship. Async version.
1203
+
1204
+ Parameters
1205
+ ----------
1206
+ relationship_guid : str
1207
+ The identity of the relationship to update.
1208
+ body : dict
1209
+ The definition of the element to create. A sample is the notes below.
1210
+
1211
+ Returns
1212
+ -------
1213
+ None
1214
+
1215
+ Raises
1216
+ ------
1217
+ InvalidParameterException
1218
+ PropertyServerException
1219
+ UserNotAuthorizedException
1220
+
1221
+ Notes
1222
+ -----
1223
+ Example of the body:
1224
+
1225
+ {
1226
+ "class" : "UpdatePropertiesRequestBody",
1227
+ "externalSourceGUID" : "",
1228
+ "externalSourceName" : "",
1229
+ "forLineage" : false,
1230
+ "forDuplicateProcessing" : false,
1231
+ "typeName": "string",
1232
+ "metadataElement1GUID": "string",
1233
+ "metadataElement2GUID": "string",
1234
+ "effectiveTime" : "{{$isoTimestamp}}"
1235
+ }
1236
+ """
1237
+ loop = asyncio.get_event_loop()
1238
+ loop.run_until_complete(
1239
+ self._async_update_related_elements_in_store(relationship_guid, body)
1240
+ )
1241
+ return
1242
+
1243
+ async def _async_update_related_elements_effectivity_in_store(
1244
+ self, relationship_guid: str, body: dict
1245
+ ) -> None:
1246
+ """Update the effectivity dates of a specific relationship between metadata elements.
1247
+ The effectivity dates control the visibility of the classification through specific APIs.
1248
+ Async version.
1249
+
1250
+ Parameters
1251
+ ----------
1252
+ relationship_guid : str
1253
+ The identity of the relationship to update.
1254
+ body : dict
1255
+ The definition of the element to create. A sample is the notes below.
1256
+
1257
+ Returns
1258
+ -------
1259
+ None
1260
+
1261
+ Raises
1262
+ ------
1263
+ InvalidParameterException
1264
+ PropertyServerException
1265
+ UserNotAuthorizedException
1266
+
1267
+ Notes
1268
+ -----
1269
+ Example of the body:
1270
+
1271
+ {
1272
+ "class" : "UpdateEffectivityDatesRequestBody",
1273
+ "externalSourceGUID" : "",
1274
+ "externalSourceName" : "",
1275
+ "effectiveFrom" : "{{$isoTimestamp}}",
1276
+ "effectiveTo": "{{$isoTimestamp}}",
1277
+ "forLineage" : false,
1278
+ "forDuplicateProcessing" : false,
1279
+ "effectiveTime" : "{{$isoTimestamp}}"
1280
+ }
1281
+ """
1282
+ url = f"{self.command_root}/metadata-elements/related-elements/{relationship_guid}/update-effectivity"
1283
+ await self._async_make_request("POST", url, body_slimmer(body))
1284
+ return
1285
+
1286
+ def update_related_elements_effectivity_in_store(
1287
+ self, relationship_guid: str, body: dict
1288
+ ) -> None:
1289
+ """Update the effectivity dates of a specific relationship between metadata elements.
1290
+ The effectivity dates control the visibility of the classification through specific APIs.
1291
+
1292
+ Parameters
1293
+ ----------
1294
+ relationship_guid : str
1295
+ The identity of the relationship to update.
1296
+ body : dict
1297
+ The definition of the element to create. A sample is the notes below.
1298
+
1299
+ Returns
1300
+ -------
1301
+ None
1302
+
1303
+ Raises
1304
+ ------
1305
+ InvalidParameterException
1306
+ PropertyServerException
1307
+ UserNotAuthorizedException
1308
+
1309
+ Notes
1310
+ -----
1311
+ Example of the body:
1312
+
1313
+ {
1314
+ "class" : "UpdateEffectivityDatesRequestBody",
1315
+ "externalSourceGUID" : "",
1316
+ "externalSourceName" : "",
1317
+ "effectiveFrom" : "{{$isoTimestamp}}",
1318
+ "effectiveTo": "{{$isoTimestamp}}",
1319
+ "forLineage" : false,
1320
+ "forDuplicateProcessing" : false,
1321
+ "effectiveTime" : "{{$isoTimestamp}}"
1322
+ }
1323
+ """
1324
+ loop = asyncio.get_event_loop()
1325
+ loop.run_until_complete(
1326
+ self._async_update_related_elements_effectivity_in_store(
1327
+ relationship_guid, body
1328
+ )
1329
+ )
1330
+ return
1331
+
1332
+ async def _async_delete_related_elements_in_store(
1333
+ self, relationship_guid: str, body: dict
1334
+ ) -> None:
1335
+ """Delete a relationship between two metadata elements. Async version.
1336
+
1337
+ Parameters
1338
+ ----------
1339
+ relationship_guid : str
1340
+ The identity of the relationship to delete.
1341
+ body : dict
1342
+ The definition of the element to create. A sample is the notes below.
1343
+
1344
+ Returns
1345
+ -------
1346
+ None
1347
+
1348
+ Raises
1349
+ ------
1350
+ InvalidParameterException
1351
+ PropertyServerException
1352
+ UserNotAuthorizedException
1353
+
1354
+ Notes
1355
+ -----
1356
+ Example of the body:
1357
+
1358
+ {
1359
+ "class" : "UpdateRequestBody",
1360
+ "externalSourceGUID" : "",
1361
+ "externalSourceName" : "",
1362
+ "forLineage" : false,
1363
+ "forDuplicateProcessing" : false,
1364
+ "effectiveTime" : "{{$isoTimestamp}}"
1365
+ }
1366
+ """
1367
+ url = f"{self.command_root}/metadata-elements/related-elements/{relationship_guid}/delete"
1368
+ await self._async_make_request("POST", url, body_slimmer(body))
1369
+ return
1370
+
1371
+ def delete_related_elements_in_store(
1372
+ self, relationship_guid: str, body: dict
1373
+ ) -> None:
1374
+ """Delete a relationship between two metadata elements.
1375
+
1376
+ Parameters
1377
+ ----------
1378
+ relationship_guid : str
1379
+ The identity of the relationship to delete.
1380
+ body : dict
1381
+ The definition of the element to create. A sample is the notes below.
1382
+
1383
+ Returns
1384
+ -------
1385
+ None
1386
+
1387
+ Raises
1388
+ ------
1389
+ InvalidParameterException
1390
+ PropertyServerException
1391
+ UserNotAuthorizedException
1392
+
1393
+ Notes
1394
+ -----
1395
+ Example of the body:
1396
+
1397
+ {
1398
+ "class" : "UpdateRequestBody",
1399
+ "externalSourceGUID" : "",
1400
+ "externalSourceName" : "",
1401
+ "forLineage" : false,
1402
+ "forDuplicateProcessing" : false,
1403
+ "effectiveTime" : "{{$isoTimestamp}}"
1404
+ }
1405
+ """
1406
+ loop = asyncio.get_event_loop()
1407
+ loop.run_until_complete(
1408
+ self._async_delete_related_elements_in_store(relationship_guid, body)
1409
+ )
1410
+ return
1411
+
1412
+
1413
+ if __name__ == "__main__":
1414
+ print("Main-Template Manager")