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,1911 @@
1
+ """
2
+ PDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+ Maintain and explore the contents of nested collections.
6
+
7
+ """
8
+ import asyncio
9
+
10
+ # import json
11
+ from pyegeria._client import Client
12
+ from pyegeria._globals import max_paging_size
13
+
14
+
15
+ class ValidMetadataManager(Client):
16
+ """The Valid Metadata OMVS provides APIs for retrieving and updating lists of valid metadata values.
17
+ For more details see: https://egeria-project.org/guides/planning/valid-values/overview/
18
+
19
+ Attributes:
20
+
21
+ view_server: str
22
+ The name of the View Server to connect to.
23
+ platform_url : str
24
+ URL of the server platform to connect to
25
+ user_id : str
26
+ The identity of the user calling the method - this sets a default optionally used by the methods
27
+ when the user doesn't pass the user_id on a method call.
28
+ user_pwd: str
29
+ The password associated with the user_id. Defaults to None
30
+
31
+ """
32
+
33
+ def __init__(
34
+ self,
35
+ view_server: str,
36
+ platform_url: str,
37
+ user_id: str = None,
38
+ user_pwd: str = None,
39
+ token: str = None,
40
+ ):
41
+ self.view_server = view_server
42
+ self.platform_url = platform_url
43
+ self.user_id = user_id
44
+ self.user_pwd = user_pwd
45
+
46
+ self.valid_m_command_base: str = f"/api/open-metadata/valid-metadata"
47
+ self.page_size = max_paging_size
48
+ Client.__init__(self, view_server, platform_url, user_id, user_pwd, token=token)
49
+
50
+ async def _async_setup_valid_metadata_value(
51
+ self, property_name: str, type_name: str, body: dict
52
+ ):
53
+ """Create or update the valid value for a particular open metadata property name. If the typeName is null,
54
+ this valid value applies to properties of this name from all types. The valid value is stored in the
55
+ preferredValue property. If a valid value is already set up for this property (with overlapping effective dates)
56
+ then the valid value is updated. Async Version.
57
+
58
+ Parameters
59
+ ----------
60
+ property_name : str
61
+ The name of the property for which the valid metadata value is being set up.
62
+ type_name : str
63
+ The name of the type for the valid metadata value.
64
+ body : dict
65
+ The body of the request containing the details of the valid metadata value.
66
+
67
+
68
+ Returns
69
+ -------
70
+ No value is returned.
71
+
72
+ Raises
73
+ ------
74
+ InvalidParameterException
75
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
76
+ PropertyServerException
77
+ Raised by the server when an issue arises in processing a valid request
78
+ NotAuthorizedException
79
+ The principle specified by the user_id does not have authorization for the requested action
80
+
81
+
82
+ Notes
83
+ -----
84
+
85
+ Payload structure similar to:
86
+ {
87
+ "displayName": "",
88
+ "description": "",
89
+ "preferredValue": "",
90
+ "dataType": "",
91
+ "isCaseSensitive": false,
92
+ "isDeprecated" : false,
93
+ "effectiveFrom" : "2024-09-30T20:00:00.000Z",
94
+ "effectiveTo" : "2025-09-30T20:00:00.000Z",
95
+ }
96
+ """
97
+
98
+ url = (
99
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/setup-value/{property_name}?"
100
+ f"typeName={type_name}"
101
+ )
102
+
103
+ await self._async_make_request("POST", url, body)
104
+ return
105
+
106
+ def setup_valid_metadata_value(
107
+ self, property_name: str, type_name: str, body: dict
108
+ ):
109
+ """Create or update the valid value for a particular open metadata property name. If the typeName is null,
110
+ this valid value applies to properties of this name from all types. The valid value is stored in the
111
+ preferredValue property. If a valid value is already set up for this property (with overlapping effective dates)
112
+ then the valid value is updated.
113
+
114
+ Parameters
115
+ ----------
116
+ property_name : str
117
+ The name of the property for which the valid metadata value is being set up.
118
+ type_name : str
119
+ The name of the type for the valid metadata value.
120
+ body : dict
121
+ The body of the request containing the details of the valid metadata value.
122
+
123
+
124
+ Returns
125
+ -------
126
+ None - this method does not return a value.
127
+
128
+ Raises
129
+ ------
130
+ InvalidParameterException
131
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
132
+ PropertyServerException
133
+ Raised by the server when an issue arises in processing a valid request
134
+ NotAuthorizedException
135
+ The principle specified by the user_id does not have authorization for the requested action
136
+
137
+ Notes
138
+ -----
139
+
140
+ Payload structure similar to:
141
+ {
142
+ "displayName": "",
143
+ "description": "",
144
+ "preferredValue": "",
145
+ "dataType": "",
146
+ "isCaseSensitive": false,
147
+ "isDeprecated" : false,
148
+ "additionalProperties": {
149
+ "colour": "purple"
150
+ }
151
+ }
152
+ """
153
+ loop = asyncio.get_event_loop()
154
+ loop.run_until_complete(
155
+ self._async_setup_valid_metadata_value(property_name, type_name, body)
156
+ )
157
+ return
158
+
159
+ async def _async_setup_valid_metadata_map_name(
160
+ self, property_name: str, type_name: str, body: dict
161
+ ):
162
+ """Create or update the valid value for a name that can be stored in a particular open metadata property name.
163
+ This property is of type map from name to string. The mapName is stored in the preferredValue property of
164
+ validMetadataValue. If the typeName is null, this valid value applies to properties of this name from any
165
+ open metadata type. If a valid value is already set up for this property (with overlapping effective dates)
166
+ then the valid value is updated. Async Version.
167
+
168
+ Parameters
169
+ ----------
170
+ property_name : str
171
+ The name of the property to setup metadata map.
172
+ type_name : str
173
+ The type name of the property.
174
+ body : dict
175
+ The metadata map setup data.
176
+
177
+
178
+ Returns
179
+ -------
180
+ None
181
+ This method does not return any value.
182
+
183
+ Raises
184
+ ------
185
+ InvalidParameterException
186
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
187
+ PropertyServerException
188
+ Raised by the server when an issue arises in processing a valid request
189
+ NotAuthorizedException
190
+ The principle specified by the user_id does not have authorization for the requested action
191
+
192
+
193
+ Notes
194
+ -----
195
+
196
+ Body strycture similar to:
197
+
198
+ {
199
+ "displayName": "",
200
+ "description": "",
201
+ "preferredValue": "put mapName value here",
202
+ "dataType": "",
203
+ "isCaseSensitive": false,
204
+ "isDeprecated" : false,
205
+ "effectiveFrom" : "2024-09-30T20:00:00.000Z",
206
+ "effectiveTo" : "2025-09-30T20:00:00.000Z"
207
+ }
208
+
209
+ """
210
+
211
+ url = (
212
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/setup-map-name/{property_name}?"
213
+ f"typeName={type_name}"
214
+ )
215
+
216
+ await self._async_make_request("POST", url, body)
217
+ return
218
+
219
+ def setup_valid_metadata_map_name(
220
+ self, property_name: str, type_name: str, body: dict
221
+ ):
222
+ """Create or update the valid value for a name that can be stored in a particular open metadata property name.
223
+ This property is of type map from name to string. The mapName is stored in the preferredValue property of
224
+ validMetadataValue. If the typeName is null, this valid value applies to properties of this name from any
225
+ open metadata type. If a valid value is already set up for this property (with overlapping effective dates)
226
+ then the valid value is updated.
227
+
228
+ Parameters
229
+ ----------
230
+ property_name : str
231
+ The name of the property to setup metadata map.
232
+ type_name : str
233
+ The type name of the property.
234
+ body : dict
235
+ The metadata map setup data.
236
+
237
+
238
+ Returns
239
+ -------
240
+ None
241
+ This method does not return any value.
242
+
243
+ Raises
244
+ ------
245
+ InvalidParameterException
246
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
247
+ PropertyServerException
248
+ Raised by the server when an issue arises in processing a valid request
249
+ NotAuthorizedException
250
+ The principle specified by the user_id does not have authorization for the requested action
251
+
252
+
253
+ Notes
254
+ -----
255
+
256
+ Body strycture similar to:
257
+
258
+ {
259
+ "displayName": "",
260
+ "description": "",
261
+ "preferredValue": "put mapName value here",
262
+ "dataType": "",
263
+ "isCaseSensitive": false,
264
+ "isDeprecated" : false
265
+ }
266
+
267
+ """
268
+
269
+ loop = asyncio.get_event_loop()
270
+ loop.run_until_complete(
271
+ self._async_setup_valid_metadata_map_name(property_name, type_name, body)
272
+ )
273
+ return
274
+
275
+ async def _async_setup_valid_metadata_map_value(
276
+ self, property_name: str, type_name: str, map_name: str, body: dict
277
+ ) -> None:
278
+ """Create or update the valid value for a name that can be stored in a particular open metadata property name.
279
+ This property is of type map from name to string.
280
+ The valid value is stored in the preferredValue property of validMetadataValue.
281
+ If the typeName is null, this valid value applies to properties of this name from any open metadata type.
282
+ If a valid value is already set up for this property (with overlapping effective dates) then the valid value
283
+ is updated. Async version.
284
+
285
+ Parameters
286
+ ----------
287
+ property_name : str
288
+ The name of the property to setup metadata map.
289
+ type_name : str
290
+ The type name of the property.
291
+ map_name: str
292
+ The name of a map we associate a value with.
293
+ body : dict
294
+ The metadata map setup data.
295
+
296
+ Returns
297
+ -------
298
+ None
299
+ This method does not return any value.
300
+
301
+ Raises
302
+ ------
303
+ InvalidParameterException
304
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
305
+ PropertyServerException
306
+ Raised by the server when an issue arises in processing a valid request
307
+ NotAuthorizedException
308
+ The principle specified by the user_id does not have authorization for the requested action
309
+
310
+
311
+ Notes
312
+ -----
313
+
314
+ Body strycture similar to:
315
+
316
+ {
317
+ "displayName": "",
318
+ "description": "",
319
+ "preferredValue": "put mapName value here",
320
+ "dataType": "",
321
+ "isCaseSensitive": false,
322
+ "effectiveFrom" : "2024-09-30T20:00:00.000Z",
323
+ "effectiveTo" : "2025-09-30T20:00:00.000Z"
324
+ }
325
+ """
326
+ url = (
327
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/setup-map-value/"
328
+ f"{property_name}/{map_name}?typeName={type_name}"
329
+ )
330
+
331
+ await self._async_make_request("POST", url, body)
332
+ return
333
+
334
+ def setup_valid_metadata_map_value(
335
+ self, property_name: str, type_name: str, map_name: str, body: dict
336
+ ) -> None:
337
+ """Create or update the valid value for a name that can be stored in a particular open metadata property name.
338
+ This property is of type map from name to string.
339
+ The valid value is stored in the preferredValue property of validMetadataValue.
340
+ If the typeName is null, this valid value applies to properties of this name from any open metadata type.
341
+ If a valid value is already set up for this property (with overlapping effective dates) then the valid value
342
+ is updated.
343
+
344
+ Parameters
345
+ ----------
346
+ property_name : str
347
+ The name of the property to setup metadata map.
348
+ type_name : str
349
+ The type name of the property.
350
+ map_name: str
351
+ The name of a map we associate a value with.
352
+ body : dict
353
+ The metadata map setup data.
354
+
355
+
356
+ Returns
357
+ -------
358
+ None
359
+ This method does not return a value.
360
+
361
+ Raises
362
+ ------
363
+ InvalidParameterException
364
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
365
+ PropertyServerException
366
+ Raised by the server when an issue arises in processing a valid request
367
+ NotAuthorizedException
368
+ The principle specified by the user_id does not have authorization for the requested action
369
+
370
+
371
+ Notes
372
+ -----
373
+
374
+ Body structure similar to:
375
+
376
+ {
377
+ "displayName": "",
378
+ "description": "",
379
+ "preferredValue": "put mapName value here",
380
+ "dataType": "",
381
+ "isCaseSensitive": false,
382
+ }
383
+ """
384
+ loop = asyncio.get_event_loop()
385
+ loop.run_until_complete(
386
+ self._async_setup_valid_metadata_map_value(
387
+ property_name, type_name, map_name, body
388
+ )
389
+ )
390
+ return
391
+
392
+ async def _async_clear_valid_metadata_value(
393
+ self, property_name: str, type_name: str, preferred_value: str
394
+ ) -> None:
395
+ """Remove a valid value for a property. Async version.
396
+
397
+ Parameters
398
+ ----------
399
+ property_name : str
400
+ The name of the property to setup metadata map.
401
+ type_name : str
402
+ The type name of the property.
403
+ preferred_value: str
404
+ The reference valye to remove.
405
+
406
+ Returns
407
+ -------
408
+ None - This method does not return a value.
409
+
410
+ Raises
411
+ ------
412
+ InvalidParameterException
413
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
414
+ PropertyServerException
415
+ Raised by the server when an issue arises in processing a valid request
416
+ NotAuthorizedException
417
+ The principle specified by the user_id does not have authorization for the requested action
418
+
419
+
420
+ """
421
+ url = (
422
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/clear-value/"
423
+ f"{property_name}?typeName={type_name}&preferredValue={preferred_value}"
424
+ )
425
+
426
+ await self._async_make_request("POST", url)
427
+ return
428
+
429
+ def clear_valid_metadata_value(
430
+ self, property_name: str, type_name: str, preferred_value: str
431
+ ) -> None:
432
+ """Remove a valid value for a property.
433
+
434
+ Parameters
435
+ ----------
436
+ property_name : str
437
+ The name of the property to setup metadata map.
438
+ type_name : str
439
+ The type name of the property.
440
+ preferred_value: str
441
+ The reference valye to remove.
442
+
443
+ Returns
444
+ -------
445
+ None - This method does not return a value.
446
+
447
+ Raises
448
+ ------
449
+ InvalidParameterException
450
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
451
+ PropertyServerException
452
+ Raised by the server when an issue arises in processing a valid request
453
+ NotAuthorizedException
454
+ The principle specified by the user_id does not have authorization for the requested action
455
+
456
+
457
+ """
458
+ loop = asyncio.get_event_loop()
459
+ loop.run_until_complete(
460
+ self._async_clear_valid_metadata_value(
461
+ property_name, type_name, preferred_value
462
+ )
463
+ )
464
+ return
465
+
466
+ async def _async_clear_valid_metadata_map_name(
467
+ self,
468
+ property_name: str,
469
+ type_name: str,
470
+ map_name: str,
471
+ ):
472
+ """Remove a valid map name value for a property. The match is done on MapName name. Async version.
473
+
474
+ Parameters
475
+ ----------
476
+ property_name : str
477
+ The name of the property to setup metadata map.
478
+ type_name : str
479
+ The type name of the property.
480
+ map_name: str
481
+ The name of a map we associate a value with.
482
+
483
+ Returns
484
+ -------
485
+ None - This method does not return a value.
486
+
487
+ Raises
488
+ ------
489
+ InvalidParameterException
490
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
491
+ PropertyServerException
492
+ Raised by the server when an issue arises in processing a valid request
493
+ NotAuthorizedException
494
+ The principle specified by the user_id does not have authorization for the requested action
495
+
496
+ """
497
+
498
+ url = (
499
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/clear-map-name/"
500
+ f"{property_name}?typeName={type_name}&mapName={map_name}"
501
+ )
502
+
503
+ await self._async_make_request("POST", url)
504
+ return
505
+
506
+ def clear_valid_metadata_map_name(
507
+ self,
508
+ property_name: str,
509
+ type_name: str,
510
+ map_name: str,
511
+ ):
512
+ """Remove a valid map name value for a property. The match is done on MapName name.
513
+
514
+ Parameters
515
+ ----------
516
+ property_name : str
517
+ The name of the property to setup metadata map.
518
+ type_name : str
519
+ The type name of the property.
520
+ map_name: str
521
+ The name of a map we associate a value with.
522
+
523
+ Returns
524
+ -------
525
+ None - This method does not return a value.
526
+
527
+ Raises
528
+ ------
529
+ InvalidParameterException
530
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
531
+ PropertyServerException
532
+ Raised by the server when an issue arises in processing a valid request
533
+ NotAuthorizedException
534
+ The principle specified by the user_id does not have authorization for the requested action
535
+
536
+ """
537
+
538
+ loop = asyncio.get_event_loop()
539
+ loop.run_until_complete(
540
+ self._async_clear_valid_metadata_map_name(
541
+ property_name, type_name, map_name
542
+ )
543
+ )
544
+ return
545
+
546
+ async def _async_clear_valid_metadata_map_value(
547
+ self, property_name: str, type_name: str, preferred_value: str
548
+ ):
549
+ """Remove a valid map name value for a property. The match is done on preferred name. Async version.
550
+
551
+ Parameters
552
+ ----------
553
+ property_name : str
554
+ The name of the property to setup metadata map.
555
+ type_name : str
556
+ The type name of the property.
557
+ preferred_value: str
558
+ The value to remove.
559
+
560
+ Returns
561
+ -------
562
+ None - This method does not return a value.
563
+
564
+ Raises
565
+ ------
566
+ InvalidParameterException
567
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
568
+ PropertyServerException
569
+ Raised by the server when an issue arises in processing a valid request
570
+ NotAuthorizedException
571
+ The principle specified by the user_id does not have authorization for the requested action
572
+
573
+ """
574
+
575
+ url = (
576
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/clear-map-value/"
577
+ f"{property_name}?typeName={type_name}&preferredValue={preferred_value}"
578
+ )
579
+
580
+ await self._async_make_request("POST", url)
581
+ return
582
+
583
+ def clear_valid_metadata_map_value(
584
+ self, property_name: str, type_name: str, preferred_value: str
585
+ ):
586
+ """Remove a valid map name value for a property. The match is done on preferred name.
587
+
588
+ Parameters
589
+ ----------
590
+ property_name : str
591
+ The name of the property to setup metadata map.
592
+ type_name : str
593
+ The type name of the property.
594
+ preferred_value: str
595
+ The value to remove.
596
+
597
+ Returns
598
+ -------
599
+ None - This method does not return a value.
600
+
601
+ Raises
602
+ ------
603
+ InvalidParameterException
604
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
605
+ PropertyServerException
606
+ Raised by the server when an issue arises in processing a valid request
607
+ NotAuthorizedException
608
+ The principle specified by the user_id does not have authorization for the requested action
609
+
610
+ """
611
+
612
+ loop = asyncio.get_event_loop()
613
+ loop.run_until_complete(
614
+ self._async_clear_valid_metadata_map_value(
615
+ property_name, type_name, preferred_value
616
+ )
617
+ )
618
+ return
619
+
620
+ async def _async_validate_metadata_value(
621
+ self, property_name: str, type_name: str, actual_value: str
622
+ ) -> bool | str:
623
+ """Validate whether the value found in an open metadata property is valid. Async version.
624
+
625
+ Parameters
626
+ ----------
627
+ property_name : str
628
+ The name of the property to setup metadata map.
629
+ type_name : str
630
+ The type name of the property.
631
+ actual_value: str
632
+ The value to validate.
633
+
634
+ Returns
635
+ -------
636
+ Bool - True, if validated.
637
+
638
+ Raises
639
+ ------
640
+ InvalidParameterException
641
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
642
+ PropertyServerException
643
+ Raised by the server when an issue arises in processing a valid request
644
+ NotAuthorizedException
645
+ The principle specified by the user_id does not have authorization for the requested action
646
+
647
+ """
648
+
649
+ url = (
650
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/validate-value/"
651
+ f"{property_name}?typeName={type_name}&actualValue={actual_value}"
652
+ )
653
+
654
+ response = await self._async_make_request("GET", url)
655
+ return response.json().get("flag", "No flag found")
656
+
657
+ def validate_metadata_value(
658
+ self, property_name: str, type_name: str, actual_value: str
659
+ ) -> bool | str:
660
+ """Validate whether the value found in an open metadata property is valid.
661
+
662
+ Parameters
663
+ ----------
664
+ property_name : str
665
+ The name of the property to setup metadata map.
666
+ type_name : str
667
+ The type name of the property.
668
+ actual_value: str
669
+ The value to validate.
670
+
671
+ Returns
672
+ -------
673
+ Bool - True, if validated.
674
+
675
+ Raises
676
+ ------
677
+ InvalidParameterException
678
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
679
+ PropertyServerException
680
+ Raised by the server when an issue arises in processing a valid request
681
+ NotAuthorizedException
682
+ The principle specified by the user_id does not have authorization for the requested action
683
+
684
+ """
685
+
686
+ loop = asyncio.get_event_loop()
687
+ response = loop.run_until_complete(
688
+ self._async_clear_valid_metadata_map_value(
689
+ property_name, type_name, actual_value
690
+ )
691
+ )
692
+ return response
693
+
694
+ async def _async_validate_metadata_map_name(
695
+ self, property_name: str, type_name: str, map_name: str
696
+ ) -> bool | str:
697
+ """Validate whether the name found in an open metadata map property is valid. Async version.
698
+
699
+ Parameters
700
+ ----------
701
+ property_name : str
702
+ The name of the property to setup metadata map.
703
+ type_name : str
704
+ The type name of the property.
705
+ map_name: str
706
+ The name of a map to validate.
707
+
708
+ Returns
709
+ -------
710
+ Bool - True, if validated.
711
+
712
+ Raises
713
+ ------
714
+ InvalidParameterException
715
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
716
+ PropertyServerException
717
+ Raised by the server when an issue arises in processing a valid request
718
+ NotAuthorizedException
719
+ The principle specified by the user_id does not have authorization for the requested action
720
+
721
+ """
722
+
723
+ url = (
724
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/validate-map-name/"
725
+ f"{property_name}?typeName={type_name}&mapName={map_name}"
726
+ )
727
+
728
+ response = await self._async_make_request("GET", url)
729
+ return response.json().get("flag", "No flag found")
730
+
731
+ def validate_metadata_map_name(
732
+ self, property_name: str, type_name: str, map_name: str
733
+ ) -> bool | str:
734
+ """Validate whether the name found in an open metadata map property is valid.
735
+
736
+ Parameters
737
+ ----------
738
+ property_name : str
739
+ The name of the property to setup metadata map.
740
+ type_name : str
741
+ The type name of the property.
742
+ map_name: str
743
+ The name of a map to validate.
744
+
745
+ Returns
746
+ -------
747
+ Bool - True, if validated.
748
+
749
+ Raises
750
+ ------
751
+ InvalidParameterException
752
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
753
+ PropertyServerException
754
+ Raised by the server when an issue arises in processing a valid request
755
+ NotAuthorizedException
756
+ The principle specified by the user_id does not have authorization for the requested action
757
+
758
+ """
759
+
760
+ loop = asyncio.get_event_loop()
761
+ response = loop.run_until_complete(
762
+ self._async_validate_metadata_map_name(property_name, type_name, map_name)
763
+ )
764
+ return response
765
+
766
+ async def _async_validate_metadata_map_value(
767
+ self, property_name: str, type_name: str, map_name: str, actual_value: str
768
+ ) -> bool | str:
769
+ """Validate whether the name found in an open metadata map property is valid. Async version.
770
+
771
+ Parameters
772
+ ----------
773
+ property_name : str
774
+ The name of the property to setup metadata map.
775
+ type_name : str
776
+ The type name of the property.
777
+ map_name: str
778
+ The name of a map to validate.
779
+ actual_value: str
780
+ The actual value associated with the map to validate.
781
+
782
+ Returns
783
+ -------
784
+ Bool - True, if validated.
785
+
786
+ Raises
787
+ ------
788
+ InvalidParameterException
789
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
790
+ PropertyServerException
791
+ Raised by the server when an issue arises in processing a valid request
792
+ NotAuthorizedException
793
+ The principle specified by the user_id does not have authorization for the requested action
794
+
795
+ """
796
+
797
+ url = (
798
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/validate-map-value/"
799
+ f"{property_name}/{map_name}?typeName={type_name}&actualValue={actual_value}"
800
+ )
801
+
802
+ response = await self._async_make_request("GET", url)
803
+ return response.json().get("flag", "No flag found")
804
+
805
+ def validate_metadata_map_value(
806
+ self, property_name: str, type_name: str, map_name: str, actual_value: str
807
+ ) -> bool | str:
808
+ """Validate whether the name found in an open metadata map property is valid.
809
+
810
+ Parameters
811
+ ----------
812
+ property_name : str
813
+ The name of the property to setup metadata map.
814
+ type_name : str
815
+ The type name of the property.
816
+ map_name: str
817
+ The name of a map to validate.
818
+ actual_value: str
819
+ The actual value associated with the map to validate.
820
+
821
+ Returns
822
+ -------
823
+ Bool - True, if validated.
824
+
825
+ Raises
826
+ ------
827
+ InvalidParameterException
828
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
829
+ PropertyServerException
830
+ Raised by the server when an issue arises in processing a valid request
831
+ NotAuthorizedException
832
+ The principle specified by the user_id does not have authorization for the requested action
833
+
834
+ """
835
+
836
+ loop = asyncio.get_event_loop()
837
+ response = loop.run_until_complete(
838
+ self._async_validate_metadata_map_value(
839
+ property_name, type_name, map_name, actual_value
840
+ )
841
+ )
842
+ return response
843
+
844
+ async def _async_get_valid_metadata_value(
845
+ self, property_name: str, type_name: str, preferred_value: str
846
+ ) -> dict | str:
847
+ """Retrieve details of a specific valid value for a property. Async version.
848
+
849
+ Parameters
850
+ ----------
851
+ property_name : str
852
+ The name of the property to setup metadata map.
853
+ type_name : str
854
+ The type name of the property.
855
+ preferred_value: str
856
+ The preferred value of the property.
857
+
858
+ Returns
859
+ -------
860
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
861
+
862
+ Raises
863
+ ------
864
+ InvalidParameterException
865
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
866
+ PropertyServerException
867
+ Raised by the server when an issue arises in processing a valid request
868
+ NotAuthorizedException
869
+ The principle specified by the user_id does not have authorization for the requested action
870
+
871
+ """
872
+
873
+ url = (
874
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/get-value/"
875
+ f"{property_name}?typeName={type_name}&preferredValue={preferred_value}"
876
+ )
877
+
878
+ response = await self._async_make_request("GET", url)
879
+ return response.json().get("element", "No value found")
880
+
881
+ def get_valid_metadata_value(
882
+ self, property_name: str, type_name: str, preferred_value: str
883
+ ) -> dict | str:
884
+ """Retrieve details of a specific valid value for a property.
885
+
886
+ Parameters
887
+ ----------
888
+ property_name : str
889
+ The name of the property to setup metadata map.
890
+ type_name : str
891
+ The type name of the property.
892
+ preferred_value: str
893
+ The preferred value of the property.
894
+
895
+ Returns
896
+ -------
897
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
898
+
899
+ Raises
900
+ ------
901
+ InvalidParameterException
902
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
903
+ PropertyServerException
904
+ Raised by the server when an issue arises in processing a valid request
905
+ NotAuthorizedException
906
+ The principle specified by the user_id does not have authorization for the requested action
907
+
908
+ """
909
+ loop = asyncio.get_event_loop()
910
+ response = loop.run_until_complete(
911
+ self._async_get_valid_metadata_value(
912
+ property_name, type_name, preferred_value
913
+ )
914
+ )
915
+ return response
916
+
917
+ async def _async_get_valid_metadata_map_name(
918
+ self, property_name: str, type_name: str, map_name: str
919
+ ) -> dict | str:
920
+ """Retrieve details of a specific valid name for a map property. Async version.
921
+
922
+ Parameters
923
+ ----------
924
+ property_name : str
925
+ The name of the property to setup metadata map.
926
+ type_name : str
927
+ The type name of the property.
928
+ map_name: str
929
+ Map to return details of.
930
+
931
+ Returns
932
+ -------
933
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
934
+
935
+ Raises
936
+ ------
937
+ InvalidParameterException
938
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
939
+ PropertyServerException
940
+ Raised by the server when an issue arises in processing a valid request
941
+ NotAuthorizedException
942
+ The principle specified by the user_id does not have authorization for the requested action
943
+
944
+ """
945
+
946
+ url = (
947
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/get-map-name/"
948
+ f"{property_name}?typeName={type_name}&mapName={map_name}"
949
+ )
950
+
951
+ response = await self._async_make_request("GET", url)
952
+ return response.json().get("element", "No value found")
953
+
954
+ def get_valid_metadata_map_name(
955
+ self, property_name: str, type_name: str, map_name: str
956
+ ) -> dict | str:
957
+ """Retrieve details of a specific valid name for a map property.
958
+
959
+ Parameters
960
+ ----------
961
+ property_name : str
962
+ The name of the property to setup metadata map.
963
+ type_name : str
964
+ The type name of the property.
965
+ map_name: str
966
+ Map to return details of.
967
+
968
+ Returns
969
+ -------
970
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
971
+
972
+ Raises
973
+ ------
974
+ InvalidParameterException
975
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
976
+ PropertyServerException
977
+ Raised by the server when an issue arises in processing a valid request
978
+ NotAuthorizedException
979
+ The principle specified by the user_id does not have authorization for the requested action
980
+
981
+ """
982
+ loop = asyncio.get_event_loop()
983
+ response = loop.run_until_complete(
984
+ self._async_get_valid_metadata_map_name(property_name, type_name, map_name)
985
+ )
986
+ return response
987
+
988
+ async def _async_get_valid_metadata_map_value(
989
+ self, property_name: str, type_name: str, preferred_value: str
990
+ ) -> dict | str:
991
+ """Retrieve details of a specific valid value for a map property. Async version.
992
+
993
+ Parameters
994
+ ----------
995
+ property_name : str
996
+ The name of the property to setup metadata map.
997
+ type_name : str
998
+ The type name of the property.
999
+ preferred_value: str
1000
+ Preferred value to return details of.
1001
+
1002
+ Returns
1003
+ -------
1004
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
1005
+
1006
+ Raises
1007
+ ------
1008
+ InvalidParameterException
1009
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1010
+ PropertyServerException
1011
+ Raised by the server when an issue arises in processing a valid request
1012
+ NotAuthorizedException
1013
+ The principle specified by the user_id does not have authorization for the requested action
1014
+
1015
+ """
1016
+
1017
+ url = (
1018
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/get-map-value/"
1019
+ f"{property_name}?typeName={type_name}&preferredValue={preferred_value}"
1020
+ )
1021
+
1022
+ response = await self._async_make_request("GET", url)
1023
+ return response.json().get("element", "No value found")
1024
+
1025
+ def get_valid_metadata_map_value(
1026
+ self, property_name: str, type_name: str, preferred_value: str
1027
+ ) -> dict | str:
1028
+ """Retrieve details of a specific valid value for a map property.
1029
+
1030
+ Parameters
1031
+ ----------
1032
+ property_name : str
1033
+ The name of the property to setup metadata map.
1034
+ type_name : str
1035
+ The type name of the property.
1036
+ preferred_value: str
1037
+ Preferred value to return details of.
1038
+
1039
+ Returns
1040
+ -------
1041
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
1042
+
1043
+ Raises
1044
+ ------
1045
+ InvalidParameterException
1046
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1047
+ PropertyServerException
1048
+ Raised by the server when an issue arises in processing a valid request
1049
+ NotAuthorizedException
1050
+ The principle specified by the user_id does not have authorization for the requested action
1051
+
1052
+ """
1053
+ loop = asyncio.get_event_loop()
1054
+ response = loop.run_until_complete(
1055
+ self._async_get_valid_metadata_map_value(
1056
+ property_name, type_name, preferred_value
1057
+ )
1058
+ )
1059
+ return response
1060
+
1061
+ async def _async_get_valid_metadata_values(
1062
+ self,
1063
+ property_name: str,
1064
+ type_name: str = None,
1065
+ start_from: int = 0,
1066
+ page_size: int = None,
1067
+ ) -> list | str:
1068
+ """Retrieve list of values for the property. Async version.
1069
+
1070
+ Parameters
1071
+ ----------
1072
+ property_name: str
1073
+ The property to query.
1074
+ type_name: str, opt
1075
+ The Open Metadata type to get the property values for. If not specified then all property values
1076
+ will be returned.
1077
+ start_from: int, opt
1078
+ Page to start from.
1079
+ page_size: int, opt
1080
+ Number of elements to return per page - if None, then default for class will be used.
1081
+
1082
+
1083
+ Returns
1084
+ -------
1085
+ List | str
1086
+
1087
+ A list of collections linked off of the supplied element.
1088
+
1089
+ Raises
1090
+ ------
1091
+
1092
+ InvalidParameterException
1093
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1094
+ PropertyServerException
1095
+ Raised by the server when an issue arises in processing a valid request
1096
+ NotAuthorizedException
1097
+ The principle specified by the user_id does not have authorization for the requested action
1098
+
1099
+ """
1100
+
1101
+ if page_size is None:
1102
+ page_size = self.page_size
1103
+
1104
+ url = (
1105
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/get-valid-metadata-values/{property_name}"
1106
+ f"?typeName={type_name}&startFrom={start_from}&pageSize={page_size}"
1107
+ )
1108
+
1109
+ resp = await self._async_make_request("GET", url)
1110
+ return resp.json().get("elementList", "No elements found")
1111
+
1112
+ def get_valid_metadata_values(
1113
+ self,
1114
+ property_name: str,
1115
+ type_name: str = None,
1116
+ start_from: int = 0,
1117
+ page_size: int = None,
1118
+ ) -> list | str:
1119
+ """Retrieve list of values for the property.
1120
+
1121
+ Parameters
1122
+ ----------
1123
+ property_name: str
1124
+ The property to query.
1125
+ type_name: str, opt
1126
+ The Open Metadata type to get the property values for. If not specified then all property values
1127
+ will be returned.
1128
+ start_from: int, opt
1129
+ Page to start from.
1130
+ page_size: int, opt
1131
+ Number of elements to return per page - if None, then default for class will be used.
1132
+
1133
+ Returns
1134
+ -------
1135
+ List | str
1136
+
1137
+ A list of collections linked off of the supplied element.
1138
+
1139
+ Raises
1140
+ ------
1141
+
1142
+ InvalidParameterException
1143
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1144
+ PropertyServerException
1145
+ Raised by the server when an issue arises in processing a valid request
1146
+ NotAuthorizedException
1147
+ The principle specified by the user_id does not have authorization for the requested action
1148
+
1149
+ """
1150
+ loop = asyncio.get_event_loop()
1151
+ resp = loop.run_until_complete(
1152
+ self._async_get_valid_metadata_values(
1153
+ property_name, type_name, start_from, page_size
1154
+ )
1155
+ )
1156
+ return resp
1157
+
1158
+ async def _async_get_consistent_metadata_values(
1159
+ self,
1160
+ property_name: str,
1161
+ type_name: str,
1162
+ map_name: str,
1163
+ preferred_value: str,
1164
+ start_from: int = 0,
1165
+ page_size: int = None,
1166
+ ) -> list | str:
1167
+ """Retrieve all the consistent valid values for the requested property. Async version.
1168
+
1169
+ Parameters
1170
+ ----------
1171
+ property_name : str
1172
+ The name of the property to retrieve the valid values for.
1173
+ type_name : str
1174
+ The open metadata type that the property is associated with.
1175
+ map_name : str
1176
+ A valid map name that associates a property with a value.
1177
+ preferred_value : str
1178
+ Preferred value to return details of.
1179
+ start_from: int, [default=0], optional
1180
+ When multiple pages of results are available, the page number to start from.
1181
+ page_size: int, [default=None]
1182
+ The number of items to return in a single page. If not specified, the default will be taken from
1183
+ the class instance.
1184
+
1185
+ Returns
1186
+ -------
1187
+ List | str
1188
+
1189
+ A list of collections linked off of the supplied element.
1190
+
1191
+ Raises
1192
+ ------
1193
+
1194
+ InvalidParameterException
1195
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1196
+ PropertyServerException
1197
+ Raised by the server when an issue arises in processing a valid request
1198
+ NotAuthorizedException
1199
+ The principle specified by the user_id does not have authorization for the requested action
1200
+
1201
+ """
1202
+
1203
+ if page_size is None:
1204
+ page_size = self.page_size
1205
+
1206
+ url = (
1207
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/{property_name}/"
1208
+ f"consistent-metadata-values?typeName={type_name}&mapName={map_name}&preferredValue={preferred_value}"
1209
+ f"&startFrom={start_from}&pageSize={page_size}"
1210
+ )
1211
+
1212
+ resp = await self._async_make_request("GET", url)
1213
+ return resp.json().get("elementList", "No elements found")
1214
+
1215
+ def get_consistent_metadata_values(
1216
+ self,
1217
+ property_name: str,
1218
+ type_name: str,
1219
+ map_name: str,
1220
+ preferred_value: str,
1221
+ start_from: int = 0,
1222
+ page_size: int = None,
1223
+ ) -> list | str:
1224
+ """Retrieve all the consistent valid values for the requested property.
1225
+
1226
+ Parameters
1227
+ ----------
1228
+ property_name : str
1229
+ The name of the property to retrieve the valid values for.
1230
+ type_name : str
1231
+ The open metadata type that the property is associated with.
1232
+ map_name : str
1233
+ A valid map name that associates a property with a value.
1234
+ preferred_value : str
1235
+
1236
+
1237
+ start_from: int, [default=0], optional
1238
+ When multiple pages of results are available, the page number to start from.
1239
+ page_size: int, [default=None]
1240
+ The number of items to return in a single page. If not specified, the default will be taken from
1241
+ the class instance.
1242
+ Returns
1243
+ -------
1244
+ List | str
1245
+
1246
+ A list of collections linked off of the supplied element.
1247
+
1248
+ Raises
1249
+ ------
1250
+
1251
+ InvalidParameterException
1252
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1253
+ PropertyServerException
1254
+ Raised by the server when an issue arises in processing a valid request
1255
+ NotAuthorizedException
1256
+ The principle specified by the user_id does not have authorization for the requested action
1257
+
1258
+ """
1259
+ loop = asyncio.get_event_loop()
1260
+ resp = loop.run_until_complete(
1261
+ self._async_get_consistent_metadata_values(
1262
+ property_name,
1263
+ type_name,
1264
+ map_name,
1265
+ preferred_value,
1266
+ start_from,
1267
+ page_size,
1268
+ )
1269
+ )
1270
+ return resp
1271
+
1272
+ async def _async_set_consistent_metadata_values(
1273
+ self,
1274
+ property_name1: str,
1275
+ property_name2: str,
1276
+ type_name1: str,
1277
+ map_name1: str,
1278
+ preferred_value1: str,
1279
+ type_name2: str,
1280
+ map_name2: str,
1281
+ preferred_value2: str,
1282
+ ) -> None:
1283
+ """Set up consistent metadata values relationship between the two property values. Async version.
1284
+
1285
+ Parameters
1286
+ ----------
1287
+ property_name1 : str
1288
+ The name of the first property.
1289
+ property_name2 : str
1290
+ The name of the second property.
1291
+ type_name1 : str
1292
+ The open metadata type that property1 is associated with.
1293
+ map_name1 : str
1294
+ First valid map name.
1295
+ preferred_value1 : str
1296
+ First preferred value.
1297
+ type_name2 : str
1298
+ The open metadata type that property2 is associated with.
1299
+ map_name2 : str
1300
+ Second valid map name.
1301
+ preferred_value2 : str
1302
+ Second preferred value.
1303
+
1304
+ Returns
1305
+ -------
1306
+ None
1307
+
1308
+ Raises
1309
+ ------
1310
+ InvalidParameterException
1311
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1312
+ PropertyServerException
1313
+ Raised by the server when an issue arises in processing a valid request
1314
+ NotAuthorizedException
1315
+ The principle specified by the user_id does not have authorization for the requested action
1316
+
1317
+ """
1318
+
1319
+ url = (
1320
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/{property_name1}/"
1321
+ f"consistent-metadata-values/{property_name2}?"
1322
+ f"typeName1={type_name1}&mapName1={map_name1}&preferredValue1={preferred_value1}&"
1323
+ f"typeName1={type_name2}&mapName2={map_name2}&preferredValue2={preferred_value2}"
1324
+ )
1325
+
1326
+ await self._async_make_request("POST", url)
1327
+ return
1328
+
1329
+ def set_consistent_metadata_values(
1330
+ self,
1331
+ property_name1: str,
1332
+ property_name2: str,
1333
+ type_name1: str,
1334
+ map_name1: str,
1335
+ preferred_value1: str,
1336
+ type_name2: str,
1337
+ map_name2: str,
1338
+ preferred_value2: str,
1339
+ ) -> None:
1340
+ """Set up consistent metadata values relationship between the two property values.
1341
+
1342
+ Parameters
1343
+ ----------
1344
+ property_name1 : str
1345
+ The name of the first property.
1346
+ property_name2 : str
1347
+ The name of the second property.
1348
+ type_name1 : str
1349
+ The open metadata type that property1 is associated with.
1350
+ map_name1 : str
1351
+ First valid map name.
1352
+ preferred_value1 : str
1353
+ First preferred value.
1354
+ type_name2 : str
1355
+ The open metadata type that property2 is associated with.
1356
+ map_name2 : str
1357
+ Second valid map name.
1358
+ preferred_value2 : str
1359
+ Second preferred value.
1360
+
1361
+ Returns
1362
+ -------
1363
+ None
1364
+
1365
+ Raises
1366
+ ------
1367
+ InvalidParameterException
1368
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1369
+ PropertyServerException
1370
+ Raised by the server when an issue arises in processing a valid request
1371
+ NotAuthorizedException
1372
+ The principle specified by the user_id does not have authorization for the requested action
1373
+
1374
+ """
1375
+ loop = asyncio.get_event_loop()
1376
+ loop.run_until_complete(
1377
+ self._async_set_consistent_metadata_values(
1378
+ property_name1,
1379
+ property_name2,
1380
+ type_name1,
1381
+ map_name1,
1382
+ preferred_value1,
1383
+ type_name2,
1384
+ map_name2,
1385
+ preferred_value2,
1386
+ )
1387
+ )
1388
+ return
1389
+
1390
+ #
1391
+ # Get all ...
1392
+ #
1393
+ async def _async_get_all_entity_types(self) -> list | str:
1394
+ """Returns the list of different types of metadata organized into two groups. The first are the
1395
+ attribute type definitions (AttributeTypeDefs). These provide types for attributes in full
1396
+ type definitions. Full type definitions (TypeDefs) describe types for entities, relationships
1397
+ and classifications. Async version.
1398
+
1399
+ Parameters
1400
+ ----------
1401
+
1402
+
1403
+ Returns
1404
+ -------
1405
+ List | str
1406
+
1407
+ A list of all entity types.
1408
+
1409
+ Raises
1410
+ ------
1411
+
1412
+ InvalidParameterException
1413
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1414
+ PropertyServerException
1415
+ Raised by the server when an issue arises in processing a valid request
1416
+ NotAuthorizedException
1417
+ The principle specified by the user_id does not have authorization for the requested action
1418
+
1419
+ """
1420
+
1421
+ url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types"
1422
+
1423
+ resp = await self._async_make_request("GET", url)
1424
+ return resp.json()
1425
+
1426
+ def get_all_entity_types(self) -> list | str:
1427
+ """Returns the list of different types of metadata organized into two groups. The first are the
1428
+ attribute type definitions (AttributeTypeDefs). These provide types for attributes in full
1429
+ type definitions. Full type definitions (TypeDefs) describe types for entities, relationships
1430
+ and classifications. Async version.
1431
+
1432
+ Parameters
1433
+ ----------
1434
+
1435
+
1436
+ Returns
1437
+ -------
1438
+ List | str
1439
+
1440
+ A list of all entity types.
1441
+
1442
+ Raises
1443
+ ------
1444
+
1445
+ InvalidParameterException
1446
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1447
+ PropertyServerException
1448
+ Raised by the server when an issue arises in processing a valid request
1449
+ NotAuthorizedException
1450
+ The principle specified by the user_id does not have authorization for the requested action
1451
+
1452
+ """
1453
+ loop = asyncio.get_event_loop()
1454
+ resp = loop.run_until_complete(self._async_get_all_entity_types())
1455
+ return resp
1456
+
1457
+ async def _async_get_all_entity_defs(self) -> list | str:
1458
+ """GReturns all the entity type definitions. Async version.
1459
+
1460
+ Parameters
1461
+ ----------
1462
+
1463
+
1464
+ Returns
1465
+ -------
1466
+ List | str
1467
+
1468
+ A list of all entity types.
1469
+
1470
+ Raises
1471
+ ------
1472
+
1473
+ InvalidParameterException
1474
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1475
+ PropertyServerException
1476
+ Raised by the server when an issue arises in processing a valid request
1477
+ NotAuthorizedException
1478
+ The principle specified by the user_id does not have authorization for the requested action
1479
+
1480
+ """
1481
+
1482
+ url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/entity-defs"
1483
+
1484
+ resp = await self._async_make_request("GET", url)
1485
+ return resp.json().get("typeDefs", "No TypeDefs Found")
1486
+
1487
+ def get_all_entity_defs(self) -> list | str:
1488
+ """Returns all the entity type definitions.
1489
+
1490
+ Parameters
1491
+ ----------
1492
+
1493
+
1494
+ Returns
1495
+ -------
1496
+ List | str
1497
+
1498
+ A list of all entity types.
1499
+
1500
+ Raises
1501
+ ------
1502
+
1503
+ InvalidParameterException
1504
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1505
+ PropertyServerException
1506
+ Raised by the server when an issue arises in processing a valid request
1507
+ NotAuthorizedException
1508
+ The principle specified by the user_id does not have authorization for the requested action
1509
+
1510
+ """
1511
+ loop = asyncio.get_event_loop()
1512
+ resp = loop.run_until_complete(self._async_get_all_entity_defs())
1513
+ return resp
1514
+
1515
+ async def _async_get_all_relationship_defs(self) -> list | str:
1516
+ """Returns all the relationship type definitions. Async version.
1517
+
1518
+ Parameters
1519
+ ----------
1520
+
1521
+
1522
+ Returns
1523
+ -------
1524
+ List | str
1525
+
1526
+ A list of all entity types.
1527
+
1528
+ Raises
1529
+ ------
1530
+
1531
+ InvalidParameterException
1532
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1533
+ PropertyServerException
1534
+ Raised by the server when an issue arises in processing a valid request
1535
+ NotAuthorizedException
1536
+ The principle specified by the user_id does not have authorization for the requested action
1537
+
1538
+ """
1539
+
1540
+ url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/relationship-defs"
1541
+
1542
+ resp = await self._async_make_request("GET", url)
1543
+ return resp.json().get("typeDefs", "No TypeDefs Found")
1544
+
1545
+ def get_all_relationship_defs(self) -> list | str:
1546
+ """Returns all the relationship type definitions.
1547
+
1548
+ Parameters
1549
+ ----------
1550
+
1551
+
1552
+ Returns
1553
+ -------
1554
+ List | str
1555
+
1556
+ A list of all entity types.
1557
+
1558
+ Raises
1559
+ ------
1560
+
1561
+ InvalidParameterException
1562
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1563
+ PropertyServerException
1564
+ Raised by the server when an issue arises in processing a valid request
1565
+ NotAuthorizedException
1566
+ The principle specified by the user_id does not have authorization for the requested action
1567
+
1568
+ """
1569
+ loop = asyncio.get_event_loop()
1570
+ resp = loop.run_until_complete(self._async_get_all_relationship_defs())
1571
+ return resp
1572
+
1573
+ async def _async_get_all_classification_defs(self) -> list | str:
1574
+ """Returns all the classification type definitions. Async version.
1575
+
1576
+ Parameters
1577
+ ----------
1578
+
1579
+
1580
+ Returns
1581
+ -------
1582
+ List | str
1583
+
1584
+ A list of all entity types.
1585
+
1586
+ Raises
1587
+ ------
1588
+
1589
+ InvalidParameterException
1590
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1591
+ PropertyServerException
1592
+ Raised by the server when an issue arises in processing a valid request
1593
+ NotAuthorizedException
1594
+ The principle specified by the user_id does not have authorization for the requested action
1595
+
1596
+ """
1597
+
1598
+ url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/classification-defs"
1599
+
1600
+ resp = await self._async_make_request("GET", url)
1601
+ return resp.json().get("typeDefs", "No TypeDefs Found")
1602
+
1603
+ def get_all_classification_defs(self) -> list | str:
1604
+ """Returns all the classification type definitions.
1605
+
1606
+ Parameters
1607
+ ----------
1608
+
1609
+
1610
+ Returns
1611
+ -------
1612
+ List | str
1613
+
1614
+ A list of all entity types.
1615
+
1616
+ Raises
1617
+ ------
1618
+
1619
+ InvalidParameterException
1620
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1621
+ PropertyServerException
1622
+ Raised by the server when an issue arises in processing a valid request
1623
+ NotAuthorizedException
1624
+ The principle specified by the user_id does not have authorization for the requested action
1625
+
1626
+ """
1627
+ loop = asyncio.get_event_loop()
1628
+ resp = loop.run_until_complete(self._async_get_all_classification_defs())
1629
+ return resp
1630
+
1631
+ #
1632
+ # Get valid ...
1633
+ #
1634
+
1635
+ async def _async_get_sub_types(self, type_name: str) -> list | str:
1636
+ """Returns all the TypeDefs for a specific subtype. If a null result is returned it means the
1637
+ type has no subtypes. Async version.
1638
+
1639
+ Parameters
1640
+ ----------
1641
+ type_name : str
1642
+ Type name to retrieve the sub-types for.
1643
+
1644
+ Returns
1645
+ -------
1646
+ List | str
1647
+
1648
+ A list of TypeDefs that can be attached to the specified type.
1649
+
1650
+ Raises
1651
+ ------
1652
+
1653
+ InvalidParameterException
1654
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1655
+ PropertyServerException
1656
+ Raised by the server when an issue arises in processing a valid request
1657
+ NotAuthorizedException
1658
+ The principle specified by the user_id does not have authorization for the requested action
1659
+
1660
+ """
1661
+
1662
+ url = (
1663
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/sub-types/"
1664
+ f"{type_name}"
1665
+ )
1666
+
1667
+ resp = await self._async_make_request("GET", url)
1668
+ return resp.json().get("typeDefs", "No TypeDefs Found")
1669
+
1670
+ def get_sub_types(self, type_name: str) -> list | str:
1671
+ """Returns all the TypeDefs for a specific subtype. If a null result is returned it means the
1672
+ type has no subtypes.
1673
+
1674
+ Parameters
1675
+ ----------
1676
+ type_name : str
1677
+ Type name to retrieve the sub-types for.
1678
+
1679
+ Returns
1680
+ -------
1681
+ List | str
1682
+
1683
+ A list of TypeDefs that can be attached to the specified type.
1684
+
1685
+ Raises
1686
+ ------
1687
+
1688
+ InvalidParameterException
1689
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1690
+ PropertyServerException
1691
+ Raised by the server when an issue arises in processing a valid request
1692
+ NotAuthorizedException
1693
+ The principle specified by the user_id does not have authorization for the requested action
1694
+
1695
+ """
1696
+ loop = asyncio.get_event_loop()
1697
+ resp = loop.run_until_complete(
1698
+ self._async_get_valid_relationship_types(type_name)
1699
+ )
1700
+ return resp
1701
+
1702
+ async def _async_get_valid_relationship_types(self, entity_type: str) -> list | str:
1703
+ """Returns all the TypeDefs for relationships that can be attached to the requested entity type.
1704
+ Async version.
1705
+
1706
+ Parameters
1707
+ ----------
1708
+ entity_type : str
1709
+ The name of the entity type to retrieve the valid relationships for.
1710
+
1711
+
1712
+ Returns
1713
+ -------
1714
+ List | str
1715
+
1716
+ A list of TypeDefs that can be attached to the specified entity type.
1717
+
1718
+ Raises
1719
+ ------
1720
+
1721
+ InvalidParameterException
1722
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1723
+ PropertyServerException
1724
+ Raised by the server when an issue arises in processing a valid request
1725
+ NotAuthorizedException
1726
+ The principle specified by the user_id does not have authorization for the requested action
1727
+
1728
+ """
1729
+
1730
+ url = (
1731
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/{entity_type}/"
1732
+ f"attached-relationships"
1733
+ )
1734
+
1735
+ resp = await self._async_make_request("GET", url)
1736
+ return resp.json().get("typeDefs", "No TypeDefs Found")
1737
+
1738
+ def get_valid_relationship_types(self, entity_type: str) -> list | str:
1739
+ """Returns all the TypeDefs for relationships that can be attached to the requested entity type.
1740
+ Async version.
1741
+
1742
+ Parameters
1743
+ ----------
1744
+ entity_type : str
1745
+ The name of the entity type to retrieve the valid relationships for.
1746
+ : str, optional
1747
+ The name of the server to configure.
1748
+ If not provided, the server name associated with the instance is used.
1749
+
1750
+ Returns
1751
+ -------
1752
+ List | str
1753
+
1754
+ A list of TypeDefs that can be attached to the specified entity type.
1755
+
1756
+ Raises
1757
+ ------
1758
+
1759
+ InvalidParameterException
1760
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1761
+ PropertyServerException
1762
+ Raised by the server when an issue arises in processing a valid request
1763
+ NotAuthorizedException
1764
+ The principle specified by the user_id does not have authorization for the requested action
1765
+
1766
+ """
1767
+ loop = asyncio.get_event_loop()
1768
+ resp = loop.run_until_complete(
1769
+ self._async_get_valid_relationship_types(entity_type)
1770
+ )
1771
+ return resp
1772
+
1773
+ async def _async_get_valid_classification_types(
1774
+ self, entity_type: str
1775
+ ) -> list | str:
1776
+ """Returns all the TypeDefs for classifications that can be attached to the requested entity type.
1777
+ Async version.
1778
+
1779
+ Parameters
1780
+ ----------
1781
+ entity_type : str
1782
+ The name of the entity type to retrieve the classifications for.
1783
+
1784
+
1785
+ Returns
1786
+ -------
1787
+ List | str
1788
+
1789
+ A list of classifications that can be attached to the specified entity type.
1790
+
1791
+ Raises
1792
+ ------
1793
+
1794
+ InvalidParameterException
1795
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1796
+ PropertyServerException
1797
+ Raised by the server when an issue arises in processing a valid request
1798
+ NotAuthorizedException
1799
+ The principle specified by the user_id does not have authorization for the requested action
1800
+
1801
+ """
1802
+
1803
+ url = (
1804
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/{entity_type}/"
1805
+ f"attached-classifications"
1806
+ )
1807
+
1808
+ resp = await self._async_make_request("GET", url)
1809
+ return resp.json().get("typeDefs", "No TypeDefs Found")
1810
+
1811
+ def get_valid_classification_types(self, entity_type: str) -> list | str:
1812
+ """Returns all the TypeDefs for relationships that can be attached to the requested entity type.
1813
+ Async version.
1814
+
1815
+ Parameters
1816
+ ----------
1817
+ entity_type : str
1818
+ The name of the entity type to retrieve the classifications for.
1819
+ : str, optional
1820
+ The name of the server to configure.
1821
+ If not provided, the server name associated with the instance is used.
1822
+
1823
+ Returns
1824
+ -------
1825
+ List | str
1826
+
1827
+ A list of classifications that can be attached to the specified entity type.
1828
+
1829
+ Raises
1830
+ ------
1831
+
1832
+ InvalidParameterException
1833
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1834
+ PropertyServerException
1835
+ Raised by the server when an issue arises in processing a valid request
1836
+ NotAuthorizedException
1837
+ The principle specified by the user_id does not have authorization for the requested action
1838
+
1839
+ """
1840
+ loop = asyncio.get_event_loop()
1841
+ resp = loop.run_until_complete(
1842
+ self._async_get_valid_classification_types(entity_type)
1843
+ )
1844
+ return resp
1845
+
1846
+ async def _async_get_typedef_by_name(self, entity_type: str) -> dict | str:
1847
+ """Return the TypeDef identified by the unique name.
1848
+ Async version.
1849
+
1850
+ Parameters
1851
+ ----------
1852
+ entity_type : str
1853
+ The name of the entity type to retrieve the typedef for.
1854
+
1855
+
1856
+ Returns
1857
+ -------
1858
+ dict | str
1859
+
1860
+ The typedef associated with the type name
1861
+
1862
+ Raises
1863
+ ------
1864
+
1865
+ InvalidParameterException
1866
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1867
+ PropertyServerException
1868
+ Raised by the server when an issue arises in processing a valid request
1869
+ NotAuthorizedException
1870
+ The principle specified by the user_id does not have authorization for the requested action
1871
+
1872
+ """
1873
+
1874
+ url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/name/{entity_type}"
1875
+
1876
+ resp = await self._async_make_request("GET", url)
1877
+ return resp.json().get("typeDef", "No TypeDefs Found")
1878
+
1879
+ def get_typedef_by_name(self, entity_type: str) -> dict | str:
1880
+ """Return the TypeDef identified by the unique name.
1881
+
1882
+ Parameters
1883
+ ----------
1884
+ entity_type : str
1885
+ The name of the entity type to retrieve the typedef for.
1886
+
1887
+
1888
+ Returns
1889
+ -------
1890
+ dict | str
1891
+
1892
+ The typedef associated with the type name
1893
+
1894
+ Raises
1895
+ ------
1896
+
1897
+ InvalidParameterException
1898
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1899
+ PropertyServerException
1900
+ Raised by the server when an issue arises in processing a valid request
1901
+ NotAuthorizedException
1902
+ The principle specified by the user_id does not have authorization for the requested action
1903
+
1904
+ """
1905
+ loop = asyncio.get_event_loop()
1906
+ resp = loop.run_until_complete(self._async_get_typedef_by_name(entity_type))
1907
+ return resp
1908
+
1909
+
1910
+ if __name__ == "__main__":
1911
+ print("Main-Valid Metadata Manager")