pyegeria 5.4.0.28__py3-none-any.whl → 5.5.3.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyegeria might be problematic. Click here for more details.

Files changed (433) hide show
  1. commands/__init__.py +24 -0
  2. commands/cat/Dr-Egeria_md-orig.py +2 -2
  3. commands/cat/collection_actions.py +197 -0
  4. commands/cat/dr_egeria_command_help.py +137 -38
  5. commands/cat/dr_egeria_jupyter.py +7 -7
  6. commands/cat/dr_egeria_md.py +10 -267
  7. commands/cat/exp_list_glossaries.py +11 -14
  8. commands/cat/get_asset_graph.py +37 -267
  9. commands/cat/{get_collection.py → get_collection_tree.py} +10 -18
  10. commands/cat/get_project_dependencies.py +14 -14
  11. commands/cat/get_project_structure.py +15 -14
  12. commands/cat/get_tech_type_elements.py +16 -116
  13. commands/cat/glossary_actions.py +145 -298
  14. commands/cat/list_assets.py +3 -11
  15. commands/cat/list_cert_types.py +17 -63
  16. commands/cat/list_collections.py +17 -139
  17. commands/cat/list_deployed_catalogs.py +15 -27
  18. commands/cat/list_deployed_database_schemas.py +27 -43
  19. commands/cat/list_deployed_databases.py +16 -31
  20. commands/cat/list_deployed_servers.py +35 -54
  21. commands/cat/list_glossaries.py +18 -17
  22. commands/cat/list_projects.py +10 -12
  23. commands/cat/list_tech_type_elements.py +21 -37
  24. commands/cat/list_tech_types.py +13 -25
  25. commands/cat/list_terms.py +38 -79
  26. commands/cat/list_todos.py +4 -11
  27. commands/cat/list_user_ids.py +3 -10
  28. commands/cat/my_reports.py +559 -0
  29. commands/cat/run_report.py +394 -0
  30. commands/cat/{list_format_set.py → run_report_orig.py} +136 -44
  31. commands/cli/egeria.py +182 -219
  32. commands/cli/egeria_cat.py +32 -59
  33. commands/cli/egeria_my.py +13 -0
  34. commands/cli/egeria_ops.py +69 -74
  35. commands/cli/egeria_tech.py +17 -93
  36. commands/{cat → deprecated}/list_data_designer.py +2 -4
  37. commands/{cat → deprecated}/list_data_structures_full.py +3 -6
  38. commands/deprecated/old_get_asset_graph.py +315 -0
  39. commands/my/__init__.py +0 -2
  40. commands/my/list_my_profile.py +27 -34
  41. commands/my/list_my_roles.py +1 -7
  42. commands/my/monitor_my_todos.py +1 -7
  43. commands/my/monitor_open_todos.py +6 -7
  44. commands/my/todo_actions.py +4 -5
  45. commands/ops/__init__.py +0 -2
  46. commands/ops/gov_server_actions.py +17 -21
  47. commands/ops/list_archives.py +17 -38
  48. commands/ops/list_catalog_targets.py +33 -40
  49. commands/ops/load_archive.py +14 -11
  50. commands/ops/{monitor_engine_activity_c.py → monitor_active_engine_activity.py} +51 -82
  51. commands/ops/{monitor_integ_daemon_status.py → monitor_daemon_status.py} +35 -55
  52. commands/ops/monitor_engine_activity.py +79 -77
  53. commands/ops/{monitor_gov_eng_status.py → monitor_engine_status.py} +10 -7
  54. commands/ops/monitor_platform_status.py +38 -50
  55. commands/ops/monitor_server_startup.py +6 -11
  56. commands/ops/monitor_server_status.py +7 -11
  57. commands/ops/orig_monitor_server_list.py +8 -8
  58. commands/ops/orig_monitor_server_status.py +1 -5
  59. commands/ops/refresh_integration_daemon.py +5 -5
  60. commands/ops/restart_integration_daemon.py +5 -5
  61. commands/ops/table_integ_daemon_status.py +6 -6
  62. commands/ops/x_engine_actions.py +7 -7
  63. commands/tech/__init__.py +0 -2
  64. commands/tech/{generic_actions.py → element_actions.py} +6 -11
  65. commands/tech/get_element_info.py +20 -29
  66. commands/tech/get_guid_info.py +23 -42
  67. commands/tech/get_tech_details.py +20 -35
  68. commands/tech/get_tech_type_template.py +28 -39
  69. commands/tech/list_all_om_type_elements.py +24 -30
  70. commands/tech/list_all_om_type_elements_x.py +22 -28
  71. commands/tech/list_all_related_elements.py +19 -28
  72. commands/tech/list_anchored_elements.py +22 -30
  73. commands/tech/list_asset_types.py +19 -24
  74. commands/tech/list_elements_by_classification_by_property_value.py +26 -32
  75. commands/tech/list_elements_by_property_value.py +19 -25
  76. commands/tech/list_elements_by_property_value_x.py +20 -28
  77. commands/tech/list_elements_for_classification.py +28 -41
  78. commands/tech/list_gov_action_processes.py +16 -27
  79. commands/tech/list_information_supply_chains.py +22 -30
  80. commands/tech/list_registered_services.py +14 -26
  81. commands/tech/list_related_elements_with_prop_value.py +15 -25
  82. commands/tech/list_related_specification.py +1 -4
  83. commands/tech/list_relationship_types.py +15 -25
  84. commands/tech/list_relationships.py +20 -36
  85. commands/tech/list_solution_blueprints.py +28 -33
  86. commands/tech/list_solution_components.py +23 -29
  87. commands/tech/list_solution_roles.py +21 -32
  88. commands/tech/list_tech_templates.py +51 -54
  89. commands/tech/list_valid_metadata_values.py +5 -9
  90. commands/tech/table_tech_templates.py +2 -6
  91. commands/tech/x_list_related_elements.py +1 -4
  92. examples/GeoSpatial Products Example.py +524 -0
  93. examples/Jupyter Notebooks/P-egeria-server-config.ipynb +2137 -0
  94. examples/Jupyter Notebooks/README.md +2 -0
  95. examples/Jupyter Notebooks/common/P-environment-check.ipynb +115 -0
  96. examples/Jupyter Notebooks/common/__init__.py +14 -0
  97. examples/Jupyter Notebooks/common/common-functions.ipynb +4694 -0
  98. examples/Jupyter Notebooks/common/environment-check.ipynb +52 -0
  99. examples/Jupyter Notebooks/common/globals.ipynb +184 -0
  100. examples/Jupyter Notebooks/common/globals.py +154 -0
  101. examples/Jupyter Notebooks/common/orig_globals.py +152 -0
  102. examples/format_sets/all_format_sets.json +910 -0
  103. examples/format_sets/custom_format_sets.json +268 -0
  104. examples/format_sets/subset_format_sets.json +187 -0
  105. examples/format_sets_save_load_example.py +291 -0
  106. examples/jacquard_data_sets.py +129 -0
  107. examples/output_formats_example.py +193 -0
  108. examples/test_jacquard_data_sets.py +54 -0
  109. examples/test_jacquard_data_sets_scenarios.py +94 -0
  110. md_processing/__init__.py +33 -24
  111. md_processing/command_dispatcher.py +33 -0
  112. md_processing/command_mapping.py +221 -0
  113. md_processing/data/commands/commands_data_designer.json +537 -0
  114. md_processing/data/commands/commands_external_reference.json +733 -0
  115. md_processing/data/commands/commands_feedback.json +155 -0
  116. md_processing/data/commands/commands_general.json +204 -0
  117. md_processing/data/commands/commands_glossary.json +218 -0
  118. md_processing/data/commands/commands_governance.json +3678 -0
  119. md_processing/data/commands/commands_product_manager.json +865 -0
  120. md_processing/data/commands/commands_project.json +642 -0
  121. md_processing/data/commands/commands_solution_architect.json +366 -0
  122. md_processing/data/commands.json +6489 -30060
  123. md_processing/data/{commands-working.json → commands_working.json} +9304 -13513
  124. md_processing/data/gened_report_specs.py +6584 -0
  125. md_processing/data/generated_format_sets.json +6533 -0
  126. md_processing/data/generated_format_sets_old.json +4137 -0
  127. md_processing/data/generated_format_sets_old.py +45 -0
  128. md_processing/dr_egeria.py +182 -0
  129. md_processing/md_commands/data_designer_commands.py +195 -583
  130. md_processing/md_commands/ext_ref_commands.py +530 -0
  131. md_processing/md_commands/feedback_commands.py +726 -0
  132. md_processing/md_commands/glossary_commands.py +106 -490
  133. md_processing/md_commands/governance_officer_commands.py +129 -18
  134. md_processing/md_commands/product_manager_commands.py +362 -115
  135. md_processing/md_commands/project_commands.py +351 -134
  136. md_processing/md_commands/solution_architect_commands.py +276 -232
  137. md_processing/md_commands/view_commands.py +295 -0
  138. md_processing/md_processing_utils/common_md_proc_utils.py +258 -166
  139. md_processing/md_processing_utils/common_md_utils.py +138 -43
  140. md_processing/md_processing_utils/determine_width.py +103 -0
  141. md_processing/md_processing_utils/extraction_utils.py +100 -39
  142. md_processing/md_processing_utils/gen_report_specs.py +643 -0
  143. md_processing/md_processing_utils/generate_dr_help.py +61 -33
  144. md_processing/md_processing_utils/generate_md_cmd_templates.py +20 -19
  145. md_processing/md_processing_utils/generate_md_templates.py +3 -12
  146. md_processing/md_processing_utils/md_processing_constants.py +1053 -72
  147. pyegeria/__init__.py +203 -158
  148. pyegeria/core/__init__.py +40 -0
  149. pyegeria/core/_base_platform_client.py +574 -0
  150. pyegeria/core/_base_server_client.py +573 -0
  151. pyegeria/{_exceptions_new.py → core/_exceptions.py} +62 -30
  152. pyegeria/{_globals.py → core/_globals.py} +14 -3
  153. pyegeria/core/_server_client.py +6073 -0
  154. pyegeria/{_validators.py → core/_validators.py} +7 -8
  155. pyegeria/core/config.py +654 -0
  156. pyegeria/{create_tech_guid_lists.py → core/create_tech_guid_lists.py} +0 -1
  157. pyegeria/core/load_config.py +37 -0
  158. pyegeria/{logging_configuration.py → core/logging_configuration.py} +1 -1
  159. pyegeria/core/mcp_adapter.py +144 -0
  160. pyegeria/core/mcp_server.py +212 -0
  161. pyegeria/core/utils.py +405 -0
  162. pyegeria/{_client.py → deprecated/_client.py} +24 -25
  163. pyegeria/{_deprecated_gov_engine.py → deprecated/_deprecated_gov_engine.py} +16 -16
  164. pyegeria/{classification_manager_omvs.py → deprecated/classification_manager_omvs.py} +1987 -1877
  165. pyegeria/{output_formatter.py → deprecated/output_formatter_with_machine_keys.py} +298 -45
  166. pyegeria/{runtime_manager_omvs.py → deprecated/runtime_manager_omvs.py} +155 -171
  167. pyegeria/{valid_metadata_omvs.py → deprecated/valid_metadata_omvs.py} +93 -93
  168. pyegeria/{x_action_author_omvs.py → deprecated/x_action_author_omvs.py} +2 -3
  169. pyegeria/egeria_cat_client.py +26 -70
  170. pyegeria/egeria_client.py +130 -93
  171. pyegeria/egeria_config_client.py +40 -46
  172. pyegeria/egeria_tech_client.py +141 -54
  173. pyegeria/models/__init__.py +150 -0
  174. pyegeria/{models.py → models/models.py} +156 -20
  175. pyegeria/omvs/__init__.py +84 -0
  176. pyegeria/omvs/action_author.py +342 -0
  177. pyegeria/omvs/actor_manager.py +5980 -0
  178. pyegeria/omvs/asset_catalog.py +842 -0
  179. pyegeria/omvs/asset_maker.py +2736 -0
  180. pyegeria/omvs/automated_curation.py +4403 -0
  181. pyegeria/omvs/classification_manager.py +11213 -0
  182. pyegeria/{collection_manager.py → omvs/collection_manager.py} +1334 -1160
  183. pyegeria/omvs/community_matters_omvs.py +468 -0
  184. pyegeria/{core_omag_server_config.py → omvs/core_omag_server_config.py} +157 -157
  185. pyegeria/{data_designer.py → omvs/data_designer.py} +1115 -660
  186. pyegeria/omvs/data_discovery.py +869 -0
  187. pyegeria/omvs/data_engineer.py +372 -0
  188. pyegeria/omvs/digital_business.py +1133 -0
  189. pyegeria/omvs/external_links.py +1752 -0
  190. pyegeria/omvs/feedback_manager.py +834 -0
  191. pyegeria/{full_omag_server_config.py → omvs/full_omag_server_config.py} +73 -69
  192. pyegeria/{glossary_manager.py → omvs/glossary_manager.py} +857 -519
  193. pyegeria/{governance_officer.py → omvs/governance_officer.py} +964 -468
  194. pyegeria/omvs/lineage_linker.py +314 -0
  195. pyegeria/omvs/location_arena.py +1525 -0
  196. pyegeria/omvs/metadata_expert.py +668 -0
  197. pyegeria/omvs/metadata_explorer_omvs.py +2943 -0
  198. pyegeria/omvs/my_profile.py +1042 -0
  199. pyegeria/omvs/notification_manager.py +358 -0
  200. pyegeria/omvs/people_organizer.py +394 -0
  201. pyegeria/{platform_services.py → omvs/platform_services.py} +113 -193
  202. pyegeria/omvs/product_manager.py +1825 -0
  203. pyegeria/omvs/project_manager.py +1907 -0
  204. pyegeria/omvs/reference_data.py +1140 -0
  205. pyegeria/omvs/registered_info.py +334 -0
  206. pyegeria/omvs/runtime_manager.py +2817 -0
  207. pyegeria/omvs/schema_maker.py +446 -0
  208. pyegeria/{server_operations.py → omvs/server_operations.py} +27 -26
  209. pyegeria/{solution_architect_omvs.py → omvs/solution_architect.py} +1886 -1505
  210. pyegeria/omvs/specification_properties.py +37 -0
  211. pyegeria/omvs/subject_area.py +1042 -0
  212. pyegeria/omvs/template_manager_omvs.py +236 -0
  213. pyegeria/omvs/time_keeper.py +1761 -0
  214. pyegeria/omvs/valid_metadata.py +3221 -0
  215. pyegeria/omvs/valid_metadata_lists.py +37 -0
  216. pyegeria/omvs/valid_type_lists.py +37 -0
  217. pyegeria/view/__init__.py +28 -0
  218. pyegeria/{_output_format_models.py → view/_output_format_models.py} +160 -24
  219. pyegeria/view/_output_formats.py +14 -0
  220. pyegeria/view/base_report_formats.py +2719 -0
  221. pyegeria/view/dr_egeria_reports.py +56 -0
  222. pyegeria/view/format_set_executor.py +397 -0
  223. pyegeria/{md_processing_utils.py → view/md_processing_utils.py} +5 -5
  224. pyegeria/{mermaid_utilities.py → view/mermaid_utilities.py} +2 -154
  225. pyegeria/view/output_formatter.py +1297 -0
  226. pyegeria-5.5.3.3.dist-info/METADATA +218 -0
  227. pyegeria-5.5.3.3.dist-info/RECORD +241 -0
  228. {pyegeria-5.4.0.28.dist-info → pyegeria-5.5.3.3.dist-info}/WHEEL +2 -1
  229. pyegeria-5.5.3.3.dist-info/entry_points.txt +103 -0
  230. pyegeria-5.5.3.3.dist-info/top_level.txt +4 -0
  231. commands/cat/.DS_Store +0 -0
  232. commands/cat/.env +0 -8
  233. commands/cat/README.md +0 -16
  234. commands/cat/debug_log +0 -1126
  235. commands/cat/debug_log.2025-08-18_11-34-38_088636.zip +0 -0
  236. commands/cat/list_categories.py +0 -192
  237. commands/cat/logs/pyegeria.log +0 -4
  238. commands/cli/debug_log +0 -0
  239. commands/cli/debug_log.log +0 -0
  240. commands/cli/txt_custom_v2.tcss +0 -19
  241. commands/my/README.md +0 -17
  242. commands/ops/README.md +0 -24
  243. commands/ops/logs/pyegeria.log +0 -0
  244. commands/ops/monitor_asset_events.py +0 -108
  245. commands/tech/README.md +0 -24
  246. md_processing/.DS_Store +0 -0
  247. md_processing/dr-egeria-outbox/Collections-2025-08-12-13-30-37.md +0 -163
  248. md_processing/dr-egeria-outbox/Collections-2025-08-12-13-35-58.md +0 -474
  249. md_processing/dr_egeria_inbox/Derive-Dr-Gov-Defs.md +0 -8
  250. md_processing/dr_egeria_inbox/Dr.Egeria Templates.md +0 -873
  251. md_processing/dr_egeria_inbox/arch_test.md +0 -57
  252. md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +0 -254
  253. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +0 -696
  254. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +0 -254
  255. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +0 -298
  256. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +0 -608
  257. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +0 -94
  258. md_processing/dr_egeria_inbox/archive/freddie_intro.md +0 -284
  259. md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +0 -275
  260. md_processing/dr_egeria_inbox/archive/test-term.md +0 -110
  261. md_processing/dr_egeria_inbox/cat_test.md +0 -100
  262. md_processing/dr_egeria_inbox/collections.md +0 -39
  263. md_processing/dr_egeria_inbox/data_designer_debug.log +0 -6
  264. md_processing/dr_egeria_inbox/data_designer_out.md +0 -60
  265. md_processing/dr_egeria_inbox/data_designer_search_test.md +0 -11
  266. md_processing/dr_egeria_inbox/data_field.md +0 -54
  267. md_processing/dr_egeria_inbox/data_spec.md +0 -77
  268. md_processing/dr_egeria_inbox/data_spec_test.md +0 -2406
  269. md_processing/dr_egeria_inbox/data_test.md +0 -179
  270. md_processing/dr_egeria_inbox/data_test2.md +0 -429
  271. md_processing/dr_egeria_inbox/data_test3.md +0 -462
  272. md_processing/dr_egeria_inbox/dr_egeria_data_designer_1.md +0 -124
  273. md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +0 -168
  274. md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +0 -280
  275. md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +0 -318
  276. md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +0 -1073
  277. md_processing/dr_egeria_inbox/dr_egeria_isc1.md +0 -44
  278. md_processing/dr_egeria_inbox/generated_help_report.md +0 -9
  279. md_processing/dr_egeria_inbox/glossary_creation_experiment.ipynb +0 -341
  280. md_processing/dr_egeria_inbox/glossary_list.md +0 -5
  281. md_processing/dr_egeria_inbox/glossary_search_test.md +0 -40
  282. md_processing/dr_egeria_inbox/glossary_test1.md +0 -324
  283. md_processing/dr_egeria_inbox/gov_def.md +0 -482
  284. md_processing/dr_egeria_inbox/gov_def2.md +0 -447
  285. md_processing/dr_egeria_inbox/img.png +0 -0
  286. md_processing/dr_egeria_inbox/product.md +0 -211
  287. md_processing/dr_egeria_inbox/rel.md +0 -8
  288. md_processing/dr_egeria_inbox/sb.md +0 -119
  289. md_processing/dr_egeria_inbox/solution-components.md +0 -136
  290. md_processing/dr_egeria_inbox/solution_blueprints.md +0 -118
  291. md_processing/dr_egeria_inbox/synonym_test.md +0 -42
  292. md_processing/dr_egeria_inbox/t2.md +0 -268
  293. md_processing/dr_egeria_outbox/.obsidian/app.json +0 -1
  294. md_processing/dr_egeria_outbox/.obsidian/appearance.json +0 -1
  295. md_processing/dr_egeria_outbox/.obsidian/community-plugins.json +0 -6
  296. md_processing/dr_egeria_outbox/.obsidian/core-plugins.json +0 -31
  297. md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/data.json +0 -10
  298. md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/main.js +0 -4459
  299. md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/manifest.json +0 -10
  300. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/data.json +0 -3
  301. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/main.js +0 -153
  302. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/manifest.json +0 -11
  303. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/styles.css +0 -1
  304. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/main.js +0 -500
  305. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +0 -12
  306. md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/styles.css +0 -1
  307. md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/main.js +0 -37
  308. md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/manifest.json +0 -11
  309. md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/styles.css +0 -220
  310. md_processing/dr_egeria_outbox/.obsidian/types.json +0 -28
  311. md_processing/dr_egeria_outbox/.obsidian/workspace.json +0 -220
  312. md_processing/dr_egeria_outbox/Untitled.canvas +0 -1
  313. md_processing/dr_egeria_outbox/friday/processed-2025-08-22 21:22-dr_egeria_intro_part1.md +0 -312
  314. md_processing/dr_egeria_outbox/friday/processed-2025-08-22 21:23-dr_egeria_intro_part1.md +0 -265
  315. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:06-dr_egeria_intro_part1.md +0 -230
  316. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:30-dr_egeria_intro_part1.md +0 -296
  317. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:31-dr_egeria_intro_part1.md +0 -253
  318. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 16:08-dr_egeria_intro_part2.md +0 -343
  319. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 16:12-dr_egeria_intro_part2.md +0 -343
  320. md_processing/dr_egeria_outbox/monday/processed-2025-08-19 07:05-product.md +0 -426
  321. md_processing/dr_egeria_outbox/monday/processed-2025-08-19 07:56-product.md +0 -212
  322. md_processing/dr_egeria_outbox/monday/processed-2025-08-19 09:43-product.md +0 -201
  323. md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 14:55-product.md +0 -77
  324. md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 15:05-product.md +0 -75
  325. md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 15:11-product.md +0 -74
  326. md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 20:40-collections.md +0 -49
  327. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 15:00-Derive-Dr-Gov-Defs.md +0 -719
  328. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:13-Derive-Dr-Gov-Defs.md +0 -41
  329. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:14-Derive-Dr-Gov-Defs.md +0 -33
  330. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:50-Derive-Dr-Gov-Defs.md +0 -192
  331. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 22:08-gov_def2.md +0 -486
  332. md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 22:10-gov_def2.md +0 -486
  333. md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 08:53-gov_def2.md +0 -486
  334. md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 08:54-gov_def2.md +0 -486
  335. md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:03-gov_def2.md +0 -486
  336. md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:06-gov_def2.md +0 -486
  337. md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:10-gov_def2.md +0 -486
  338. md_processing/dr_egeria_outbox/tuesday/processed-2025-07-16 19:15-gov_def2.md +0 -527
  339. md_processing/dr_egeria_outbox/tuesday/processed-2025-07-17 12:08-gov_def2.md +0 -527
  340. md_processing/dr_egeria_outbox/tuesday/processed-2025-07-17 14:27-gov_def2.md +0 -485
  341. md_processing/dr_egeria_outbox/tuesday/processed-2025-08-19 10:55-product.md +0 -209
  342. md_processing/family_docs/Data Designer/Create_Data_Class.md +0 -164
  343. md_processing/family_docs/Data Designer/Create_Data_Dictionary.md +0 -30
  344. md_processing/family_docs/Data Designer/Create_Data_Field.md +0 -162
  345. md_processing/family_docs/Data Designer/Create_Data_Specification.md +0 -36
  346. md_processing/family_docs/Data Designer/Create_Data_Structure.md +0 -38
  347. md_processing/family_docs/Data Designer/View_Data_Classes.md +0 -78
  348. md_processing/family_docs/Data Designer/View_Data_Dictionaries.md +0 -78
  349. md_processing/family_docs/Data Designer/View_Data_Fields.md +0 -78
  350. md_processing/family_docs/Data Designer/View_Data_Specifications.md +0 -78
  351. md_processing/family_docs/Data Designer/View_Data_Structures.md +0 -78
  352. md_processing/family_docs/Data Designer.md +0 -842
  353. md_processing/family_docs/Digital Product Manager/Add_Member->Collection.md +0 -42
  354. md_processing/family_docs/Digital Product Manager/Attach_Collection->Resource.md +0 -36
  355. md_processing/family_docs/Digital Product Manager/Create_Agreement.md +0 -96
  356. md_processing/family_docs/Digital Product Manager/Create_Data_Sharing_Agreement.md +0 -72
  357. md_processing/family_docs/Digital Product Manager/Create_DigitalSubscription.md +0 -102
  358. md_processing/family_docs/Digital Product Manager/Create_Digital_Product.md +0 -134
  359. md_processing/family_docs/Digital Product Manager/Link_Agreement_Items.md +0 -60
  360. md_processing/family_docs/Digital Product Manager/Link_Contracts.md +0 -26
  361. md_processing/family_docs/Digital Product Manager/Link_Digital_Product_-_Digital_Product.md +0 -30
  362. md_processing/family_docs/Digital Product Manager/Link_Subscribers.md +0 -48
  363. md_processing/family_docs/Digital Product Manager.md +0 -668
  364. md_processing/family_docs/Glossary/Attach_Category_Parent.md +0 -18
  365. md_processing/family_docs/Glossary/Attach_Term-Term_Relationship.md +0 -26
  366. md_processing/family_docs/Glossary/Create_Category.md +0 -38
  367. md_processing/family_docs/Glossary/Create_Glossary.md +0 -42
  368. md_processing/family_docs/Glossary/Create_Term.md +0 -70
  369. md_processing/family_docs/Glossary.md +0 -206
  370. md_processing/family_docs/Governance Officer/Create_Business_Imperative.md +0 -106
  371. md_processing/family_docs/Governance Officer/Create_Certification_Type.md +0 -112
  372. md_processing/family_docs/Governance Officer/Create_Governance_Approach.md +0 -114
  373. md_processing/family_docs/Governance Officer/Create_Governance_Obligation.md +0 -114
  374. md_processing/family_docs/Governance Officer/Create_Governance_Principle.md +0 -114
  375. md_processing/family_docs/Governance Officer/Create_Governance_Procedure.md +0 -128
  376. md_processing/family_docs/Governance Officer/Create_Governance_Process.md +0 -122
  377. md_processing/family_docs/Governance Officer/Create_Governance_Processing_Purpose.md +0 -106
  378. md_processing/family_docs/Governance Officer/Create_Governance_Responsibility.md +0 -122
  379. md_processing/family_docs/Governance Officer/Create_Governance_Rule.md +0 -122
  380. md_processing/family_docs/Governance Officer/Create_Governance_Strategy.md +0 -106
  381. md_processing/family_docs/Governance Officer/Create_License_Type.md +0 -112
  382. md_processing/family_docs/Governance Officer/Create_Naming_Standard_Rule.md +0 -122
  383. md_processing/family_docs/Governance Officer/Create_Regulation_Article.md +0 -106
  384. md_processing/family_docs/Governance Officer/Create_Regulation_Definition.md +0 -118
  385. md_processing/family_docs/Governance Officer/Create_Security_Access_Control.md +0 -114
  386. md_processing/family_docs/Governance Officer/Create_Security_Group.md +0 -120
  387. md_processing/family_docs/Governance Officer/Create_Service_Level_Objectives.md +0 -122
  388. md_processing/family_docs/Governance Officer/Create_Threat_Definition.md +0 -106
  389. md_processing/family_docs/Governance Officer/Link_Governance_Controls.md +0 -32
  390. md_processing/family_docs/Governance Officer/Link_Governance_Drivers.md +0 -32
  391. md_processing/family_docs/Governance Officer/Link_Governance_Policies.md +0 -32
  392. md_processing/family_docs/Governance Officer/View_Governance_Definitions.md +0 -82
  393. md_processing/family_docs/Governance Officer.md +0 -2412
  394. md_processing/family_docs/Solution Architect/Create_Information_Supply_Chain.md +0 -70
  395. md_processing/family_docs/Solution Architect/Create_Solution_Blueprint.md +0 -44
  396. md_processing/family_docs/Solution Architect/Create_Solution_Component.md +0 -96
  397. md_processing/family_docs/Solution Architect/Create_Solution_Role.md +0 -66
  398. md_processing/family_docs/Solution Architect/Link_Information_Supply_Chain_Peers.md +0 -32
  399. md_processing/family_docs/Solution Architect/Link_Solution_Component_Peers.md +0 -32
  400. md_processing/family_docs/Solution Architect/View_Information_Supply_Chains.md +0 -32
  401. md_processing/family_docs/Solution Architect/View_Solution_Blueprints.md +0 -32
  402. md_processing/family_docs/Solution Architect/View_Solution_Components.md +0 -32
  403. md_processing/family_docs/Solution Architect/View_Solution_Roles.md +0 -32
  404. md_processing/family_docs/Solution Architect.md +0 -490
  405. md_processing/md_processing_utils/debug_log +0 -574
  406. md_processing/md_processing_utils/debug_log.log +0 -0
  407. md_processing/md_processing_utils/dr-egeria-help-2025-07-17T17:22:09.md +0 -2065
  408. md_processing/md_processing_utils/generated_help_terms.md +0 -842
  409. pyegeria/.DS_Store +0 -0
  410. pyegeria/README.md +0 -35
  411. pyegeria/_client_new.py +0 -1102
  412. pyegeria/_output_formats.py +0 -730
  413. pyegeria/asset_catalog_omvs.py +0 -864
  414. pyegeria/automated_curation_omvs.py +0 -3765
  415. pyegeria/config.py +0 -523
  416. pyegeria/egeria_my_client.py +0 -91
  417. pyegeria/feedback_manager_omvs.py +0 -4573
  418. pyegeria/load_config_orig.py +0 -218
  419. pyegeria/md_processing_helpers.py +0 -58
  420. pyegeria/md_processing_utils_orig.py +0 -1103
  421. pyegeria/metadata_explorer_omvs.py +0 -2326
  422. pyegeria/my_profile_omvs.py +0 -1022
  423. pyegeria/project_manager.py +0 -1591
  424. pyegeria/registered_info.py +0 -167
  425. pyegeria/template_manager_omvs.py +0 -1414
  426. pyegeria/utils.py +0 -256
  427. pyegeria-5.4.0.28.dist-info/METADATA +0 -77
  428. pyegeria-5.4.0.28.dist-info/RECORD +0 -343
  429. pyegeria-5.4.0.28.dist-info/entry_points.txt +0 -105
  430. /commands/cat/debug_log.log → /pyegeria/deprecated/__init__.py +0 -0
  431. /pyegeria/{_exceptions.py → deprecated/_exceptions.py} +0 -0
  432. /pyegeria/{collection_models.py → models/collection_models.py} +0 -0
  433. {pyegeria-5.4.0.28.dist-info → pyegeria-5.5.3.3.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,3221 @@
1
+ """
2
+ SPDX-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
+
9
+ import asyncio
10
+ from typing import Any, Optional
11
+ from pyegeria.core._server_client import ServerClient
12
+ from pyegeria.models import SearchStringRequestBody, ResultsRequestBody, FilterRequestBody, GetRequestBody, \
13
+ DeleteElementRequestBody
14
+ from pyegeria.core.utils import dict_to_markdown_list, dynamic_catch, body_slimmer
15
+ from pyegeria.core._globals import max_paging_size, NO_ELEMENTS_FOUND
16
+ from pyegeria.view.base_report_formats import select_report_spec, get_report_spec_match
17
+ from pyegeria.view.output_formatter import (
18
+ generate_output,
19
+ _extract_referenceable_properties,
20
+ populate_columns_from_properties,
21
+ get_required_relationships,
22
+ )
23
+
24
+
25
+ class ValidMetadataManager(ServerClient):
26
+ """The Valid Metadata OMVS provides APIs for retrieving and updating lists of valid metadata values.
27
+ For more details see: https://egeria-project.org/guides/planning/valid-values/overview/
28
+
29
+ Attributes:
30
+
31
+ view_server: str
32
+ The name of the View Server to connect to.
33
+ platform_url : str
34
+ URL of the server platform to connect to
35
+ user_id : str
36
+ The identity of the user calling the method - this sets a default optionally used by the methods
37
+ when the user doesn't pass the user_id on a method call.
38
+ user_pwd: str
39
+ The password associated with the user_id. Defaults to None
40
+
41
+ """
42
+
43
+ def __init__(
44
+ self,
45
+ view_server: str,
46
+ platform_url: str,
47
+ user_id: Optional[str] = None,
48
+ user_pwd: Optional[str] = None,
49
+ token: Optional[str] = None,
50
+ ):
51
+ self.view_server = view_server
52
+ self.platform_url = platform_url
53
+ self.user_id = user_id
54
+ self.user_pwd = user_pwd
55
+
56
+ self.valid_m_command_base: str = f"/api/open-metadata/valid-metadata"
57
+ self.page_size = max_paging_size
58
+ ServerClient.__init__(self, view_server, platform_url, user_id, user_pwd, token=token)
59
+
60
+ # Default entity label used by output formatter when a specific type is not supplied
61
+ self.REFERENCEABLE_LABEL = "Referenceable"
62
+
63
+ # ---------------------------
64
+ # Output formatting helpers
65
+ # ---------------------------
66
+ def _extract_referenceable_output_properties(self, element: dict, columns_struct: dict) -> dict:
67
+ """Populate requested columns from a generic Referenceable element.
68
+ Mirrors the approach used in other managers so report specs work consistently.
69
+ """
70
+ col_data = populate_columns_from_properties(element, columns_struct)
71
+ columns_list = col_data.get("formats", {}).get("attributes", [])
72
+
73
+ # Header-derived fields (GUID, qualifiedName, displayName, etc.)
74
+ header_props = _extract_referenceable_properties(element)
75
+ for col in columns_list:
76
+ key = col.get("key")
77
+ if key in header_props:
78
+ col["value"] = header_props.get(key)
79
+ elif isinstance(key, str) and key.lower() == "guid":
80
+ col["value"] = header_props.get("GUID")
81
+
82
+ # Relationships (generic handler fills requested relationship-driven columns if present)
83
+ col_data = get_required_relationships(element, col_data)
84
+
85
+ # Mermaid graph support if present
86
+ mermaid_val = element.get("mermaidGraph", "") or ""
87
+ for col in columns_list:
88
+ if col.get("key") == "mermaid":
89
+ col["value"] = mermaid_val
90
+ break
91
+
92
+ return col_data
93
+
94
+ def _generate_referenceable_output(
95
+ self,
96
+ elements: dict | list[dict],
97
+ filter_string : str | None,
98
+ element_type_name: str | None,
99
+ output_format: str = "DICT",
100
+ report_spec: dict | str | None = None,
101
+ ) -> str | list[dict]:
102
+ """Resolve format set and generate output for Referenceable-derived elements.
103
+
104
+ This aligns with the formatting workflow used by classification_manager and automated_curation.
105
+ """
106
+ entity_type = element_type_name or self.REFERENCEABLE_LABEL
107
+
108
+ # Resolve output format set
109
+ if report_spec:
110
+ if isinstance(report_spec, str):
111
+ output_formats = select_report_spec(report_spec, output_format)
112
+ else:
113
+ output_formats = get_report_spec_match(report_spec, output_format)
114
+ elif element_type_name:
115
+ output_formats = select_report_spec(element_type_name, output_format)
116
+ else:
117
+ output_formats = select_report_spec(entity_type, output_format)
118
+
119
+ if output_formats is None:
120
+ output_formats = select_report_spec("Default", output_format)
121
+
122
+ return generate_output(
123
+ elements,
124
+ filter,
125
+ entity_type,
126
+ output_format,
127
+ self._extract_referenceable_output_properties,
128
+ None,
129
+ output_formats,
130
+ )
131
+
132
+ def _extract_valid_value_output_properties(self, element: dict, columns_struct: dict) -> dict:
133
+ """Populate requested columns for valid value metadata. """
134
+ col_data = populate_columns_from_properties(element, columns_struct)
135
+ columns_list = col_data.get("formats", {}).get("attributes", [])
136
+
137
+ # if isinstance(element, dict):
138
+ # element = [element]
139
+
140
+ category = element.get("category", "---")
141
+ display_name = element.get("displayName", "---")
142
+ description = element.get("description", "---")
143
+ preferred_value = element.get("preferredValue", "---")
144
+ data_type = element.get("dataType", "---")
145
+ is_case_sensitive = element.get("isCaseSensitive", "---")
146
+ additional_properties = element.get("additionalProperties", "---")
147
+ property_name = element.get("propertyName", "---")
148
+ map_name = element.get("mapName", "---")
149
+ type_name = element.get("typeName", "---")
150
+
151
+
152
+ for column in columns_list:
153
+ key = column.get("key")
154
+ match key:
155
+ case 'category':
156
+ column["value"] = element.get("category", "---")
157
+ case 'display_name':
158
+ column["value"] = element.get("displayName", "---")
159
+ case 'description':
160
+ column["value"] = element.get("description", "---")
161
+ case 'preferred_value':
162
+ column["value"] = element.get("preferredValue", "---")
163
+ case 'data_type':
164
+ column["value"] = element.get("dataType", "---")
165
+ case 'is_case_sensitive':
166
+ column["value"] = element.get("isCaseSensitive", "---")
167
+ case 'property_name':
168
+ column["value"] = element.get("propertyName", "---")
169
+ case 'additional_properties':
170
+ additional_properties = element.get("additionalProperties", "---")
171
+ if isinstance(additional_properties, dict):
172
+ column["value"] = dict_to_markdown_list(additional_properties)
173
+ else:
174
+ column["value"] = additional_properties
175
+
176
+ return col_data
177
+
178
+ def _generate_valid_value_output(
179
+ self,
180
+ elements: dict | list[dict],
181
+ filter_string : str | None,
182
+ element_type_name: str | None,
183
+ output_format: str = "DICT",
184
+ report_spec: dict | str | None = None,
185
+ ) -> dict | str | list[dict]:
186
+ """Resolve format set and generate output for Referenceable-derived elements.
187
+
188
+ This aligns with the formatting workflow used by classification_manager and automated_curation.
189
+ """
190
+ entity_type = element_type_name or self.REFERENCEABLE_LABEL
191
+
192
+ # Resolve output format set
193
+ if report_spec:
194
+ if isinstance(report_spec, str):
195
+ output_formats = select_report_spec(report_spec, output_format)
196
+ else:
197
+ output_formats = get_report_spec_match(report_spec, output_format)
198
+ elif element_type_name:
199
+ output_formats = select_report_spec(element_type_name, output_format)
200
+ else:
201
+ output_formats = select_report_spec(entity_type, output_format)
202
+
203
+ if output_formats is None:
204
+ output_formats = select_report_spec("Default", output_format)
205
+
206
+ return generate_output(
207
+ elements,
208
+ filter,
209
+ entity_type,
210
+ output_format,
211
+ # self._extract_valid_value_output_properties,
212
+ populate_columns_from_properties,
213
+ None,
214
+ output_formats,
215
+ )
216
+
217
+ def _extract_entity_output_properties(self, element: dict, columns_struct: dict) -> dict:
218
+ """Populate requested columns from a generic Referenceable element.
219
+ Mirrors the approach used in other managers so report specs work consistently.
220
+ """
221
+ col_data = populate_columns_from_properties(element, columns_struct)
222
+ columns_list = col_data.get("formats", {}).get("attributes", [])
223
+
224
+ # Header-derived fields (GUID, qualifiedName, displayName, etc.)
225
+ header_props = _extract_referenceable_properties(element)
226
+ for col in columns_list:
227
+ key = col.get("key")
228
+ if key in header_props:
229
+ col["value"] = header_props.get(key)
230
+ elif isinstance(key, str) and key.lower() == "guid":
231
+ col["value"] = header_props.get("GUID")
232
+
233
+ # Relationships (generic handler fills requested relationship-driven columns if present)
234
+ col_data = get_required_relationships(element, col_data)
235
+
236
+ # Mermaid graph support if present
237
+ mermaid_val = element.get("mermaidGraph", "") or ""
238
+ for col in columns_list:
239
+ if col.get("key") == "mermaidGraph":
240
+ col["value"] = mermaid_val
241
+ break
242
+
243
+ return col_data
244
+
245
+ def _generate_entity_output(
246
+ self,
247
+ elements: dict | list[dict],
248
+ filter_string : str | None,
249
+ element_type_name: str | None,
250
+ output_format: str = "DICT",
251
+ report_spec: dict | str | None = None,
252
+ ) -> dict | str | list[dict]:
253
+ """Resolve format set and generate output for Referenceable-derived elements.
254
+
255
+ This aligns with the formatting workflow used by classification_manager and automated_curation.
256
+ """
257
+ entity_type = element_type_name if element_type_name is not None else self.REFERENCEABLE_LABEL
258
+ # Remove a layer of nesting in the JSON if the output_format is not MERMAID
259
+ if output_format != "MERMAID":
260
+ elements = elements["typeDefs"] if output_format != "MERMAID" else elements
261
+
262
+ # Resolve output format set
263
+ if report_spec:
264
+ if isinstance(report_spec, str):
265
+ output_formats = select_report_spec(report_spec, output_format)
266
+ else:
267
+ output_formats = get_report_spec_match(report_spec, output_format)
268
+ elif element_type_name:
269
+ output_formats = select_report_spec(element_type_name, output_format)
270
+ else:
271
+ output_formats = select_report_spec(entity_type, output_format)
272
+
273
+ if output_formats is None:
274
+ output_formats = select_report_spec("Default", output_format)
275
+
276
+ return generate_output(
277
+ elements,
278
+ filter,
279
+ entity_type,
280
+ output_format,
281
+ self._extract_entity_output_properties,
282
+ None,
283
+ output_formats,
284
+ )
285
+
286
+ async def _async_setup_valid_metadata_value(
287
+ self, property_name: str, type_name: str, body: dict
288
+ ):
289
+ """Create or update the valid value for a particular open metadata property name. If the typeName is null,
290
+ this valid value applies to properties of this name from all types. The valid value is stored in the
291
+ preferredValue property. If a valid value is already set up for this property (with overlapping effective dates)
292
+ then the valid value is updated. Async Version.
293
+
294
+ Parameters
295
+ ----------
296
+ property_name : str
297
+ The name of the property for which the valid metadata value is being set up.
298
+ type_name : str
299
+ The name of the type for the valid metadata value.
300
+ body : dict
301
+ The body of the request containing the details of the valid metadata value.
302
+
303
+
304
+ Returns
305
+ -------
306
+ No value is returned.
307
+
308
+ Raises
309
+ ------
310
+ PyegeriaInvalidParameterException
311
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
312
+ PyegeriaAPIException
313
+ Raised by the server when an issue arises in processing a valid request
314
+ NotAuthorizedException
315
+ The principle specified by the user_id does not have authorization for the requested action
316
+
317
+
318
+ Notes
319
+ -----
320
+
321
+ Payload structure similar to:
322
+ {
323
+ "displayName": "",
324
+ "description": "",
325
+ "preferredValue": "",
326
+ "dataType": "",
327
+ "isCaseSensitive": false,
328
+ "isDeprecated" : false,
329
+ "effectiveFrom" : "2024-09-30T20:00:00.000Z",
330
+ "effectiveTo" : "2025-09-30T20:00:00.000Z",
331
+ }
332
+ """
333
+
334
+ url = (
335
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/setup-value/{property_name}?"
336
+ f"typeName={type_name}"
337
+ )
338
+
339
+ await self._async_make_request("POST", url, body)
340
+ return
341
+
342
+ def setup_valid_metadata_value(
343
+ self, property_name: str, type_name: str, body: dict
344
+ ):
345
+ """Create or update the valid value for a particular open metadata property name. If the typeName is null,
346
+ this valid value applies to properties of this name from all types. The valid value is stored in the
347
+ preferredValue property. If a valid value is already set up for this property (with overlapping effective dates)
348
+ then the valid value is updated.
349
+
350
+ Parameters
351
+ ----------
352
+ property_name : str
353
+ The name of the property for which the valid metadata value is being set up.
354
+ type_name : str
355
+ The name of the type for the valid metadata value.
356
+ body : dict
357
+ The body of the request containing the details of the valid metadata value.
358
+
359
+
360
+ Returns
361
+ -------
362
+ None - this method does not return a value.
363
+
364
+ Raises
365
+ ------
366
+ PyegeriaInvalidParameterException
367
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
368
+ PyegeriaAPIException
369
+ Raised by the server when an issue arises in processing a valid request
370
+ NotAuthorizedException
371
+ The principle specified by the user_id does not have authorization for the requested action
372
+
373
+ Notes
374
+ -----
375
+
376
+ Payload structure similar to:
377
+ {
378
+ "displayName": "",
379
+ "description": "",
380
+ "preferredValue": "",
381
+ "dataType": "",
382
+ "isCaseSensitive": false,
383
+ "isDeprecated" : false,
384
+ "additionalProperties": {
385
+ "colour": "purple"
386
+ }
387
+ }
388
+ """
389
+ loop = asyncio.get_event_loop()
390
+ loop.run_until_complete(
391
+ self._async_setup_valid_metadata_value(property_name, type_name, body)
392
+ )
393
+ return
394
+
395
+ async def _async_setup_valid_metadata_map_name(
396
+ self, property_name: str, type_name: str, body: dict
397
+ ):
398
+ """Create or update the valid value for a name that can be stored in a particular open metadata property name.
399
+ This property is of type map from name to string. The mapName is stored in the preferredValue property of
400
+ validMetadataValue. If the typeName is null, this valid value applies to properties of this name from any
401
+ open metadata type. If a valid value is already set up for this property (with overlapping effective dates)
402
+ then the valid value is updated. Async Version.
403
+
404
+ Parameters
405
+ ----------
406
+ property_name : str
407
+ The name of the property to setup metadata map.
408
+ type_name : str
409
+ The type name of the property.
410
+ body : dict
411
+ The metadata map setup data.
412
+
413
+
414
+ Returns
415
+ -------
416
+ None
417
+ This method does not return any value.
418
+
419
+ Raises
420
+ ------
421
+ PyegeriaInvalidParameterException
422
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
423
+ PyegeriaAPIException
424
+ Raised by the server when an issue arises in processing a valid request
425
+ NotAuthorizedException
426
+ The principle specified by the user_id does not have authorization for the requested action
427
+
428
+
429
+ Notes
430
+ -----
431
+
432
+ Body strycture similar to:
433
+
434
+ {
435
+ "displayName": "",
436
+ "description": "",
437
+ "preferredValue": "put mapName value here",
438
+ "dataType": "",
439
+ "isCaseSensitive": false,
440
+ "isDeprecated" : false,
441
+ "effectiveFrom" : "2024-09-30T20:00:00.000Z",
442
+ "effectiveTo" : "2025-09-30T20:00:00.000Z"
443
+ }
444
+
445
+ """
446
+
447
+ url = (
448
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/setup-map-name/{property_name}?"
449
+ f"typeName={type_name}"
450
+ )
451
+
452
+ await self._async_make_request("POST", url, body)
453
+ return
454
+
455
+ def setup_valid_metadata_map_name(
456
+ self, property_name: str, type_name: str, body: dict
457
+ ):
458
+ """Create or update the valid value for a name that can be stored in a particular open metadata property name.
459
+ This property is of type map from name to string. The mapName is stored in the preferredValue property of
460
+ validMetadataValue. If the typeName is null, this valid value applies to properties of this name from any
461
+ open metadata type. If a valid value is already set up for this property (with overlapping effective dates)
462
+ then the valid value is updated.
463
+
464
+ Parameters
465
+ ----------
466
+ property_name : str
467
+ The name of the property to setup metadata map.
468
+ type_name : str
469
+ The type name of the property.
470
+ body : dict
471
+ The metadata map setup data.
472
+
473
+
474
+ Returns
475
+ -------
476
+ None
477
+ This method does not return any value.
478
+
479
+ Raises
480
+ ------
481
+ PyegeriaInvalidParameterException
482
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
483
+ PyegeriaAPIException
484
+ Raised by the server when an issue arises in processing a valid request
485
+ NotAuthorizedException
486
+ The principle specified by the user_id does not have authorization for the requested action
487
+
488
+
489
+ Notes
490
+ -----
491
+
492
+ Body strycture similar to:
493
+
494
+ {
495
+ "displayName": "",
496
+ "description": "",
497
+ "preferredValue": "put mapName value here",
498
+ "dataType": "",
499
+ "isCaseSensitive": false,
500
+ "isDeprecated" : false
501
+ }
502
+
503
+ """
504
+
505
+ loop = asyncio.get_event_loop()
506
+ loop.run_until_complete(
507
+ self._async_setup_valid_metadata_map_name(property_name, type_name, body)
508
+ )
509
+ return
510
+
511
+ async def _async_setup_valid_metadata_map_value(
512
+ self, property_name: str, map_name: str, type_name: str, body: dict
513
+ ) -> None:
514
+ """Create or update the valid value for a name that can be stored in a particular open metadata property name.
515
+ This property is of type map from name to string.
516
+ The valid value is stored in the preferredValue property of validMetadataValue.
517
+ If the typeName is null, this valid value applies to properties of this name from any open metadata type.
518
+ If a valid value is already set up for this property (with overlapping effective dates) then the valid value
519
+ is updated. Async version.
520
+
521
+ Parameters
522
+ ----------
523
+ property_name : str
524
+ The name of the property to setup metadata map.
525
+ type_name : str
526
+ The type name of the property.
527
+ map_name: str
528
+ The name of a map we associate a value with.
529
+ body : dict
530
+ The metadata map setup data.
531
+
532
+ Returns
533
+ -------
534
+ None
535
+ This method does not return any value.
536
+
537
+ Raises
538
+ ------
539
+ PyegeriaInvalidParameterException
540
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
541
+ PyegeriaAPIException
542
+ Raised by the server when an issue arises in processing a valid request
543
+ NotAuthorizedException
544
+ The principle specified by the user_id does not have authorization for the requested action
545
+
546
+
547
+ Notes
548
+ -----
549
+
550
+ Body strycture similar to:
551
+
552
+ {
553
+ "displayName": "",
554
+ "description": "",
555
+ "preferredValue": "put mapName value here",
556
+ "dataType": "",
557
+ "isCaseSensitive": false,
558
+ "effectiveFrom" : "2024-09-30T20:00:00.000Z",
559
+ "effectiveTo" : "2025-09-30T20:00:00.000Z"
560
+ }
561
+ """
562
+ url = (
563
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/setup-map-value/"
564
+ f"{property_name}/{map_name}?typeName={type_name}"
565
+ )
566
+
567
+ await self._async_make_request("POST", url, body)
568
+ return
569
+
570
+ def setup_valid_metadata_map_value(
571
+ self, property_name: str, map_name: str, type_name: str, body: dict
572
+ ) -> None:
573
+ """Create or update the valid value for a name that can be stored in a particular open metadata property name.
574
+ This property is of type map from name to string.
575
+ The valid value is stored in the preferredValue property of validMetadataValue.
576
+ If the typeName is null, this valid value applies to properties of this name from any open metadata type.
577
+ If a valid value is already set up for this property (with overlapping effective dates) then the valid value
578
+ is updated.
579
+
580
+ Parameters
581
+ ----------
582
+ property_name : str
583
+ The name of the property to setup metadata map.
584
+ type_name : str
585
+ The type name of the property.
586
+ map_name: str
587
+ The name of a map we associate a value with.
588
+ body : dict
589
+ The metadata map setup data.
590
+
591
+
592
+ Returns
593
+ -------
594
+ None
595
+ This method does not return a value.
596
+
597
+ Raises
598
+ ------
599
+ PyegeriaInvalidParameterException
600
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
601
+ PyegeriaAPIException
602
+ Raised by the server when an issue arises in processing a valid request
603
+ NotAuthorizedException
604
+ The principle specified by the user_id does not have authorization for the requested action
605
+
606
+
607
+ Notes
608
+ -----
609
+
610
+ Body structure similar to:
611
+
612
+ {
613
+ "displayName": "",
614
+ "description": "",
615
+ "preferredValue": "put mapName value here",
616
+ "dataType": "",
617
+ "isCaseSensitive": false,
618
+ }
619
+ """
620
+ loop = asyncio.get_event_loop()
621
+ loop.run_until_complete(
622
+ self._async_setup_valid_metadata_map_value(
623
+ property_name, map_name, type_name, body
624
+ )
625
+ )
626
+ return
627
+
628
+ async def _async_clear_valid_metadata_value(
629
+ self, property_name: str, type_name: str, preferred_value: str
630
+ ) -> None:
631
+ """Remove a valid value for a property. Async version.
632
+
633
+ Parameters
634
+ ----------
635
+ property_name : str
636
+ The name of the property to setup metadata map.
637
+ type_name : str
638
+ The type name of the property.
639
+ preferred_value: str
640
+ The reference valye to remove.
641
+
642
+ Returns
643
+ -------
644
+ None - This method does not return a value.
645
+
646
+ Raises
647
+ ------
648
+ PyegeriaInvalidParameterException
649
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
650
+ PyegeriaAPIException
651
+ Raised by the server when an issue arises in processing a valid request
652
+ NotAuthorizedException
653
+ The principle specified by the user_id does not have authorization for the requested action
654
+
655
+
656
+ """
657
+ url = (
658
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/clear-value/"
659
+ f"{property_name}?typeName={type_name}&preferredValue={preferred_value}"
660
+ )
661
+
662
+ await self._async_make_request("POST", url)
663
+ return
664
+
665
+ def clear_valid_metadata_value(
666
+ self, property_name: str, type_name: str, preferred_value: str
667
+ ) -> None:
668
+ """Remove a valid value for a property.
669
+
670
+ Parameters
671
+ ----------
672
+ property_name : str
673
+ The name of the property to setup metadata map.
674
+ type_name : str
675
+ The type name of the property.
676
+ preferred_value: str
677
+ The reference valye to remove.
678
+
679
+ Returns
680
+ -------
681
+ None - This method does not return a value.
682
+
683
+ Raises
684
+ ------
685
+ PyegeriaInvalidParameterException
686
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
687
+ PyegeriaAPIException
688
+ Raised by the server when an issue arises in processing a valid request
689
+ NotAuthorizedException
690
+ The principle specified by the user_id does not have authorization for the requested action
691
+
692
+
693
+ """
694
+ loop = asyncio.get_event_loop()
695
+ loop.run_until_complete(
696
+ self._async_clear_valid_metadata_value(
697
+ property_name, type_name, preferred_value
698
+ )
699
+ )
700
+ return
701
+
702
+ async def _async_clear_valid_metadata_map_name(
703
+ self,
704
+ property_name: str,
705
+ type_name: str,
706
+ map_name: str,
707
+ ):
708
+ """Remove a valid map name value for a property. The match is done on MapName name. Async version.
709
+
710
+ Parameters
711
+ ----------
712
+ property_name : str
713
+ The name of the property to setup metadata map.
714
+ type_name : str
715
+ The type name of the property.
716
+ map_name: str
717
+ The name of a map we associate a value with.
718
+
719
+ Returns
720
+ -------
721
+ None - This method does not return a value.
722
+
723
+ Raises
724
+ ------
725
+ PyegeriaInvalidParameterException
726
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
727
+ PyegeriaAPIException
728
+ Raised by the server when an issue arises in processing a valid request
729
+ NotAuthorizedException
730
+ The principle specified by the user_id does not have authorization for the requested action
731
+
732
+ """
733
+
734
+ url = (
735
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/clear-map-name/"
736
+ f"{property_name}?typeName={type_name}&mapName={map_name}"
737
+ )
738
+
739
+ await self._async_make_request("POST", url)
740
+ return
741
+
742
+ def clear_valid_metadata_map_name(
743
+ self,
744
+ property_name: str,
745
+ type_name: str,
746
+ map_name: str,
747
+ ):
748
+ """Remove a valid map name value for a property. The match is done on MapName name.
749
+
750
+ Parameters
751
+ ----------
752
+ property_name : str
753
+ The name of the property to setup metadata map.
754
+ type_name : str
755
+ The type name of the property.
756
+ map_name: str
757
+ The name of a map we associate a value with.
758
+
759
+ Returns
760
+ -------
761
+ None - This method does not return a value.
762
+
763
+ Raises
764
+ ------
765
+ PyegeriaInvalidParameterException
766
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
767
+ PyegeriaAPIException
768
+ Raised by the server when an issue arises in processing a valid request
769
+ NotAuthorizedException
770
+ The principle specified by the user_id does not have authorization for the requested action
771
+
772
+ """
773
+
774
+ loop = asyncio.get_event_loop()
775
+ loop.run_until_complete(
776
+ self._async_clear_valid_metadata_map_name(
777
+ property_name, type_name, map_name
778
+ )
779
+ )
780
+ return
781
+
782
+ async def _async_clear_valid_metadata_map_value(
783
+ self, property_name: str, type_name: str, map_name: str, preferred_value: str
784
+ ):
785
+ """Remove a valid map name value for a property. The match is done on preferred name. Async version.
786
+
787
+ Parameters
788
+ ----------
789
+ property_name : str
790
+ The name of the property to setup metadata map.
791
+ type_name : str
792
+ The type name of the property.
793
+ map_name: str
794
+ The name of the map to remove.
795
+ preferred_value: str
796
+ The value to remove.
797
+
798
+ Returns
799
+ -------
800
+ None - This method does not return a value.
801
+
802
+ Raises
803
+ ------
804
+ PyegeriaServerException
805
+
806
+ """
807
+
808
+ url = (
809
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/clear-map-value/"
810
+ f"{property_name}/{map_name}?typeName={type_name}&preferredValue={preferred_value}"
811
+ )
812
+
813
+ await self._async_make_request("POST", url)
814
+ return
815
+
816
+ def clear_valid_metadata_map_value(
817
+ self, property_name: str, type_name: str, map_name:str, preferred_value: str
818
+ ):
819
+ """Remove a valid map name value for a property. The match is done on preferred name.
820
+
821
+ Parameters
822
+ ----------
823
+ property_name : str
824
+ The name of the property to setup metadata map.
825
+ type_name : str
826
+ The type name of the property.
827
+ map_name: str
828
+ The name of the map to remove.
829
+ preferred_value: str
830
+ The value to remove.
831
+
832
+ Returns
833
+ -------
834
+ None - This method does not return a value.
835
+
836
+ Raises
837
+ ------
838
+ PyegeriaServerException
839
+
840
+ """
841
+
842
+ loop = asyncio.get_event_loop()
843
+ loop.run_until_complete(
844
+ self._async_clear_valid_metadata_map_value(
845
+ property_name, type_name, map_name, preferred_value
846
+ )
847
+ )
848
+ return
849
+
850
+ async def _async_validate_metadata_value(
851
+ self, property_name: str, type_name: str, actual_value: str
852
+ ) -> bool | str:
853
+ """Validate whether the value found in an open metadata property is valid. Async version.
854
+
855
+ Parameters
856
+ ----------
857
+ property_name : str
858
+ The name of the property to setup metadata map.
859
+ type_name : str
860
+ The type name of the property.
861
+ actual_value: str
862
+ The value to validate.
863
+
864
+ Returns
865
+ -------
866
+ Bool - True, if validated.
867
+
868
+ Raises
869
+ ------
870
+ PyegeriaInvalidParameterException
871
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
872
+ PyegeriaAPIException
873
+ Raised by the server when an issue arises in processing a valid request
874
+ NotAuthorizedException
875
+ The principle specified by the user_id does not have authorization for the requested action
876
+
877
+ """
878
+
879
+ url = (
880
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/validate-value/"
881
+ f"{property_name}?typeName={type_name}&actualValue={actual_value}"
882
+ )
883
+
884
+ response = await self._async_make_request("GET", url)
885
+ return response.json().get("flag", "No flag found")
886
+
887
+ def validate_metadata_value(
888
+ self, property_name: str, type_name: str, actual_value: str
889
+ ) -> bool | str:
890
+ """Validate whether the value found in an open metadata property is valid.
891
+
892
+ Parameters
893
+ ----------
894
+ property_name : str
895
+ The name of the property to setup metadata map.
896
+ type_name : str
897
+ The type name of the property.
898
+ actual_value: str
899
+ The value to validate.
900
+
901
+ Returns
902
+ -------
903
+ Bool - True, if validated.
904
+
905
+ Raises
906
+ ------
907
+ PyegeriaInvalidParameterException
908
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
909
+ PyegeriaAPIException
910
+ Raised by the server when an issue arises in processing a valid request
911
+ NotAuthorizedException
912
+ The principle specified by the user_id does not have authorization for the requested action
913
+
914
+ """
915
+
916
+ loop = asyncio.get_event_loop()
917
+ response = loop.run_until_complete(
918
+ self._async_validate_metadata_value(
919
+ property_name, type_name, actual_value
920
+ )
921
+ )
922
+ return response
923
+
924
+ async def _async_validate_metadata_map_name(
925
+ self, property_name: str, type_name: str, map_name: str
926
+ ) -> bool | str:
927
+ """Validate whether the name found in an open metadata map property is valid. Async version.
928
+
929
+ Parameters
930
+ ----------
931
+ property_name : str
932
+ The name of the property to setup metadata map.
933
+ type_name : str
934
+ The type name of the property.
935
+ map_name: str
936
+ The name of a map to validate.
937
+
938
+ Returns
939
+ -------
940
+ Bool - True, if validated.
941
+
942
+ Raises
943
+ ------
944
+ PyegeriaInvalidParameterException
945
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
946
+ PyegeriaAPIException
947
+ Raised by the server when an issue arises in processing a valid request
948
+ NotAuthorizedException
949
+ The principle specified by the user_id does not have authorization for the requested action
950
+
951
+ """
952
+
953
+ url = (
954
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/validate-map-name/"
955
+ f"{property_name}?typeName={type_name}&mapName={map_name}"
956
+ )
957
+
958
+ response = await self._async_make_request("GET", url)
959
+ return response.json().get("flag", "No flag found")
960
+
961
+ def validate_metadata_map_name(
962
+ self, property_name: str, type_name: str, map_name: str
963
+ ) -> bool | str:
964
+ """Validate whether the name found in an open metadata map property is valid.
965
+
966
+ Parameters
967
+ ----------
968
+ property_name : str
969
+ The name of the property to setup metadata map.
970
+ type_name : str
971
+ The type name of the property.
972
+ map_name: str
973
+ The name of a map to validate.
974
+
975
+ Returns
976
+ -------
977
+ Bool - True, if validated.
978
+
979
+ Raises
980
+ ------
981
+ PyegeriaInvalidParameterException
982
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
983
+ PyegeriaAPIException
984
+ Raised by the server when an issue arises in processing a valid request
985
+ NotAuthorizedException
986
+ The principle specified by the user_id does not have authorization for the requested action
987
+
988
+ """
989
+
990
+ loop = asyncio.get_event_loop()
991
+ response = loop.run_until_complete(
992
+ self._async_validate_metadata_map_name(property_name, type_name, map_name)
993
+ )
994
+ return response
995
+
996
+ async def _async_validate_metadata_map_value(
997
+ self, property_name: str, type_name: str, map_name: str, actual_value: str
998
+ ) -> bool | str:
999
+ """Validate whether the name found in an open metadata map property is valid. Async version.
1000
+
1001
+ Parameters
1002
+ ----------
1003
+ property_name : str
1004
+ The name of the property to setup metadata map.
1005
+ type_name : str
1006
+ The type name of the property.
1007
+ map_name: str
1008
+ The name of a map to validate.
1009
+ actual_value: str
1010
+ The actual value associated with the map to validate.
1011
+
1012
+ Returns
1013
+ -------
1014
+ Bool - True, if validated.
1015
+
1016
+ Raises
1017
+ ------
1018
+ PyegeriaInvalidParameterException
1019
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1020
+ PyegeriaAPIException
1021
+ Raised by the server when an issue arises in processing a valid request
1022
+ NotAuthorizedException
1023
+ The principle specified by the user_id does not have authorization for the requested action
1024
+
1025
+ """
1026
+
1027
+ url = (
1028
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/validate-map-value/"
1029
+ f"{property_name}/{map_name}?typeName={type_name}&actualValue={actual_value}"
1030
+ )
1031
+
1032
+ response = await self._async_make_request("GET", url)
1033
+ return response.json().get("flag", "No flag found")
1034
+
1035
+ def validate_metadata_map_value(
1036
+ self, property_name: str, type_name: str, map_name: str, actual_value: str
1037
+ ) -> bool | str:
1038
+ """Validate whether the name found in an open metadata map property is valid.
1039
+
1040
+ Parameters
1041
+ ----------
1042
+ property_name : str
1043
+ The name of the property to setup metadata map.
1044
+ type_name : str
1045
+ The type name of the property.
1046
+ map_name: str
1047
+ The name of a map to validate.
1048
+ actual_value: str
1049
+ The actual value associated with the map to validate.
1050
+
1051
+ Returns
1052
+ -------
1053
+ Bool - True, if validated.
1054
+
1055
+ Raises
1056
+ ------
1057
+ PyegeriaInvalidParameterException
1058
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1059
+ PyegeriaAPIException
1060
+ Raised by the server when an issue arises in processing a valid request
1061
+ NotAuthorizedException
1062
+ The principle specified by the user_id does not have authorization for the requested action
1063
+
1064
+ """
1065
+
1066
+ loop = asyncio.get_event_loop()
1067
+ response = loop.run_until_complete(
1068
+ self._async_validate_metadata_map_value(
1069
+ property_name, type_name, map_name, actual_value
1070
+ )
1071
+ )
1072
+ return response
1073
+
1074
+ async def _async_get_valid_metadata_value(
1075
+ self,
1076
+ property_name: str,
1077
+ type_name: str,
1078
+ preferred_value: str,
1079
+ output_format: str = "JSON",
1080
+ report_spec: dict | str | None = None,
1081
+ ) -> dict | str | list[dict]:
1082
+ """Retrieve details of a specific valid value for a property. Async version.
1083
+
1084
+ Parameters
1085
+ ----------
1086
+ property_name : str
1087
+ The name of the property to setup metadata map.
1088
+ type_name : str
1089
+ The type name of the property.
1090
+ preferred_value: str
1091
+ The preferred value of the property.
1092
+
1093
+ Parameters
1094
+ ----------
1095
+ output_format: str, default = "JSON"
1096
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1097
+ report_spec: dict | str | None
1098
+ Output format set to use. If None, the default output format set is used.
1099
+
1100
+ Returns
1101
+ -------
1102
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
1103
+
1104
+ Raises
1105
+ ------
1106
+ PyegeriaException
1107
+
1108
+ """
1109
+
1110
+ url = (
1111
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/get-value/"
1112
+ f"{property_name}?typeName={type_name}&preferredValue={preferred_value}"
1113
+ )
1114
+
1115
+ response = await self._async_make_request("GET", url)
1116
+ element = response.json().get("element", NO_ELEMENTS_FOUND)
1117
+ if element == NO_ELEMENTS_FOUND:
1118
+ return NO_ELEMENTS_FOUND
1119
+ if output_format != "JSON":
1120
+ return self._generate_valid_value_output(element, preferred_value, "ValidMetadataValue",
1121
+ output_format, report_spec)
1122
+ return element
1123
+
1124
+ def get_valid_metadata_value(
1125
+ self,
1126
+ property_name: str,
1127
+ type_name: str,
1128
+ preferred_value: str,
1129
+ output_format: str = "JSON",
1130
+ report_spec: dict | str | None = None,
1131
+ ) -> dict | str | list[dict]:
1132
+ """Retrieve details of a specific valid value for a property.
1133
+
1134
+ Parameters
1135
+ ----------
1136
+ property_name : str
1137
+ The name of the property to setup metadata map.
1138
+ type_name : str
1139
+ The type name of the property.
1140
+ preferred_value: str
1141
+ The preferred value of the property.
1142
+
1143
+ Parameters
1144
+ ----------
1145
+ output_format: str, default = "JSON"
1146
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1147
+ report_spec: dict | str | None
1148
+ Output format set to use. If None, the default output format set is used.
1149
+
1150
+ Returns
1151
+ -------
1152
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
1153
+
1154
+ Raises
1155
+ ------
1156
+ PyegeriaException
1157
+
1158
+ """
1159
+ loop = asyncio.get_event_loop()
1160
+ response = loop.run_until_complete(
1161
+ self._async_get_valid_metadata_value(
1162
+ property_name, type_name, preferred_value, output_format=output_format, report_spec=report_spec
1163
+ )
1164
+ )
1165
+ return response
1166
+
1167
+ async def _async_get_valid_metadata_map_name(
1168
+ self,
1169
+ property_name: str,
1170
+ type_name: str,
1171
+ map_name: str,
1172
+ output_format: str = "JSON",
1173
+ report_spec: dict | str | None = None,
1174
+ ) -> dict | str | list[dict]:
1175
+ """Retrieve details of a specific valid name for a map property. Async version.
1176
+
1177
+ Parameters
1178
+ ----------
1179
+ property_name : str
1180
+ The name of the property to setup metadata map.
1181
+ type_name : str
1182
+ The type name of the property.
1183
+ map_name: str
1184
+ Map to return details of.
1185
+
1186
+ Parameters
1187
+ ----------
1188
+ output_format: str, default = "JSON"
1189
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1190
+ report_spec: dict | str | None
1191
+ Output format set to use. If None, the default output format set is used.
1192
+
1193
+ Returns
1194
+ -------
1195
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
1196
+
1197
+ Raises
1198
+ ------
1199
+ PyegeriaException
1200
+
1201
+ """
1202
+
1203
+ url = (
1204
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/get-map-name/"
1205
+ f"{property_name}?typeName={type_name}&mapName={map_name}"
1206
+ )
1207
+
1208
+ response = await self._async_make_request("GET", url)
1209
+ element = response.json().get("element", NO_ELEMENTS_FOUND)
1210
+ if element == NO_ELEMENTS_FOUND:
1211
+ return NO_ELEMENTS_FOUND
1212
+ if output_format != "JSON":
1213
+ return self._generate_valid_value_output(element, map_name, "ValidMetadataValue",
1214
+ output_format, report_spec)
1215
+ return element
1216
+
1217
+ def get_valid_metadata_map_name(
1218
+ self,
1219
+ property_name: str,
1220
+ type_name: str,
1221
+ map_name: str,
1222
+ output_format: str = "JSON",
1223
+ report_spec: dict | str | None = None,
1224
+ ) -> dict | str | list[dict]:
1225
+ """Retrieve details of a specific valid name for a map property.
1226
+
1227
+ Parameters
1228
+ ----------
1229
+ property_name : str
1230
+ The name of the property to setup metadata map.
1231
+ type_name : str
1232
+ The type name of the property.
1233
+ map_name: str
1234
+ Map to return details of.
1235
+
1236
+ Parameters
1237
+ ----------
1238
+ output_format: str, default = "JSON"
1239
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1240
+ report_spec: dict | str | None
1241
+ Output format set to use. If None, the default output format set is used.
1242
+
1243
+ Returns
1244
+ -------
1245
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
1246
+
1247
+ Raises
1248
+ ------
1249
+ PyegeriaException
1250
+
1251
+ """
1252
+ loop = asyncio.get_event_loop()
1253
+ response = loop.run_until_complete(
1254
+ self._async_get_valid_metadata_map_name(property_name, type_name, map_name,
1255
+ output_format=output_format, report_spec=report_spec)
1256
+ )
1257
+ return response
1258
+
1259
+ async def _async_get_valid_metadata_map_value(
1260
+ self,
1261
+ property_name: str,
1262
+ type_name: str,
1263
+ preferred_value: str,
1264
+ map_name: str,
1265
+ output_format: str = "JSON",
1266
+ report_spec: dict | str | None = None,
1267
+ ) -> dict | str | list[dict]:
1268
+ """Retrieve details of a specific valid value for a map property. Async version.
1269
+
1270
+ Parameters
1271
+ ----------
1272
+ property_name : str
1273
+ The name of the property to setup metadata map.
1274
+ type_name : str
1275
+ The type name of the property.
1276
+ preferred_value: str
1277
+ Preferred value to return details of.
1278
+ map_name: str
1279
+ Map to return details of.
1280
+ output_format: str, default = "JSON"
1281
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1282
+ report_spec: dict | str | None
1283
+ Output format set to use. If None, the default output format set is used.
1284
+
1285
+ Returns
1286
+ -------
1287
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
1288
+
1289
+ Raises
1290
+ ------
1291
+ PyegeriaException
1292
+
1293
+ Args:
1294
+ map_name ():
1295
+
1296
+ """
1297
+
1298
+ url = (
1299
+ f'{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/get-map-value/'
1300
+ f'{property_name}/{map_name}'
1301
+ # f'?typeName={type_name}&preferredValue={preferred_value}'
1302
+ )
1303
+ params = { "typeName": type_name , "preferredValue": preferred_value }
1304
+ response = await self._async_make_request("GET", url, params = params)
1305
+ element = response.json().get("element", NO_ELEMENTS_FOUND)
1306
+ if element == NO_ELEMENTS_FOUND:
1307
+ return NO_ELEMENTS_FOUND
1308
+ if output_format != "JSON":
1309
+ return self._generate_referenceable_output(element, preferred_value, "ValidMetadataValue",
1310
+ output_format, report_spec)
1311
+ return element
1312
+
1313
+ def get_valid_metadata_map_value(
1314
+ self,
1315
+ property_name: str,
1316
+ type_name: str,
1317
+ preferred_value: str,
1318
+ map_name: str,
1319
+ output_format: str = "JSON",
1320
+ report_spec: dict | str | None = None,
1321
+ ) -> dict | str | list[dict]:
1322
+ """Retrieve details of a specific valid value for a map property.
1323
+
1324
+ Parameters
1325
+ ----------
1326
+ property_name : str
1327
+ The name of the property to setup metadata map.
1328
+ type_name : str
1329
+ The type name of the property.
1330
+ preferred_value: str
1331
+ Preferred value to return details of.
1332
+ map_name: str
1333
+ Map to return details of.
1334
+
1335
+ output_format: str, default = "JSON"
1336
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1337
+ report_spec: dict | str | None
1338
+ Output format set to use. If None, the default output format set is used.
1339
+
1340
+ Returns
1341
+ -------
1342
+ Dict if the value is found, otherwise an str indicating the value wasn't found.
1343
+
1344
+ Raises
1345
+ ------
1346
+ PyegeriaException
1347
+
1348
+ Args:
1349
+ map_name ():
1350
+
1351
+ """
1352
+ loop = asyncio.get_event_loop()
1353
+ response = loop.run_until_complete(
1354
+ self._async_get_valid_metadata_map_value(property_name, type_name, preferred_value, map_name,
1355
+ output_format=output_format, report_spec=report_spec)
1356
+ )
1357
+ return response
1358
+
1359
+ async def _async_get_valid_metadata_values(
1360
+ self,
1361
+ property_name: str,
1362
+ type_name: Optional[str] = None,
1363
+ start_from: int = 0,
1364
+ page_size: int = None,
1365
+ output_format: str = "JSON",
1366
+ report_spec: dict | str | None = None,
1367
+ ) -> dict | list | str:
1368
+ """Retrieve list of values for the property. Async version.
1369
+
1370
+ Parameters
1371
+ ----------
1372
+ property_name: str
1373
+ The property to query.
1374
+ type_name: str, opt
1375
+ The Open Metadata type to get the property values for. If not specified then all property values
1376
+ will be returned.
1377
+ start_from: int, opt
1378
+ Page to start from.
1379
+ page_size: int, opt
1380
+ Number of elements to return per page - if None, then default for class will be used.
1381
+
1382
+
1383
+ Parameters
1384
+ ----------
1385
+ output_format: str, default = "JSON"
1386
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1387
+ report_spec: dict | str | None
1388
+ Output format set to use. If None, the default output format set is used.
1389
+
1390
+ Returns
1391
+ -------
1392
+ List | str
1393
+
1394
+ A list of collections linked off of the supplied element.
1395
+
1396
+ Raises
1397
+ ------
1398
+
1399
+ PyegeriaInvalidParameterException
1400
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1401
+ PyegeriaAPIException
1402
+ Raised by the server when an issue arises in processing a valid request
1403
+ NotAuthorizedException
1404
+ The principle specified by the user_id does not have authorization for the requested action
1405
+
1406
+ """
1407
+
1408
+ if page_size is None:
1409
+ page_size = self.page_size
1410
+
1411
+ url = (
1412
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/get-valid-metadata-values/{property_name}"
1413
+ f"?typeName={type_name}&startFrom={start_from}&pageSize={page_size}"
1414
+ )
1415
+
1416
+ resp = await self._async_make_request("GET", url)
1417
+ elements = resp.json().get("elements", NO_ELEMENTS_FOUND)
1418
+ if elements == NO_ELEMENTS_FOUND or elements is None or elements == []:
1419
+ return NO_ELEMENTS_FOUND
1420
+ if output_format != "JSON":
1421
+ return self._generate_valid_value_output(elements, property_name, "ValidMetadataValue",
1422
+ output_format, report_spec)
1423
+ return elements
1424
+
1425
+ def get_valid_metadata_values(
1426
+ self,
1427
+ property_name: str,
1428
+ type_name: Optional[str] = None,
1429
+ start_from: int = 0,
1430
+ page_size: int = None,
1431
+ output_format: str = "JSON",
1432
+ report_spec: dict | str | None = None,
1433
+ ) -> dict | list | str:
1434
+ """Retrieve list of values for the property.
1435
+
1436
+ Parameters
1437
+ ----------
1438
+ property_name: str
1439
+ The property to query.
1440
+ type_name: str, opt
1441
+ The Open Metadata type to get the property values for. If not specified then all property values
1442
+ will be returned.
1443
+ start_from: int, opt
1444
+ Page to start from.
1445
+ page_size: int, opt
1446
+ Number of elements to return per page - if None, then default for class will be used.
1447
+
1448
+ Parameters
1449
+ ----------
1450
+ output_format: str, default = "JSON"
1451
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1452
+ report_spec: dict | str | None
1453
+ Output format set to use. If None, the default output format set is used.
1454
+
1455
+ Returns
1456
+ -------
1457
+ List | str
1458
+
1459
+ A list of collections linked off of the supplied element.
1460
+
1461
+ Raises
1462
+ ------
1463
+
1464
+ PyegeriaInvalidParameterException
1465
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1466
+ PyegeriaAPIException
1467
+ Raised by the server when an issue arises in processing a valid request
1468
+ NotAuthorizedException
1469
+ The principle specified by the user_id does not have authorization for the requested action
1470
+
1471
+ """
1472
+ loop = asyncio.get_event_loop()
1473
+ resp = loop.run_until_complete(
1474
+ self._async_get_valid_metadata_values(
1475
+ property_name, type_name, start_from, page_size, output_format=output_format, report_spec=report_spec
1476
+ )
1477
+ )
1478
+ return resp
1479
+
1480
+ async def _async_get_consistent_metadata_values(
1481
+ self,
1482
+ property_name: str,
1483
+ type_name: str,
1484
+ map_name: str,
1485
+ preferred_value: str,
1486
+ start_from: int = 0,
1487
+ page_size: int = 0,
1488
+ output_format: str = "JSON",
1489
+ report_spec: dict | str | None = None,
1490
+ ) -> list | str:
1491
+ """Retrieve all the consistent valid values for the requested property. Async version.
1492
+
1493
+ Parameters
1494
+ ----------
1495
+ property_name : str
1496
+ The name of the property to retrieve the valid values for.
1497
+ type_name : str
1498
+ The open metadata type that the property is associated with.
1499
+ map_name : str
1500
+ A valid map name that associates a property with a value.
1501
+ preferred_value : str
1502
+ Preferred value to return details of.
1503
+ start_from: int, [default=0], optional
1504
+ When multiple pages of results are available, the page number to start from.
1505
+ page_size: int, [default=None]
1506
+ The number of items to return in a single page. If not specified, the default will be taken from
1507
+ the class instance.
1508
+
1509
+ Returns
1510
+ -------
1511
+ List | str
1512
+
1513
+ A list of collections linked off of the supplied element.
1514
+
1515
+ Raises
1516
+ ------
1517
+
1518
+ PyegeriaInvalidParameterException
1519
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1520
+ PyegeriaAPIException
1521
+ Raised by the server when an issue arises in processing a valid request
1522
+ NotAuthorizedException
1523
+ The principle specified by the user_id does not have authorization for the requested action
1524
+
1525
+ """
1526
+ params = {
1527
+ "typeName": type_name,
1528
+ "mapName": map_name,
1529
+ "preferredValue": preferred_value,
1530
+ "startFrom": str(start_from),
1531
+ "pageSize": str(page_size)
1532
+ }
1533
+ params_s = body_slimmer(params)
1534
+ url = (
1535
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/{property_name}/"
1536
+ f"consistent-metadata-values"
1537
+ )
1538
+
1539
+ resp = await self._async_make_request("GET", url, params=params_s)
1540
+ elements = resp.json().get("elements", NO_ELEMENTS_FOUND)
1541
+ if elements == NO_ELEMENTS_FOUND or elements is None or elements == []:
1542
+ return NO_ELEMENTS_FOUND
1543
+ if output_format != "JSON":
1544
+ return self._generate_referenceable_output(elements, preferred_value, "ValidMetadataValue",
1545
+ output_format, report_spec)
1546
+ return elements
1547
+
1548
+ def get_consistent_metadata_values(
1549
+ self,
1550
+ property_name: str,
1551
+ type_name: str,
1552
+ map_name: str,
1553
+ preferred_value: str,
1554
+ start_from: int = 0,
1555
+ page_size: int = 0,
1556
+ output_format: str = "JSON",
1557
+ report_spec: dict | str | None = None,
1558
+ ) -> list | str:
1559
+ """Retrieve all the consistent valid values for the requested property.
1560
+
1561
+ Parameters
1562
+ ----------
1563
+ property_name : str
1564
+ The name of the property to retrieve the valid values for.
1565
+ type_name : str
1566
+ The open metadata type that the property is associated with.
1567
+ map_name : str
1568
+ A valid map name that associates a property with a value.
1569
+ preferred_value : str
1570
+
1571
+
1572
+ start_from: int, [default=0], optional
1573
+ When multiple pages of results are available, the page number to start from.
1574
+ page_size: int, [default=None]
1575
+ The number of items to return in a single page. If not specified, the default will be taken from
1576
+ the class instance.
1577
+ Parameters
1578
+ ----------
1579
+ output_format: str, default = "JSON"
1580
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1581
+ report_spec: dict | str | None
1582
+ Output format set to use. If None, the default output format set is used.
1583
+
1584
+ Returns
1585
+ -------
1586
+ List | str
1587
+
1588
+ A list of collections linked off of the supplied element.
1589
+
1590
+ Raises
1591
+ ------
1592
+
1593
+ PyegeriaInvalidParameterException
1594
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1595
+ PyegeriaAPIException
1596
+ Raised by the server when an issue arises in processing a valid request
1597
+ NotAuthorizedException
1598
+ The principle specified by the user_id does not have authorization for the requested action
1599
+
1600
+ """
1601
+ loop = asyncio.get_event_loop()
1602
+ resp = loop.run_until_complete(
1603
+ self._async_get_consistent_metadata_values(
1604
+ property_name,
1605
+ type_name,
1606
+ map_name,
1607
+ preferred_value,
1608
+ start_from,
1609
+ page_size,
1610
+ output_format=output_format,
1611
+ report_spec=report_spec,
1612
+ )
1613
+ )
1614
+ return resp
1615
+
1616
+ async def _async_set_consistent_metadata_values(
1617
+ self,
1618
+ property_name1: str,
1619
+ type_name1: str,
1620
+ map_name1: str ,
1621
+ preferred_value1: str,
1622
+ property_name2: str,
1623
+ type_name2: str ,
1624
+ map_name2: str,
1625
+ preferred_value2: str,
1626
+ ) -> None:
1627
+ """Set up consistent metadata values relationship between the two property values. Async version.
1628
+
1629
+ Parameters
1630
+ ----------
1631
+ property_name1 : str
1632
+ The name of the first property.
1633
+ property_name2 : str
1634
+ The name of the second property.
1635
+ type_name1 : str
1636
+ The open metadata type that property1 is associated with.
1637
+ map_name1 : str
1638
+ First valid map name.
1639
+ preferred_value1 : str
1640
+ First preferred value.
1641
+ type_name2 : str
1642
+ The open metadata type that property2 is associated with.
1643
+ map_name2 : str
1644
+ Second valid map name.
1645
+ preferred_value2 : str
1646
+ Second preferred value.
1647
+
1648
+ Returns
1649
+ -------
1650
+ None
1651
+
1652
+ Raises
1653
+ ------
1654
+ PyegeriaInvalidParameterException
1655
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1656
+ PyegeriaAPIException
1657
+ Raised by the server when an issue arises in processing a valid request
1658
+ NotAuthorizedException
1659
+ The principle specified by the user_id does not have authorization for the requested action
1660
+
1661
+ """
1662
+ params = {
1663
+ "typeName1": type_name1,
1664
+ "typeName2": type_name2,
1665
+ "mapName1": map_name1,
1666
+ "mapName2": map_name2,
1667
+ "preferredValue1": preferred_value1,
1668
+ "preferredValue2": preferred_value2,
1669
+ }
1670
+ params_s = body_slimmer(params)
1671
+
1672
+ url = (
1673
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/{property_name1}/"
1674
+ f"consistent-metadata-values/{property_name2}"
1675
+ )
1676
+
1677
+ await self._async_make_request("POST", url, params=params_s)
1678
+ return
1679
+
1680
+ def set_consistent_metadata_values(
1681
+ self,
1682
+ property_name1: str,
1683
+ type_name1: str,
1684
+ map_name1: str,
1685
+ preferred_value1: str,
1686
+ property_name2: str,
1687
+ type_name2: str,
1688
+ map_name2: str,
1689
+ preferred_value2: str,
1690
+ ) -> None:
1691
+ """Set up consistent metadata values relationship between the two property values.
1692
+
1693
+ Parameters
1694
+ ----------
1695
+ property_name1 : str
1696
+ The name of the first property.
1697
+ property_name2 : str
1698
+ The name of the second property.
1699
+ type_name1 : str
1700
+ The open metadata type that property1 is associated with.
1701
+ map_name1 : str
1702
+ First valid map name.
1703
+ preferred_value1 : str
1704
+ First preferred value.
1705
+ type_name2 : str
1706
+ The open metadata type that property2 is associated with.
1707
+ map_name2 : str
1708
+ Second valid map name.
1709
+ preferred_value2 : str
1710
+ Second preferred value.
1711
+
1712
+ Returns
1713
+ -------
1714
+ None
1715
+
1716
+ Raises
1717
+ ------
1718
+ PyegeriaInvalidParameterException
1719
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1720
+ PyegeriaAPIException
1721
+ Raised by the server when an issue arises in processing a valid request
1722
+ NotAuthorizedException
1723
+ The principle specified by the user_id does not have authorization for the requested action
1724
+
1725
+ """
1726
+ loop = asyncio.get_event_loop()
1727
+ loop.run_until_complete(
1728
+ self._async_set_consistent_metadata_values(property_name1, type_name1, map_name1, preferred_value1,
1729
+ property_name2, type_name2, map_name2, preferred_value2)
1730
+ )
1731
+ return
1732
+
1733
+ #
1734
+ # Get all ...
1735
+ #
1736
+ async def _async_get_all_entity_types(self,
1737
+ output_format: str = "JSON",
1738
+ report_spec: dict | str | None = None) -> dict | list | str:
1739
+ """Returns the list of different types of metadata organized into two groups. The first are the
1740
+ attribute type definitions (AttributeTypeDefs). These provide types for attributes in full
1741
+ type definitions. Full type definitions (TypeDefs) describe types for entities, relationships
1742
+ and classifications. Async version.
1743
+
1744
+ Parameters
1745
+ ----------
1746
+
1747
+
1748
+ Parameters
1749
+ ----------
1750
+ output_format: str, default = "JSON"
1751
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1752
+ report_spec: dict | str | None
1753
+ Output format set to use. If None, the default output format set is used.
1754
+
1755
+ Returns
1756
+ -------
1757
+ List | str
1758
+
1759
+ A list of all entity types.
1760
+
1761
+ Raises
1762
+ ------
1763
+
1764
+ PyegeriaException
1765
+
1766
+ """
1767
+
1768
+ url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types"
1769
+
1770
+ resp = await self._async_make_request("GET", url)
1771
+ elements = resp.json().get("typeDefs", NO_ELEMENTS_FOUND)
1772
+ if elements == NO_ELEMENTS_FOUND:
1773
+ return NO_ELEMENTS_FOUND
1774
+ if output_format != "JSON":
1775
+ # Treat returned structure generically as TypeDef listing
1776
+ return self._generate_entity_output(elements, None, "TypeDef", output_format, report_spec)
1777
+ return elements
1778
+
1779
+ def get_all_entity_types(self,
1780
+ output_format: str = "JSON",
1781
+ report_spec: dict | str | None = None) -> dict | list | str:
1782
+ """Returns the list of different types of metadata organized into two groups. The first are the
1783
+ attribute type definitions (AttributeTypeDefs). These provide types for attributes in full
1784
+ type definitions. Full type definitions (TypeDefs) describe types for entities, relationships
1785
+ and classifications. Async version.
1786
+
1787
+ Parameters
1788
+ ----------
1789
+
1790
+
1791
+ Parameters
1792
+ ----------
1793
+ output_format: str, default = "JSON"
1794
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1795
+ report_spec: dict | str | None
1796
+ Output format set to use. If None, the default output format set is used.
1797
+
1798
+ Returns
1799
+ -------
1800
+ List | str
1801
+
1802
+ A list of all entity types.
1803
+
1804
+ Raises
1805
+ ------
1806
+
1807
+ PyegeriaException
1808
+
1809
+ """
1810
+ loop = asyncio.get_event_loop()
1811
+ resp = loop.run_until_complete(self._async_get_all_entity_types(output_format=output_format,
1812
+ report_spec=report_spec))
1813
+ return resp
1814
+
1815
+ async def _async_get_all_entity_defs(self,
1816
+ output_format: str = "JSON",
1817
+ report_spec: dict | str | None = None) -> dict | list | str:
1818
+ """GReturns all the entity type definitions. Async version.
1819
+
1820
+ Parameters
1821
+ ----------
1822
+
1823
+
1824
+ Parameters
1825
+ ----------
1826
+ output_format: str, default = "JSON"
1827
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1828
+ report_spec: dict | str | None
1829
+ Output format set to use. If None, the default output format set is used.
1830
+
1831
+ Returns
1832
+ -------
1833
+ List | str
1834
+
1835
+ A list of all entity types.
1836
+
1837
+ Raises
1838
+ ------
1839
+
1840
+ PyegeriaException
1841
+
1842
+ """
1843
+
1844
+ url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/entity-defs"
1845
+
1846
+ resp = await self._async_make_request("GET", url)
1847
+ elements = resp.json().get("typeDefList", NO_ELEMENTS_FOUND)
1848
+ if elements == NO_ELEMENTS_FOUND or elements is None or elements == []:
1849
+ return NO_ELEMENTS_FOUND
1850
+ if output_format != "JSON":
1851
+ return self._generate_entity_output(elements, None, "TypeDef", output_format, report_spec)
1852
+ return elements
1853
+
1854
+ def get_all_entity_defs(self,
1855
+ output_format: str = "JSON",
1856
+ report_spec: dict | str | None = None) -> dict | list | str:
1857
+ """Returns all the entity type definitions.
1858
+
1859
+ Parameters
1860
+ ----------
1861
+
1862
+
1863
+ Parameters
1864
+ ----------
1865
+ output_format: str, default = "JSON"
1866
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1867
+ report_spec: dict | str | None
1868
+ Output format set to use. If None, the default output format set is used.
1869
+
1870
+ Returns
1871
+ -------
1872
+ List | str
1873
+
1874
+ A list of all entity types.
1875
+
1876
+ Raises
1877
+ ------
1878
+
1879
+ PyegeriaException
1880
+
1881
+ """
1882
+ loop = asyncio.get_event_loop()
1883
+ resp = loop.run_until_complete(self._async_get_all_entity_defs(output_format=output_format,
1884
+ report_spec=report_spec))
1885
+ return resp
1886
+
1887
+ async def _async_get_all_relationship_defs(self,
1888
+ output_format: str = "JSON",
1889
+ report_spec: dict | str | None = None) -> dict | list | str:
1890
+ """Returns all the relationship type definitions. Async version.
1891
+
1892
+ Parameters
1893
+ ----------
1894
+
1895
+
1896
+ Parameters
1897
+ ----------
1898
+ output_format: str, default = "JSON"
1899
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1900
+ report_spec: dict | str | None
1901
+ Output format set to use. If None, the default output format set is used.
1902
+
1903
+ Returns
1904
+ -------
1905
+ List | str
1906
+
1907
+ A list of all entity types.
1908
+
1909
+ Raises
1910
+ ------
1911
+
1912
+ PyegeriaException
1913
+
1914
+ """
1915
+
1916
+ url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/relationship-defs"
1917
+
1918
+ resp = await self._async_make_request("GET", url)
1919
+ elements = resp.json().get("typeDefList", NO_ELEMENTS_FOUND)
1920
+ if elements == NO_ELEMENTS_FOUND or elements is None or elements == []:
1921
+ return NO_ELEMENTS_FOUND
1922
+ if output_format != "JSON":
1923
+ return self._generate_entity_output(elements, None, "TypeDef", output_format, report_spec)
1924
+ return elements
1925
+
1926
+ def get_all_relationship_defs(self,
1927
+ output_format: str = "JSON",
1928
+ report_spec: dict | str | None = None) -> dict | list | str:
1929
+ """Returns all the relationship type definitions.
1930
+
1931
+ Parameters
1932
+ ----------
1933
+
1934
+
1935
+ Parameters
1936
+ ----------
1937
+ output_format: str, default = "JSON"
1938
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1939
+ report_spec: dict | str | None
1940
+ Output format set to use. If None, the default output format set is used.
1941
+
1942
+ Returns
1943
+ -------
1944
+ List | str
1945
+
1946
+ A list of all entity types.
1947
+
1948
+ Raises
1949
+ ------
1950
+
1951
+ PyegeriaException
1952
+
1953
+ """
1954
+ loop = asyncio.get_event_loop()
1955
+ resp = loop.run_until_complete(self._async_get_all_relationship_defs(output_format=output_format,
1956
+ report_spec=report_spec))
1957
+ return resp
1958
+
1959
+ async def _async_get_all_classification_defs(self,
1960
+ output_format: str = "JSON",
1961
+ report_spec: dict | str | None = None) -> dict | list | str:
1962
+ """Returns all the classification type definitions. Async version.
1963
+
1964
+ Parameters
1965
+ ----------
1966
+
1967
+
1968
+ Parameters
1969
+ ----------
1970
+ output_format: str, default = "JSON"
1971
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
1972
+ report_spec: dict | str | None
1973
+ Output format set to use. If None, the default output format set is used.
1974
+
1975
+ Returns
1976
+ -------
1977
+ List | str
1978
+
1979
+ A list of all entity types.
1980
+
1981
+ Raises
1982
+ ------
1983
+
1984
+ PyegeriaException
1985
+
1986
+ """
1987
+
1988
+ url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/classification-defs"
1989
+
1990
+ resp = await self._async_make_request("GET", url)
1991
+ elements = resp.json().get("typeDefList", NO_ELEMENTS_FOUND)
1992
+ if elements == NO_ELEMENTS_FOUND or elements is None or elements == []:
1993
+ return NO_ELEMENTS_FOUND
1994
+ if output_format != "JSON":
1995
+ return self._generate_entity_output(elements, None, "TypeDef", output_format, report_spec)
1996
+ return elements
1997
+
1998
+ def get_all_classification_defs(self,
1999
+ output_format: str = "JSON",
2000
+ report_spec: dict | str | None = None) -> dict | list | str:
2001
+ """Returns all the classification type definitions.
2002
+
2003
+ Parameters
2004
+ ----------
2005
+
2006
+
2007
+ Parameters
2008
+ ----------
2009
+ output_format: str, default = "JSON"
2010
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
2011
+ report_spec: dict | str | None
2012
+ Output format set to use. If None, the default output format set is used.
2013
+
2014
+ Returns
2015
+ -------
2016
+ List | str
2017
+
2018
+ A list of all entity types.
2019
+
2020
+ Raises
2021
+ ------
2022
+
2023
+ PyegeriaException
2024
+
2025
+ """
2026
+ loop = asyncio.get_event_loop()
2027
+ resp = loop.run_until_complete(self._async_get_all_classification_defs(output_format=output_format,
2028
+ report_spec=report_spec))
2029
+ return resp
2030
+
2031
+ #
2032
+ # Get valid ...
2033
+ #
2034
+
2035
+ async def _async_get_sub_types(self, type_name: str,
2036
+ output_format: str = "JSON",
2037
+ report_spec: dict | str | None = None) -> dict | list | str:
2038
+ """Returns all the TypeDefs for a specific subtype. If a null result is returned it means the
2039
+ type has no subtypes. Async version.
2040
+
2041
+ Parameters
2042
+ ----------
2043
+ type_name : str
2044
+ Type name to retrieve the sub-types for.
2045
+
2046
+ Parameters
2047
+ ----------
2048
+ output_format: str, default = "JSON"
2049
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
2050
+ report_spec: dict | str | None
2051
+ Output format set to use. If None, the default output format set is used.
2052
+
2053
+ Returns
2054
+ -------
2055
+ List | str
2056
+
2057
+ A list of TypeDefs that can be attached to the specified type.
2058
+
2059
+ Raises
2060
+ ------
2061
+
2062
+ PyegeriaException
2063
+
2064
+ """
2065
+
2066
+ url = (
2067
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/sub-types/"
2068
+ f"{type_name}"
2069
+ )
2070
+
2071
+ resp = await self._async_make_request("GET", url)
2072
+ elements = resp.json().get("typeDefList", NO_ELEMENTS_FOUND)
2073
+ if elements == NO_ELEMENTS_FOUND or elements is None or elements == []:
2074
+ return NO_ELEMENTS_FOUND
2075
+ if output_format != "JSON":
2076
+ return self._generate_entity_output(elements, type_name, "TypeDef", output_format, report_spec)
2077
+ return elements
2078
+
2079
+ def get_sub_types(self, type_name: str,
2080
+ output_format: str = "JSON",
2081
+ report_spec: dict | str | None = None) -> dict | list | str:
2082
+ """Returns all the TypeDefs for a specific subtype. If a null result is returned it means the
2083
+ type has no subtypes.
2084
+
2085
+ Parameters
2086
+ ----------
2087
+ type_name : str
2088
+ Type name to retrieve the sub-types for.
2089
+
2090
+ Parameters
2091
+ ----------
2092
+ output_format: str, default = "JSON"
2093
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
2094
+ report_spec: dict | str | None
2095
+ Output format set to use. If None, the default output format set is used.
2096
+
2097
+ Returns
2098
+ -------
2099
+ List | str
2100
+
2101
+ A list of TypeDefs that can be attached to the specified type.
2102
+
2103
+ Raises
2104
+ ------
2105
+
2106
+ PyegeriaException
2107
+
2108
+ """
2109
+ loop = asyncio.get_event_loop()
2110
+ resp = loop.run_until_complete(
2111
+ self._async_get_sub_types(type_name, output_format=output_format, report_spec=report_spec)
2112
+ )
2113
+ return resp
2114
+
2115
+ async def _async_get_valid_relationship_types(self, entity_type: str,
2116
+ output_format: str = "JSON",
2117
+ report_spec: dict | str | None = None) -> dict | list | str:
2118
+ """Returns all the TypeDefs for relationships that can be attached to the requested entity type.
2119
+ Async version.
2120
+
2121
+ Parameters
2122
+ ----------
2123
+ entity_type : str
2124
+ The name of the entity type to retrieve the valid relationships for.
2125
+
2126
+
2127
+ Parameters
2128
+ ----------
2129
+ output_format: str, default = "JSON"
2130
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
2131
+ report_spec: dict | str | None
2132
+ Output format set to use. If None, the default output format set is used.
2133
+
2134
+ Returns
2135
+ -------
2136
+ List | str
2137
+
2138
+ A list of TypeDefs that can be attached to the specified entity type.
2139
+
2140
+ Raises
2141
+ ------
2142
+
2143
+ PyegeriaException
2144
+
2145
+ """
2146
+
2147
+ url = (
2148
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/{entity_type}/"
2149
+ f"attached-relationships"
2150
+ )
2151
+
2152
+ resp = await self._async_make_request("GET", url)
2153
+ elements = resp.json().get("typeDefList", NO_ELEMENTS_FOUND)
2154
+ if elements == NO_ELEMENTS_FOUND or elements is None or elements == []:
2155
+ return NO_ELEMENTS_FOUND
2156
+ if output_format != "JSON":
2157
+ return self._generate_entity_output(elements, entity_type, "TypeDef", output_format, report_spec)
2158
+ return elements
2159
+
2160
+ def get_valid_relationship_types(self, entity_type: str,
2161
+ output_format: str = "JSON",
2162
+ report_spec: dict | str | None = None) -> dict | list | str:
2163
+ """Returns all the TypeDefs for relationships that can be attached to the requested entity type.
2164
+ Async version.
2165
+
2166
+ Parameters
2167
+ ----------
2168
+ entity_type : str
2169
+ The name of the entity type to retrieve the valid relationships for.
2170
+ : str, optional
2171
+ The name of the server to configure.
2172
+ If not provided, the server name associated with the instance is used.
2173
+
2174
+ Parameters
2175
+ ----------
2176
+ output_format: str, default = "JSON"
2177
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
2178
+ report_spec: dict | str | None
2179
+ Output format set to use. If None, the default output format set is used.
2180
+
2181
+ Returns
2182
+ -------
2183
+ List | str
2184
+
2185
+ A list of TypeDefs that can be attached to the specified entity type.
2186
+
2187
+ Raises
2188
+ ------
2189
+
2190
+ PyegeriaException
2191
+
2192
+ """
2193
+ loop = asyncio.get_event_loop()
2194
+ resp = loop.run_until_complete(
2195
+ self._async_get_valid_relationship_types(entity_type, output_format=output_format, report_spec=report_spec)
2196
+ )
2197
+ return resp
2198
+
2199
+ async def _async_get_valid_classification_types(
2200
+ self, entity_type: str,
2201
+ output_format: str = "JSON",
2202
+ report_spec: dict | str | None = None
2203
+ ) -> dict | list | str:
2204
+ """Returns all the TypeDefs for classifications that can be attached to the requested entity type.
2205
+ Async version.
2206
+
2207
+ Parameters
2208
+ ----------
2209
+ entity_type : str
2210
+ The name of the entity type to retrieve the classifications for.
2211
+
2212
+
2213
+ Parameters
2214
+ ----------
2215
+ output_format: str, default = "JSON"
2216
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
2217
+ report_spec: dict | str | None
2218
+ Output format set to use. If None, the default output format set is used.
2219
+
2220
+ Returns
2221
+ -------
2222
+ List | str
2223
+
2224
+ A list of classifications that can be attached to the specified entity type.
2225
+
2226
+ Raises
2227
+ ------
2228
+
2229
+ PyegeriaException
2230
+
2231
+ """
2232
+
2233
+ url = (
2234
+ f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/{entity_type}/"
2235
+ f"attached-classifications"
2236
+ )
2237
+
2238
+ resp = await self._async_make_request("GET", url)
2239
+ elements = resp.json().get("typeDefList", NO_ELEMENTS_FOUND)
2240
+ if elements == NO_ELEMENTS_FOUND or elements is None or elements == []:
2241
+ return NO_ELEMENTS_FOUND
2242
+ if output_format != "JSON":
2243
+ return self._generate_entity_output(elements, entity_type, "TypeDef", output_format, report_spec)
2244
+ return elements
2245
+
2246
+ def get_valid_classification_types(self, entity_type: str,
2247
+ output_format: str = "JSON",
2248
+ report_spec: dict | str | None = None) -> dict | list | str:
2249
+ """Returns all the TypeDefs for classifications that can be attached to the requested entity type.
2250
+ Async version.
2251
+
2252
+ Parameters
2253
+ ----------
2254
+ entity_type : str
2255
+ The name of the entity type to retrieve the classifications for.
2256
+ : str, optional
2257
+ The name of the server to configure.
2258
+ If not provided, the server name associated with the instance is used.
2259
+
2260
+ Parameters
2261
+ ----------
2262
+ output_format: str, default = "JSON"
2263
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
2264
+ report_spec: dict | str | None
2265
+ Output format set to use. If None, the default output format set is used.
2266
+
2267
+ Returns
2268
+ -------
2269
+ List | str
2270
+
2271
+ A list of classifications that can be attached to the specified entity type.
2272
+
2273
+ Raises
2274
+ ------
2275
+
2276
+ PyegeriaException
2277
+
2278
+ """
2279
+ loop = asyncio.get_event_loop()
2280
+ resp = loop.run_until_complete(
2281
+ self._async_get_valid_classification_types(entity_type, output_format=output_format,
2282
+ report_spec=report_spec)
2283
+ )
2284
+ return resp
2285
+
2286
+ async def _async_get_typedef_by_name(self, entity_type: str,
2287
+ output_format: str = "JSON",
2288
+ report_spec: dict | str | None = None) -> dict | str | list[dict]:
2289
+ """Return the TypeDef identified by the unique name.
2290
+ Async version.
2291
+
2292
+ Parameters
2293
+ ----------
2294
+ entity_type : str
2295
+ The name of the entity type to retrieve the typedef for.
2296
+
2297
+
2298
+ Parameters
2299
+ ----------
2300
+ output_format: str, default = "JSON"
2301
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
2302
+ report_spec: dict | str | None
2303
+ Output format set to use. If None, the default output format set is used.
2304
+
2305
+ Returns
2306
+ -------
2307
+ dict | str
2308
+
2309
+ The typedef associated with the type name
2310
+
2311
+ Raises
2312
+ ------
2313
+
2314
+ PyegeriaException
2315
+
2316
+ """
2317
+
2318
+ url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types/name/{entity_type}"
2319
+
2320
+ resp = await self._async_make_request("GET", url)
2321
+ element = resp.json().get("typeDef", NO_ELEMENTS_FOUND)
2322
+ if element == NO_ELEMENTS_FOUND or element is None:
2323
+ return NO_ELEMENTS_FOUND
2324
+ if output_format != "JSON":
2325
+ return self._generate_entity_output(element, entity_type, "TypeDef", output_format, report_spec)
2326
+ return element
2327
+
2328
+ def get_typedef_by_name(self, entity_type: str,
2329
+ output_format: str = "JSON",
2330
+ report_spec: dict | str | None = None) -> dict | str | list[dict]:
2331
+ """Return the TypeDef identified by the unique name.
2332
+
2333
+ Parameters
2334
+ ----------
2335
+ entity_type : str
2336
+ The name of the entity type to retrieve the typedef for.
2337
+
2338
+
2339
+ Parameters
2340
+ ----------
2341
+ output_format: str, default = "JSON"
2342
+ Type of output to return. For example: "JSON", "DICT", "MD", "MD_TABLE", etc.
2343
+ report_spec: dict | str | None
2344
+ Output format set to use. If None, the default output format set is used.
2345
+
2346
+ Returns
2347
+ -------
2348
+ dict | str
2349
+
2350
+ The typedef associated with the type name
2351
+
2352
+ Raises
2353
+ ------
2354
+
2355
+ PyegeriaException
2356
+
2357
+ """
2358
+ loop = asyncio.get_event_loop()
2359
+ resp = loop.run_until_complete(self._async_get_typedef_by_name(entity_type,
2360
+ output_format=output_format,
2361
+ report_spec=report_spec))
2362
+ return resp
2363
+
2364
+
2365
+ #
2366
+ # Specification Properties
2367
+ #
2368
+
2369
+ async def _async_setup_specification_property(
2370
+ self, element_guid: str, body: dict
2371
+ ):
2372
+ """Create a replacementAttribute specification property and attach it to an element.
2373
+ There are several different payloads to support setting up different use cases.
2374
+ see https://egeria-project.org/services/omvs/valid-metadata/overview/?h=valid#maintaining-specification-properties
2375
+ Async Version.
2376
+
2377
+ Parameters
2378
+ ----------
2379
+ element_guid : str
2380
+ Element to attach the property to.
2381
+ body : dict
2382
+ The definition of the specification property to attach.
2383
+
2384
+ Returns
2385
+ -------
2386
+ No value is returned.
2387
+
2388
+ Raises
2389
+ ------
2390
+ PyegeriaException
2391
+
2392
+
2393
+ Notes
2394
+ -----
2395
+
2396
+ Example payload structures for element:
2397
+ {
2398
+ "class" : "ReplacementAttribute",
2399
+ "name": "replacement attribute name",
2400
+ "description": "replacement attribute description",
2401
+ "datatype": "data type of the attribute, eg string",
2402
+ "example": "this is an example - often it is the default value for an optional replacement attribute.",
2403
+ "required": false,
2404
+ "otherPropertyValues": {
2405
+ "property1" : "propertyValue1",
2406
+ "property2" : "propertyValue2"
2407
+ }
2408
+ }
2409
+
2410
+ for Template:
2411
+ {
2412
+ "class" : "SupportedTemplate",
2413
+ "name": "template name",
2414
+ "description": "template description",
2415
+ "openMetadataTypeName": "open metadata type of the element produced by the template",
2416
+ "required": false,
2417
+ "otherPropertyValues": {
2418
+ "property1" : "propertyValue1",
2419
+ "property2" : "propertyValue2"
2420
+ }
2421
+ }
2422
+ """
2423
+
2424
+ url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/elements/{element_guid}/specification-properties"
2425
+
2426
+ await self._async_make_request("POST", url, body)
2427
+ return
2428
+
2429
+ def setup_specification_property(self, element_guid: str, body: dict):
2430
+ """ Create a replacementAttribute specification property and attach it to an element.
2431
+ There are several different payloads to support setting up different use cases.
2432
+ see https://egeria-project.org/services/omvs/valid-metadata/overview/?h=valid#maintaining-specification-properties
2433
+ Async Version.
2434
+ Parameters
2435
+ ----------
2436
+ element_guid : str
2437
+ Element to attach the property to.
2438
+ body : dict
2439
+ The definition of the specification property to attach.
2440
+
2441
+ Returns
2442
+ -------
2443
+ No value is returned.
2444
+
2445
+ Raises
2446
+ ------
2447
+ PyegeriaException
2448
+
2449
+ Notes
2450
+ -----
2451
+ Example payload structures for element:
2452
+ {
2453
+ "class" : "ReplacementAttribute",
2454
+ "name": "replacement attribute name",
2455
+ "description": "replacement attribute description",
2456
+ "datatype": "data type of the attribute, eg string",
2457
+ "example": "this is an example - often it is the default value for an optional replacement attribute.",
2458
+ "required": false,
2459
+ "otherPropertyValues": {
2460
+ "property1" : "propertyValue1",
2461
+ "property2" : "propertyValue2"
2462
+ }
2463
+ }
2464
+
2465
+ for Template:
2466
+ {
2467
+ "class" : "SupportedTemplate",
2468
+ "name": "template name",
2469
+ "description": "template description",
2470
+ "openMetadataTypeName": "open metadata type of the element produced by the template",
2471
+ "required": false,
2472
+ "otherPropertyValues": {
2473
+ "property1" : "propertyValue1",
2474
+ "property2" : "propertyValue2"
2475
+ }
2476
+ }
2477
+ """
2478
+ loop = asyncio.get_event_loop()
2479
+ loop.run_until_complete(
2480
+ self._async_setup_specification_property(element_guid, body)
2481
+ )
2482
+
2483
+ async def _async_delete_specification_property(
2484
+ self, spec_property_guid: str, body: Optional[dict | DeleteElementRequestBody] = None, cascade: bool = False)->None:
2485
+ """Create a replacementAttribute specification property and attach it to an element.
2486
+ There are several different payloads to support setting up different use cases.
2487
+ see https://egeria-project.org/services/omvs/valid-metadata/overview/?h=valid#maintaining-specification-properties
2488
+ Async Version.
2489
+
2490
+ Parameters
2491
+ ----------
2492
+ spec_property_guid : str
2493
+ Element to delete.
2494
+ body : dict | DeleteElementRequestBody
2495
+ Finer control over the delete.
2496
+ cascade: bool
2497
+ Delete all elements that depend on this element.
2498
+ Returns
2499
+ -------
2500
+ No value is returned.
2501
+
2502
+ Raises
2503
+ ------
2504
+ PyegeriaException
2505
+
2506
+
2507
+ Notes
2508
+ -----
2509
+
2510
+ Example payload structures:
2511
+ {
2512
+ "class": "DeleteElementRequestBody",
2513
+ "cascadeDelete": false,
2514
+ "externalSourceGUID": "add guid here",
2515
+ "externalSourceName": "add qualified name here",
2516
+ "effectiveTime": "{{$isoTimestamp}}",
2517
+ "forLineage": false,
2518
+ "forDuplicateProcessing": false
2519
+ }
2520
+ """
2521
+
2522
+ url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/"
2523
+ f"specification-properties/{spec_property_guid}/delete")
2524
+
2525
+ await self._async_delete_element_request(url, body, cascade)
2526
+
2527
+
2528
+ def delete_specification_property(self, spec_property_guid: str, body: dict | DeleteElementRequestBody, cascade: bool = False)->None:
2529
+ """ Create a replacementAttribute specification property and attach it to an element.
2530
+ There are several different payloads to support setting up different use cases.
2531
+ see https://egeria-project.org/services/omvs/valid-metadata/overview/?h=valid#maintaining-specification-properties
2532
+ Async Version.
2533
+ Parameters
2534
+ ----------
2535
+ spec_property_guid : str
2536
+ Element to delete.
2537
+ body : dict | DeleteElementRequestBody
2538
+ Finer control over the delete.
2539
+ cascade: bool
2540
+ Delete all elements that depend on this element.
2541
+
2542
+ Returns
2543
+ -------
2544
+ No value is returned.
2545
+
2546
+ Raises
2547
+ ------
2548
+ PyegeriaException
2549
+
2550
+ Notes
2551
+ -----
2552
+ Example payload structures:
2553
+ {
2554
+ "class": "DeleteElementRequestBody",
2555
+ "cascadeDelete": false,
2556
+ "externalSourceGUID": "add guid here",
2557
+ "externalSourceName": "add qualified name here",
2558
+ "effectiveTime": "{{$isoTimestamp}}",
2559
+ "forLineage": false,
2560
+ "forDuplicateProcessing": false
2561
+ }
2562
+ """
2563
+ loop = asyncio.get_event_loop()
2564
+ loop.run_until_complete(
2565
+ self._async_delete_specification_property(spec_property_guid, body, cascade)
2566
+ )
2567
+
2568
+ @dynamic_catch
2569
+ async def _async_find_specification_property(self, search_string: str = "*",
2570
+ starts_with: bool = True, ends_with: bool = False,
2571
+ ignore_case: bool = False,
2572
+ anchor_domain: Optional[str] = None,
2573
+ metadata_element_type: Optional[str] = None,
2574
+ metadata_element_subtypes: Optional[list[str]] = None,
2575
+ skip_relationships: Optional[list[str]] = None,
2576
+ include_only_relationships: Optional[list[str]] = None,
2577
+ skip_classified_elements: Optional[list[str]] = None,
2578
+ include_only_classified_elements: Optional[list[str]] = None,
2579
+ graph_query_depth: int = 3,
2580
+ governance_zone_filter: Optional[list[str]] = None, as_of_time: Optional[str] = None,
2581
+ effective_time: Optional[str] = None, relationship_page_size: int = 0,
2582
+ limit_results_by_status: Optional[list[str]] = None, sequencing_order: Optional[str] = None,
2583
+ sequencing_property: Optional[str] = None,
2584
+ output_format: str = "JSON",
2585
+ report_spec: str | dict = "Referenceable",
2586
+ start_from: int = 0, page_size: int = 100,
2587
+ property_names: Optional[list[str]] = None,
2588
+ body: Optional[dict | SearchStringRequestBody] = None) -> list | str:
2589
+ """ Retrieve the list of specification property metadata elements that contain the search string. Async Version.
2590
+
2591
+ Parameters
2592
+ ----------
2593
+ search_string: str
2594
+ Search string to match against - None or '*' indicate match against all specification properties.
2595
+ starts_with : bool, [default=True], optional
2596
+ Starts with the supplied string.
2597
+ ends_with : bool, [default=False], optional
2598
+ Ends with the supplied string
2599
+ ignore_case : bool, [default=False], optional
2600
+ Ignore case when searching
2601
+ anchor_domain: str, optional
2602
+ The anchor domain to search in.
2603
+ metadata_element_type: str, optional
2604
+ The type of metadata element to search for.
2605
+ metadata_element_subtypes: list[str], optional
2606
+ The subtypes of metadata element to search for.
2607
+ skip_relationships: list[str], optional
2608
+ The types of relationships to skip.
2609
+ include_only_relationships: list[str], optional
2610
+ The types of relationships to include.
2611
+ skip_classified_elements: list[str], optional
2612
+ The types of classified elements to skip.
2613
+ include_only_classified_elements: list[str], optional
2614
+ The types of classified elements to include.
2615
+ graph_query_depth: int, [default=3], optional
2616
+ The depth of the graph query.
2617
+ governance_zone_filter: list[str], optional
2618
+ The governance zones to search in.
2619
+ as_of_time: str, optional
2620
+ The time to search as of.
2621
+ effective_time: str, optional
2622
+ The effective time to search at.
2623
+ relationship_page_size: int, [default=0], optional
2624
+ The page size for relationships.
2625
+ limit_results_by_status: list[str], optional
2626
+ The statuses to limit results by.
2627
+ sequencing_order: str, optional
2628
+ The order to sequence results by.
2629
+ sequencing_property: str, optional
2630
+ The property to sequence results by.
2631
+ output_format: str, default = "JSON"
2632
+ - one of "MD", "LIST", "FORM", "REPORT", "DICT", "MERMAID" or "JSON"
2633
+ report_spec: str | dict , optional, default = "Referenceable"
2634
+ - The desired output columns/fields to include.
2635
+ start_from: int, [default=0], optional
2636
+ When multiple pages of results are available, the page number to start from.
2637
+ page_size: int, [default=100]
2638
+ The number of items to return in a single page.
2639
+ property_names: list[str], optional
2640
+ The names of properties to search for.
2641
+ body: dict | SearchStringRequestBody, optional, default = None
2642
+ - if provided, the search parameters in the body will supercede other attributes, such as "search_string"
2643
+
2644
+ Returns
2645
+ -------
2646
+ List | str
2647
+
2648
+ Output depends on the output format specified.
2649
+
2650
+ Raises
2651
+ ------
2652
+
2653
+ ValidationError
2654
+ If the client passes incorrect parameters on the request that don't conform to the data model.
2655
+ PyegeriaException
2656
+ Issues raised in communicating or server side processing.
2657
+ NotAuthorizedException
2658
+ The principle specified by the user_id does not have authorization for the requested action
2659
+
2660
+ """
2661
+ url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/specification-properties/by-search-string"
2662
+ response = await self._async_find_request(url, _type="SpecificationPropertyValue", _gen_output=self._generate_valid_value_output,
2663
+ search_string=search_string, starts_with=starts_with,
2664
+ ends_with=ends_with, ignore_case=ignore_case,
2665
+ anchor_domain=anchor_domain,
2666
+ metadata_element_type=metadata_element_type,
2667
+ metadata_element_subtypes=metadata_element_subtypes,
2668
+ skip_relationships=skip_relationships,
2669
+ include_only_relationships=include_only_relationships,
2670
+ skip_classified_elements=skip_classified_elements,
2671
+ include_only_classified_elements=include_only_classified_elements,
2672
+ graph_query_depth=graph_query_depth,
2673
+ governance_zone_filter=governance_zone_filter,
2674
+ as_of_time=as_of_time, effective_time=effective_time,
2675
+ relationship_page_size=relationship_page_size,
2676
+ limit_results_by_status=limit_results_by_status,
2677
+ sequencing_order=sequencing_order,
2678
+ sequencing_property=sequencing_property,
2679
+ output_format=output_format, report_spec=report_spec,
2680
+ start_from=start_from, page_size=page_size,
2681
+ property_names=property_names, body=body)
2682
+
2683
+ return response
2684
+
2685
+
2686
+ @dynamic_catch
2687
+ def find_specification_property(self, search_string: str = "*",
2688
+ starts_with: bool = True, ends_with: bool = False,
2689
+ ignore_case: bool = False,
2690
+ anchor_domain: Optional[str] = None,
2691
+ metadata_element_type: Optional[str] = None,
2692
+ metadata_element_subtypes: Optional[list[str]] = None,
2693
+ skip_relationships: Optional[list[str]] = None,
2694
+ include_only_relationships: Optional[list[str]] = None,
2695
+ skip_classified_elements: Optional[list[str]] = None,
2696
+ include_only_classified_elements: Optional[list[str]] = None,
2697
+ graph_query_depth: int = 3,
2698
+ governance_zone_filter: Optional[list[str]] = None, as_of_time: Optional[str] = None,
2699
+ effective_time: Optional[str] = None, relationship_page_size: int = 0,
2700
+ limit_results_by_status: Optional[list[str]] = None, sequencing_order: Optional[str] = None,
2701
+ sequencing_property: Optional[str] = None,
2702
+ output_format: str = "JSON",
2703
+ report_spec: str | dict = "Referenceable",
2704
+ start_from: int = 0, page_size: int = 100,
2705
+ property_names: Optional[list[str]] = None,
2706
+ body: Optional[dict | SearchStringRequestBody] = None) -> list | str:
2707
+ """ Retrieve the list of specification property metadata elements that contain the search string.
2708
+
2709
+ Parameters
2710
+ ----------
2711
+ search_string: str
2712
+ Search string to match against - None or '*' indicate match against all specification properties.
2713
+ starts_with : bool, [default=True], optional
2714
+ Starts with the supplied string.
2715
+ ends_with : bool, [default=False], optional
2716
+ Ends with the supplied string
2717
+ ignore_case : bool, [default=False], optional
2718
+ Ignore case when searching
2719
+ anchor_domain: str, optional
2720
+ The anchor domain to search in.
2721
+ metadata_element_type: str, optional
2722
+ The type of metadata element to search for.
2723
+ metadata_element_subtypes: list[str], optional
2724
+ The subtypes of metadata element to search for.
2725
+ skip_relationships: list[str], optional
2726
+ The types of relationships to skip.
2727
+ include_only_relationships: list[str], optional
2728
+ The types of relationships to include.
2729
+ skip_classified_elements: list[str], optional
2730
+ The types of classified elements to skip.
2731
+ include_only_classified_elements: list[str], optional
2732
+ The types of classified elements to include.
2733
+ graph_query_depth: int, [default=3], optional
2734
+ The depth of the graph query.
2735
+ governance_zone_filter: list[str], optional
2736
+ The governance zones to search in.
2737
+ as_of_time: str, optional
2738
+ The time to search as of.
2739
+ effective_time: str, optional
2740
+ The effective time to search at.
2741
+ relationship_page_size: int, [default=0], optional
2742
+ The page size for relationships.
2743
+ limit_results_by_status: list[str], optional
2744
+ The statuses to limit results by.
2745
+ sequencing_order: str, optional
2746
+ The order to sequence results by.
2747
+ sequencing_property: str, optional
2748
+ The property to sequence results by.
2749
+ output_format: str, default = "JSON"
2750
+ - one of "MD", "LIST", "FORM", "REPORT", "DICT", "MERMAID" or "JSON"
2751
+ report_spec: str | dict , optional, default = "Referenceable"
2752
+ - The desired output columns/fields to include.
2753
+ start_from: int, [default=0], optional
2754
+ When multiple pages of results are available, the page number to start from.
2755
+ page_size: int, [default=100]
2756
+ The number of items to return in a single page.
2757
+ property_names: list[str], optional
2758
+ The names of properties to search for.
2759
+ body: dict | SearchStringRequestBody, optional, default = None
2760
+ - if provided, the search parameters in the body will supercede other attributes, such as "search_string"
2761
+
2762
+ Returns
2763
+ -------
2764
+ List | str
2765
+
2766
+ Output depends on the output format specified.
2767
+
2768
+ Raises
2769
+ ------
2770
+
2771
+ ValidationError
2772
+ If the client passes incorrect parameters on the request that don't conform to the data model.
2773
+ PyegeriaException
2774
+ Issues raised in communicating or server side processing.
2775
+ NotAuthorizedException
2776
+ The principle specified by the user_id does not have authorization for the requested action
2777
+
2778
+ """
2779
+ loop = asyncio.get_event_loop()
2780
+ return loop.run_until_complete(self._async_find_specification_property(search_string=search_string,
2781
+ starts_with=starts_with,
2782
+ ends_with=ends_with,
2783
+ ignore_case=ignore_case,
2784
+ anchor_domain=anchor_domain,
2785
+ metadata_element_type=metadata_element_type,
2786
+ metadata_element_subtypes=metadata_element_subtypes,
2787
+ skip_relationships=skip_relationships,
2788
+ include_only_relationships=include_only_relationships,
2789
+ skip_classified_elements=skip_classified_elements,
2790
+ include_only_classified_elements=include_only_classified_elements,
2791
+ graph_query_depth=graph_query_depth,
2792
+ governance_zone_filter=governance_zone_filter,
2793
+ as_of_time=as_of_time,
2794
+ effective_time=effective_time,
2795
+ relationship_page_size=relationship_page_size,
2796
+ limit_results_by_status=limit_results_by_status,
2797
+ sequencing_order=sequencing_order,
2798
+ sequencing_property=sequencing_property,
2799
+ output_format=output_format,
2800
+ report_spec=report_spec,
2801
+ start_from=start_from,
2802
+ page_size=page_size,
2803
+ property_names=property_names,
2804
+ body=body))
2805
+
2806
+ @dynamic_catch
2807
+ async def _async_get_specification_property_by_type(self, spec_property_type: str, body: Optional[dict | ResultsRequestBody] = None,
2808
+ start_from: int = 0,
2809
+ page_size: int = 0, output_format: str = "JSON",
2810
+ report_spec: str | dict = None) -> list | str:
2811
+ """ Return the list of specification properties containing the supplied type. Async version.
2812
+
2813
+ Parameters
2814
+ ----------
2815
+ spec_property_type: str,
2816
+ identity of the specification property type to return members for.
2817
+ body: dict | ResultsRequestBody, optional, default = None
2818
+ Providing the body allows full control of the request and replaces filter parameters.
2819
+ start_from: int, [default=0], optional
2820
+ When multiple pages of results are available, the page number to start from.
2821
+ page_size: int, [default=None]
2822
+ The number of items to return in a single page. If not specified, the default will be taken from
2823
+ the class instance.
2824
+ output_format: str, default = "JSON"
2825
+ one of "MD", "LIST", "FORM", "REPORT", "DICT", "MERMAID" or "JSON"
2826
+ report_spec: dict , optional, default = None
2827
+ The desired output columns/fields to include.
2828
+
2829
+ Returns
2830
+ -------
2831
+ List | str
2832
+
2833
+ Results based on the output format.
2834
+
2835
+ Raises
2836
+ ------
2837
+ PyegeriaException
2838
+ Notes:
2839
+ -----
2840
+ Body sample:
2841
+ {
2842
+ "class": "ResultsRequestBody",
2843
+ "startFrom": 0,
2844
+ "pageSize": 0,
2845
+ "effectiveTime": "{{$isoTimestamp}}",
2846
+ "limitResultsByStatus": ["ACTIVE"],
2847
+ "asOfTime": "{{$isoTimestamp}}",
2848
+ "sequencingOrder": "CREATION_DATE_RECENT",
2849
+ "sequencingProperty": ""
2850
+ }
2851
+ """
2852
+
2853
+ url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/"
2854
+ f"specification-properties/by-type?specificationPropertyType={spec_property_type}")
2855
+ response = await self._async_get_results_body_request(url, _type="SpecificationPropertyValue",
2856
+ _gen_output=self._generate_valid_value_output,
2857
+ start_from=start_from, page_size=page_size,
2858
+ output_format=output_format,
2859
+ report_spec=report_spec,
2860
+ body=body)
2861
+
2862
+ return response
2863
+
2864
+ def get_specification_property_by_type(self, spec_property_type:str, body: Optional[dict | ResultsRequestBody] = None,
2865
+ start_from: int = 0,
2866
+ page_size: int = 0, output_format: str = "JSON",
2867
+ report_spec: str | dict = None) -> list | str:
2868
+ """ Return the list of specification properties containing the supplied type.
2869
+
2870
+
2871
+ Parameters
2872
+ ----------
2873
+ spec_property_type: str,
2874
+ identity of the specification property type to return members for.
2875
+ body: dict, optional, default = None
2876
+ Providing the body allows full control of the request and replaces filter parameters.
2877
+ start_from: int, [default=0], optional
2878
+ When multiple pages of results are available, the page number to start from.
2879
+ page_size: int, [default=None]
2880
+ The number of items to return in a single page. If not specified, the default will be taken from
2881
+ the class instance.
2882
+ output_format: str, default = "JSON"
2883
+ - one of "MD", "LIST", "FORM", "REPORT", "DICT", "MERMAID" or "JSON"
2884
+ report_spec: str | dict , optional, default = None
2885
+ The desired output columns/fields to include.
2886
+
2887
+ Returns
2888
+ -------
2889
+ List | str
2890
+
2891
+ A graph anchored in the collection.
2892
+
2893
+ Raises
2894
+ ------
2895
+
2896
+ PyegeriaInvalidParameterException
2897
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
2898
+ PyegeriaAPIException
2899
+ Raised by the server when an issue arises in processing a valid request
2900
+ NotAuthorizedException
2901
+ The principle specified by the user_id does not have authorization for the requested action
2902
+
2903
+ Notes:
2904
+ -----
2905
+ Body sample:
2906
+ {
2907
+ "class": "ResultsRequestBody",
2908
+ "effectiveTime": "{{$isoTimestamp}}",
2909
+ "limitResultsByStatus": ["ACTIVE"],
2910
+ "asOfTime": "{{$isoTimestamp}}",
2911
+ "sequencingOrder": "CREATION_DATE_RECENT",
2912
+ "sequencingProperty": ""
2913
+ }
2914
+ """
2915
+ return asyncio.get_event_loop().run_until_complete(
2916
+ self._async_get_specification_property_by_type(spec_property_type, body, start_from, page_size,
2917
+ output_format, report_spec))
2918
+ @dynamic_catch
2919
+ async def _async_get_specification_property_by_name(self, name: str, start_from: int = 0, page_size: int = 0,
2920
+ category: Optional[str] = None, classification_names: list[str]= None,
2921
+ body: Optional[dict | FilterRequestBody] = None, output_format: str = "JSON",
2922
+ report_spec: str | dict = None) -> list | str:
2923
+ """ Return the list of specification properties containing the supplied name. Async version.
2924
+
2925
+ Parameters
2926
+ ----------
2927
+ name: str
2928
+ The name of the specification property to retrieve.
2929
+ start_from: int, [default=0], optional
2930
+ When multiple pages of results are available, the page number to start from.
2931
+ page_size: int, [default=None]
2932
+ The number of items to return in a single page. If not specified, the default will be taken from
2933
+ the class instance.
2934
+ body: dict, optional, default = None
2935
+ If supplied, adds addition request details - for instance, to filter the results on collectionType
2936
+ output_format: str, default = "JSON"
2937
+ - one of "MD", "LIST", "FORM", "REPORT", "DICT", "MERMAID" or "JSON"
2938
+ report_spec: str | dict = None), optional, default = None
2939
+ The desired output columns/fields to include.
2940
+
2941
+ Returns
2942
+ -------
2943
+ List
2944
+
2945
+ A list of specification properties containing the supplied name.
2946
+
2947
+ Raises
2948
+ ------
2949
+ PyegeriaAPIException
2950
+
2951
+ Notes
2952
+ -----
2953
+ Sample body:
2954
+ {
2955
+ "class": "FilterRequestBody",
2956
+ "asOfTime": "{{$isoTimestamp}}",
2957
+ "effectiveTime": "{{$isoTimestamp}}",
2958
+ "forLineage": false,
2959
+ "forDuplicateProcessing": false,
2960
+ "limitResultsByStatus": ["ACTIVE"],
2961
+ "sequencingOrder": "PROPERTY_ASCENDING",
2962
+ "sequencingProperty": "qualifiedName",
2963
+ "filter": "Add collectionType value here"
2964
+ }
2965
+
2966
+ """
2967
+
2968
+ url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/"
2969
+ f"specification-properties/by-name")
2970
+ response = await self._async_get_name_request(url, _type="SpecificationPropertyValue",
2971
+ _gen_output=self._generate_valid_value_output,
2972
+ filter_string=name,
2973
+ classification_names=classification_names,
2974
+ start_from=start_from, page_size=page_size,
2975
+ output_format=output_format, report_spec=report_spec,
2976
+ body=body)
2977
+
2978
+ return response
2979
+
2980
+
2981
+ def get_specification_property_by_name(self, name: str, start_from: int = 0, page_size: int = 0,
2982
+ category: Optional[str] = None, classification_names: list[str]= None,
2983
+ body: Optional[dict | FilterRequestBody] = None, output_format: str = "JSON",
2984
+ report_spec: str | dict = None) -> list:
2985
+ """ Return the list of specification properties containing the supplied name.
2986
+
2987
+ Parameters
2988
+ ----------
2989
+ name: str
2990
+ The name of the specification property to retrieive.
2991
+ start_from: int, [default=0], optional
2992
+ When multiple pages of results are available, the page number to start from.
2993
+ page_size: int, [default=None]
2994
+ The number of items to return in a single page. If not specified, the default will be taken from
2995
+ the class instance.
2996
+ body: dict, optional, default = None
2997
+ If supplied, adds addition request details - for instance, to filter the results on collectionType
2998
+ output_format: str, default = "JSON"
2999
+ - one of "MD", "LIST", "FORM", "REPORT", "DICT", "MERMAID" or "JSON"
3000
+ report_spec: str | dict = None), optional, default = None
3001
+ The desired output columns/fields to include.
3002
+
3003
+ Returns
3004
+ -------
3005
+ List
3006
+
3007
+ A list of specification properties containing the supplied name.
3008
+
3009
+ Raises
3010
+ ------
3011
+ PyegeriaAPIException
3012
+
3013
+ Notes
3014
+ -----
3015
+ Sample body:
3016
+ {
3017
+ "class": "FilterRequestBody",
3018
+ "asOfTime": "{{$isoTimestamp}}",
3019
+ "effectiveTime": "{{$isoTimestamp}}",
3020
+ "forLineage": false,
3021
+ "forDuplicateProcessing": false,
3022
+ "limitResultsByStatus": ["ACTIVE"],
3023
+ "sequencingOrder": "PROPERTY_ASCENDING",
3024
+ "sequencingProperty": "qualifiedName",
3025
+ "filter": "Add collectionType value here"
3026
+ }
3027
+
3028
+ Args:
3029
+ classification_names ():
3030
+
3031
+ """
3032
+
3033
+ return asyncio.get_event_loop().run_until_complete(
3034
+ self._async_get_specification_property_by_name(name, start_from, page_size,
3035
+ category, classification_names,
3036
+ body,output_format,report_spec)
3037
+ )
3038
+
3039
+ @dynamic_catch
3040
+ async def _async_get_specification_property_by_guid(self, spec_property_guid: str, element_type: Optional[str] = None,
3041
+ body: Optional[dict | GetRequestBody] = None,
3042
+ output_format: str = 'JSON',
3043
+ report_spec: str | dict = None) -> dict | str:
3044
+ """Return the properties of a specific collection. Async version.
3045
+
3046
+ Parameters
3047
+ ----------
3048
+ spec_property_guid: str,
3049
+ unique identifier of the property.
3050
+ element_type: str, default = None, optional
3051
+ type of collection - Collection, DataSpec, Agreement, etc.
3052
+ body: dict | GetRequestBody, optional, default = None
3053
+ full request body.
3054
+ output_format: str, default = "JSON"
3055
+ - one of "DICT", "MERMAID" or "JSON"
3056
+ report_spec: str | dict, optional, default = None
3057
+ The desired output columns/fields to include.
3058
+
3059
+ Returns
3060
+ -------
3061
+ dict | str
3062
+
3063
+ A JSON dict representing the specified property. Returns a string if none found.
3064
+
3065
+ Raises
3066
+ ------
3067
+ PyegeriaException
3068
+
3069
+ Notes
3070
+ ----
3071
+ Body sample:
3072
+ {
3073
+ "class": "GetRequestBody",
3074
+ "asOfTime": "{{$isoTimestamp}}",
3075
+ "effectiveTime": "{{$isoTimestamp}}",
3076
+ "forLineage": false,
3077
+ "forDuplicateProcessing": false
3078
+ }
3079
+ """
3080
+
3081
+ type = element_type if element_type else "SpecificationPropertyValue"
3082
+ url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/"
3083
+ f"specification-properties/{spec_property_guid}/retrieve")
3084
+ response = await self._async_get_guid_request(url, _type=type,
3085
+ _gen_output=self._generate_valid_value_output,
3086
+ output_format=output_format, report_spec=report_spec,
3087
+ body=body)
3088
+
3089
+ return response
3090
+
3091
+ @dynamic_catch
3092
+ def get_specification_property_by_guid(self, spec_property_guid: str, element_type: Optional[str] = None, body: dict | GetRequestBody= None,
3093
+ output_format: str = 'JSON', report_spec: str | dict = None) -> dict | str:
3094
+ """ Return the properties of a specific collection. Async version.
3095
+
3096
+ Parameters
3097
+ ----------
3098
+ spec_property_guid: str,
3099
+ unique identifier of the property.
3100
+ element_type: str, default = None, optional
3101
+ type of element - Collection, DataSpec, Agreement, etc.
3102
+ body: dict | GetRequestBody, optional, default = None
3103
+ full request body.
3104
+ output_format: str, default = "JSON"
3105
+ - one of "DICT", "MERMAID" or "JSON"
3106
+ report_spec: dict , optional, default = None
3107
+ The desired output columns/fields to include.
3108
+
3109
+
3110
+ Returns
3111
+ -------
3112
+ dict | str
3113
+
3114
+ A JSON dict representing the specified property. Returns a string if none found.
3115
+
3116
+ Raises
3117
+ ------
3118
+ PyegeriaException
3119
+
3120
+ Notes
3121
+ ----
3122
+ Body sample:
3123
+ {
3124
+ "class": "AnyTimeRequestBody",
3125
+ "asOfTime": "{{$isoTimestamp}}",
3126
+ "effectiveTime": "{{$isoTimestamp}}",
3127
+ "forLineage": false,
3128
+ "forDuplicateProcessing": false
3129
+ }
3130
+ """
3131
+ return asyncio.get_event_loop().run_until_complete(
3132
+ self._async_get_specification_property_by_guid(spec_property_guid, element_type, body,
3133
+ output_format, report_spec))
3134
+
3135
+
3136
+ @dynamic_catch
3137
+ async def _async_get_specification_property_types(self, output_format: str = 'JSON',
3138
+ report_spec: str | dict = None) -> dict | str | list[dict]:
3139
+ """Return the list of specification property types. Async version.
3140
+
3141
+ Parameters
3142
+ ----------
3143
+ output_format: str, default = "JSON"
3144
+ - one of "DICT", "MERMAID" or "JSON"
3145
+ report_spec: str | dict, optional, default = None
3146
+ The desired output columns/fields to include.
3147
+
3148
+ Returns
3149
+ -------
3150
+ dict | str
3151
+
3152
+ A JSON dict representing the list of properties.
3153
+
3154
+ Raises
3155
+ ------
3156
+ PyegeriaException
3157
+
3158
+ Notes
3159
+ ----
3160
+ Body sample:
3161
+ {
3162
+ "class": "GetRequestBody",
3163
+ "asOfTime": "{{$isoTimestamp}}",
3164
+ "effectiveTime": "{{$isoTimestamp}}",
3165
+ "forLineage": false,
3166
+ "forDuplicateProcessing": false
3167
+ }
3168
+ """
3169
+ url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/valid-metadata/"
3170
+ f"specification-properties/type-names")
3171
+ resp = await self._async_make_request("GET", url)
3172
+ element = resp.json().get("stringMap", NO_ELEMENTS_FOUND)
3173
+ if element == NO_ELEMENTS_FOUND or element is None:
3174
+ return NO_ELEMENTS_FOUND
3175
+ if output_format != "JSON":
3176
+ return self._generate_entity_output(element, "ALL", "SpecificationPropertyValues",
3177
+ output_format, report_spec)
3178
+ return element
3179
+
3180
+ return response
3181
+
3182
+ @dynamic_catch
3183
+ def get_specification_property_types(self, output_format: str = 'JSON', report_spec: str | dict = None) -> dict | str | list[dict]:
3184
+ """Return the list of specification property types.
3185
+
3186
+ Parameters
3187
+ ----------
3188
+ output_format: str, default = "JSON"
3189
+ - one of "DICT", "MERMAID" or "JSON"
3190
+ report_spec: str | dict, optional, default = None
3191
+ The desired output columns/fields to include.
3192
+
3193
+ Returns
3194
+ -------
3195
+ dict | str
3196
+
3197
+ A JSON dict representing the list of properties.
3198
+
3199
+ Raises
3200
+ ------
3201
+ PyegeriaException
3202
+
3203
+ Notes
3204
+ ----
3205
+ Body sample:
3206
+ {
3207
+ "class": "GetRequestBody",
3208
+ "asOfTime": "{{$isoTimestamp}}",
3209
+ "effectiveTime": "{{$isoTimestamp}}",
3210
+ "forLineage": false,
3211
+ "forDuplicateProcessing": false
3212
+ }
3213
+ """
3214
+ return asyncio.get_event_loop().run_until_complete(
3215
+ self._async_get_specification_property_types(output_format, report_spec))
3216
+
3217
+
3218
+
3219
+
3220
+ if __name__ == "__main__":
3221
+ print("Main-Valid Metadata Manager")