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
@@ -1,2326 +0,0 @@
1
- """PDX-License-Identifier: Apache-2.0
2
- Copyright Contributors to the ODPi Egeria project.
3
-
4
- This module provides access to the metadata-explorer OMVS module.
5
-
6
- [metadata-explorer](https://egeria-project.org/services/omvs/metadata-explorer/overview/)
7
-
8
- """
9
-
10
- import asyncio
11
-
12
- from httpx import Response
13
-
14
- from pyegeria.utils import body_slimmer
15
- from pyegeria._client import Client, max_paging_size
16
- from pyegeria._globals import default_time_out, NO_ELEMENTS_FOUND
17
-
18
-
19
-
20
- def query_seperator(current_string):
21
- if current_string == "":
22
- return "?"
23
- else:
24
- return "&"
25
-
26
-
27
- "params are in the form of [(paramName, value), (param2Name, value)] if the value is not None, it will be added to the query string"
28
-
29
-
30
- def query_string(params):
31
- result = ""
32
- for i in range(len(params)):
33
- if params[i][1] is not None:
34
- result = f"{result}{query_seperator(result)}{params[i][0]}={params[i][1]}"
35
- return result
36
-
37
-
38
- def base_path(client, view_server: str):
39
- return f"{client.platform_url}/servers/{view_server}/api/open-metadata/metadata-explorer"
40
-
41
-
42
- def process_related_element_list(
43
- response: Response, mermaid_only: bool, relationship_list: bool = False
44
- ) -> str | dict:
45
- """Process the result payload
46
-
47
- Parameters
48
- ----------
49
- response: Response
50
- - the response payload from the API call
51
- mermaid_only: bool
52
- - if true, only return the Mermaid graph
53
- relationship_list: bool
54
- - if True, look for "relationshipList" otherwise look for "relatedElementList"
55
-
56
- Returns
57
- -------
58
-
59
- """
60
- if relationship_list:
61
- elements = response.json().get("relationshipList", "No relationship list found")
62
- else:
63
- elements = response.json().get("relatedElementList", NO_ELEMENTS_FOUND)
64
-
65
- if isinstance(elements, str):
66
- return NO_ELEMENTS_FOUND
67
- if mermaid_only:
68
- return elements.get("mermaidGraph", "No mermaid graph found")
69
-
70
- el_list = elements.get("elementList", NO_ELEMENTS_FOUND)
71
- if isinstance(el_list, str):
72
- return el_list
73
-
74
- if len(el_list) == 0:
75
- return "No elements returned"
76
- return elements
77
-
78
-
79
- class MetadataExplorer(Client):
80
- """MetadataExplorer is a class that extends the Client class. The Metadata Explorer OMVS provides APIs for
81
- supporting the search, query and retrieval of open metadata. It is an advanced API for users that understands
82
- the Open Metadata Types.
83
-
84
- Attributes:
85
-
86
- view_server_name: str
87
- The name of the View Server to connect to.
88
- platform_url : str
89
- URL of the server platform to connect to
90
- user_id : str
91
- The identity of the user calling the method - this sets a
92
- default optionally used by the methods when the user
93
- doesn't pass the user_id on a method call.
94
- user_pwd: str
95
- The password associated with the user_id. Defaults to None
96
-
97
-
98
- """
99
-
100
- def __init__(
101
- self,
102
- view_server: str,
103
- platform_url: str,
104
- user_id: str = None,
105
- user_pwd: str = None,
106
- token: str = None,
107
- ):
108
- self.view_server = view_server
109
- self.platform_url = platform_url
110
- self.user_id = user_id
111
- self.user_pwd = user_pwd
112
- self.metadata_explorer_command_root: str = (
113
- f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/metadata-explorer"
114
- )
115
- Client.__init__(
116
- self,
117
- view_server,
118
- platform_url,
119
- user_id=user_id,
120
- user_pwd=user_pwd,
121
- token=token,
122
- )
123
-
124
- #
125
- # Get
126
- #
127
-
128
- async def _async_get_metadata_guid_by_unique_name(
129
- self,
130
- name: str,
131
- property_name: str,
132
- effective_time: str = None,
133
- for_lineage: bool = None,
134
- for_duplicate_processing: bool = None,
135
- ) -> str:
136
- """
137
- Retrieve the metadata element GUID using its unique name (typically the qualified name, but it is possible to
138
- specify a different property name in the request body as long as it is unique).
139
- If multiple matching instances are found, an exception is thrown. Async version.
140
-
141
- Parameters
142
- ----------
143
- name : str
144
- - unique name to search for
145
- property_name: str
146
- - property name to search in (typically the qualified name)
147
- effective_time: str, default = None
148
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
149
- for_lineage: bool, default is set by server
150
- - determines if elements classified as Memento should be returned - normally false
151
- for_duplicate_processing: bool, default is set by server
152
- - Normally false. Set true when the caller is part of a deduplication function
153
-
154
- Returns
155
- -------
156
- str
157
- The GUID of the element - or "No element found"
158
-
159
- Raises
160
- ------
161
- InvalidParameterException
162
- one of the parameters is null or invalid or
163
- PropertyServerException
164
- There is a problem adding the element properties to the metadata repository or
165
- UserNotAuthorizedException
166
- the requesting user is not authorized to issue this request.
167
- """
168
-
169
- possible_query_params = query_string(
170
- [
171
- ("forLineage", for_lineage),
172
- ("forDuplicateProcessing", for_duplicate_processing),
173
- ]
174
- )
175
-
176
- body = {
177
- "class": "NameRequestBody",
178
- "name": name,
179
- "namePropertyName": property_name,
180
- "effectiveTime": effective_time,
181
- }
182
-
183
- url = (
184
- f"{base_path(self, self.view_server)}/metadata-elements/guid-by-unique-name"
185
- f"{possible_query_params}"
186
- )
187
- response: Response = await self._async_make_request(
188
- "POST", url, body_slimmer(body)
189
- )
190
- return response.json().get("guid", NO_ELEMENTS_FOUND)
191
-
192
- def get_metadata_guid_by_unique_name(
193
- self,
194
- name: str,
195
- property_name: str,
196
- effective_time: str = None,
197
- for_lineage: bool = None,
198
- for_duplicate_processing: bool = None,
199
- ) -> str:
200
- """
201
- Retrieve the metadata element GUID using its unique name (typically the qualified name, but it is possible to
202
- specify a different property name in the request body as long as it is unique).
203
- If multiple matching instances are found, an exception is thrown.
204
-
205
- Parameters
206
- ----------
207
- name : str
208
- - unique name to search for
209
- property_name: str
210
- - property name to search in (typically the qualified name)
211
- effective_time: str, default = None
212
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
213
- for_lineage: bool, default is set by server
214
- - determines if elements classified as Memento should be returned - normally false
215
- for_duplicate_processing: bool, default is set by server
216
- - Normally false. Set true when the caller is part of a deduplication function
217
-
218
- Returns
219
- -------
220
- str
221
- The GUID of the element - or "No element found"
222
-
223
- Raises
224
- ------
225
- InvalidParameterException
226
- one of the parameters is null or invalid or
227
- PropertyServerException
228
- There is a problem adding the element properties to the metadata repository or
229
- UserNotAuthorizedException
230
- the requesting user is not authorized to issue this request.
231
- """
232
-
233
- loop = asyncio.get_event_loop()
234
- response = loop.run_until_complete(
235
- self._async_get_metadata_guid_by_unique_name(
236
- name,
237
- property_name,
238
- effective_time,
239
- for_lineage,
240
- for_duplicate_processing,
241
- )
242
- )
243
- return response
244
-
245
- async def _async_get_metadata_element_by_guid(
246
- self,
247
- guid: str,
248
- effective_time: str = None,
249
- as_of_time: str = None,
250
- for_lineage: bool = None,
251
- for_duplicate_processing: bool = None,
252
- ) -> dict | str:
253
- """
254
- Retrieve the metadata element using its unique identifier. Async version.
255
-
256
- Parameters
257
- ----------
258
- guid : str
259
- - unique identifier of the element to retrieve
260
- effective_time: str, default = None
261
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
262
- as_of_time: str, default = None
263
- - Query the element as of this time. If None, then use current time.
264
- for_lineage: bool, default is set by server
265
- - determines if elements classified as Memento should be returned - normally false
266
- for_duplicate_processing: bool, default is set by server
267
- - Normally false. Set true when the caller is part of a deduplication function
268
-
269
- Returns
270
- -------
271
- dict | str
272
- If the element is found, a dict of the element details is returned. Otherwise the string "No element found".
273
-
274
- Raises
275
- ------
276
- InvalidParameterException
277
- one of the parameters is null or invalid or
278
- PropertyServerException
279
- There is a problem adding the element properties to the metadata repository or
280
- UserNotAuthorizedException
281
- the requesting user is not authorized to issue this request.
282
- """
283
-
284
- possible_query_params = query_string(
285
- [
286
- ("forLineage", for_lineage),
287
- ("forDuplicateProcessing", for_duplicate_processing),
288
- ]
289
- )
290
-
291
- body = {
292
- "class": "AnyTimeRequestBody",
293
- "effectiveTime": effective_time,
294
- "asOfTime": as_of_time,
295
- }
296
-
297
- url = (
298
- f"{base_path(self, self.view_server)}/metadata-elements/{guid}"
299
- f"{possible_query_params}"
300
- )
301
- response: Response = await self._async_make_request(
302
- "POST", url, body_slimmer(body)
303
- )
304
- return response.json().get("element", NO_ELEMENTS_FOUND)
305
-
306
- def get_metadata_element_by_guid(
307
- self,
308
- guid: str,
309
- effective_time: str = None,
310
- as_of_time: str = None,
311
- for_lineage: bool = None,
312
- for_duplicate_processing: bool = None,
313
- ) -> dict | str:
314
- """
315
- Retrieve the metadata element using its unique identifier.
316
-
317
- Parameters
318
- ----------
319
- guid : str
320
- - unique identifier of the element to retrieve
321
- effective_time: str, default = None
322
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
323
- as_of_time: str, default = None
324
- - Query the element as of this time. If None, then use current time.
325
- for_lineage: bool, default is set by server
326
- - determines if elements classified as Memento should be returned - normally false
327
- for_duplicate_processing: bool, default is set by server
328
- - Normally false. Set true when the caller is part of a deduplication function
329
-
330
- Returns
331
- -------
332
- dict | str
333
- If the element is found, a dict of the element details is returned. Otherwise the string "No element found".
334
-
335
- Raises
336
- ------
337
- InvalidParameterException
338
- one of the parameters is null or invalid or
339
- PropertyServerException
340
- There is a problem adding the element properties to the metadata repository or
341
- UserNotAuthorizedException
342
- the requesting user is not authorized to issue this request.
343
- """
344
-
345
- loop = asyncio.get_event_loop()
346
- response = loop.run_until_complete(
347
- self._async_get_metadata_element_by_guid(
348
- guid, effective_time, for_lineage, for_duplicate_processing
349
- )
350
- )
351
- return response
352
-
353
- async def _async_get_anchored_metadata_element_graph(
354
- self,
355
- guid: str,
356
- effective_time: str = None,
357
- as_of_time: str = None,
358
- for_lineage: bool = None,
359
- for_duplicate_processing: bool = None,
360
- mermaid_only: bool = False,
361
- ) -> dict | str:
362
- """
363
- Retrieve the metadata element and all of its anchored elements using its unique identifier. Async version.
364
-
365
- Parameters
366
- ----------
367
- guid : str
368
- - unique identifier of the element to retrieve
369
- effective_time: str, default = None
370
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
371
- as_of_time: str, default = None
372
- - Query the element as of this time. If None, then use current time.
373
- for_lineage: bool, default is set by server
374
- - determines if elements classified as Memento should be returned - normally false
375
- for_duplicate_processing: bool, default is set by server
376
- - Normally false. Set true when the caller is part of a deduplication function
377
- mermaid_only: bool, default is False
378
- - if true only a string representing the mermaid graph will be returned
379
-
380
- Returns
381
- -------
382
- dict | str
383
- If the element is found, and mermaid_only is False, a dict of the element details is returned.
384
- If mermaid_only is True, a string representing the mermaid graph will be returned.
385
- If no elements found, string "No element found".
386
-
387
- Raises
388
- ------
389
- InvalidParameterException
390
- one of the parameters is null or invalid or
391
- PropertyServerException
392
- There is a problem adding the element properties to the metadata repository or
393
- UserNotAuthorizedException
394
- the requesting user is not authorized to issue this request.
395
- """
396
-
397
- possible_query_params = query_string(
398
- [
399
- ("forLineage", for_lineage),
400
- ("forDuplicateProcessing", for_duplicate_processing),
401
- ]
402
- )
403
-
404
- body = {
405
- "class": "AnyTimeRequestBody",
406
- "effectiveTime": effective_time,
407
- "asOfTime": as_of_time,
408
- }
409
-
410
- url = (
411
- f"{base_path(self, self.view_server)}/metadata-elements/{guid}/with-anchored-elements"
412
- f"{possible_query_params}"
413
- )
414
- response: Response = await self._async_make_request(
415
- "POST", url, body_slimmer(body)
416
- )
417
- # if mermaid_only:
418
- # return response.json()["elementGraph"].get(
419
- # "mermaidGraph", NO_ELEMENTS_FOUND
420
- # )
421
- # else:
422
- # return response.json().get("elementGraph", NO_ELEMENTS_FOUND)
423
- if isinstance(response, str):
424
- return NO_ELEMENTS_FOUND
425
- el_list = response.json().get("elementGraph", NO_ELEMENTS_FOUND)
426
- if isinstance(el_list, str):
427
- return el_list
428
- if mermaid_only:
429
- return el_list.get("mermaidGraph", "No mermaid graph found")
430
- if len(el_list) == 0:
431
- return "No elements returned"
432
- return el_list
433
-
434
- def get_anchored_metadata_element_graph(
435
- self,
436
- guid: str,
437
- effective_time: str = None,
438
- as_of_time: str = None,
439
- for_lineage: bool = None,
440
- for_duplicate_processing: bool = None,
441
- mermaid_only: bool = False,
442
- ) -> dict | str:
443
- """
444
- Retrieve the metadata element and all of its anchored elements using its unique identifier. Async version.
445
-
446
- Parameters
447
- ----------
448
- guid : str
449
- - unique identifier of the element to retrieve
450
- effective_time: str, default = None
451
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
452
- as_of_time: str, default = None
453
- - Query the element as of this time. If None, then use current time.
454
- for_lineage: bool, default is set by server
455
- - determines if elements classified as Memento should be returned - normally false
456
- for_duplicate_processing: bool, default is set by server
457
- - Normally false. Set true when the caller is part of a deduplication function
458
- mermaid_only: bool, default is False
459
- - if true only a string representing the mermaid graph will be returned
460
-
461
- Returns
462
- -------
463
- dict | str
464
- If the element is found, and mermaid_only is False, a dict of the element details is returned.
465
- If mermaid_only is True, a string representing the mermaid graph will be returned.
466
- If no elements found, string "No element found".
467
-
468
- Raises
469
- ------
470
- InvalidParameterException
471
- one of the parameters is null or invalid or
472
- PropertyServerException
473
- There is a problem adding the element properties to the metadata repository or
474
- UserNotAuthorizedException
475
- the requesting user is not authorized to issue this request.
476
- """
477
-
478
- loop = asyncio.get_event_loop()
479
- response = loop.run_until_complete(
480
- self._async_get_anchored_metadata_element_graph(
481
- guid,
482
- effective_time,
483
- as_of_time,
484
- for_lineage,
485
- for_duplicate_processing,
486
- mermaid_only,
487
- )
488
- )
489
- return response
490
-
491
- async def _async_get_metadata_element_by_unique_name(
492
- self,
493
- name: str,
494
- property_name: str = "qualifiedName",
495
- effective_time: str = None,
496
- for_lineage: bool = None,
497
- for_duplicate_processing: bool = None,
498
- ) -> dict | str:
499
- """
500
- Retrieve the metadata element using its unique name (typically the *qualifiedName* attribute but other attributes
501
- can be used if they are unique - such as *pathName* for a file). Async version.
502
-
503
- Parameters
504
- ----------
505
- name : str
506
- - unique name to search for
507
- property_name: str, default = "qualifiedName"
508
- - property name to search in (typically the qualified name)
509
- effective_time: str, default = None
510
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
511
- for_lineage: bool, default is set by server
512
- - determines if elements classified as Memento should be returned - normally false
513
- for_duplicate_processing: bool, default is set by server
514
- - Normally false. Set true when the caller is part of a deduplication function
515
-
516
- Returns
517
- -------
518
- dict | str
519
- If the element is found, a dict of the element details is returned. Otherwise the string "No element found".
520
-
521
- Raises
522
- ------
523
- InvalidParameterException
524
- one of the parameters is null or invalid or
525
- PropertyServerException
526
- There is a problem adding the element properties to the metadata repository or
527
- UserNotAuthorizedException
528
- the requesting user is not authorized to issue this request.
529
- """
530
-
531
- possible_query_params = query_string(
532
- [
533
- ("forLineage", for_lineage),
534
- ("forDuplicateProcessing", for_duplicate_processing),
535
- ]
536
- )
537
-
538
- body = {
539
- "class": "NameRequestBody",
540
- "name": name,
541
- "namePropertyName": property_name,
542
- "effectiveTime": effective_time,
543
- }
544
-
545
- url = (
546
- f"{base_path(self, self.view_server)}/metadata-elements/by-unique-name"
547
- f"{possible_query_params}"
548
- )
549
- response: Response = await self._async_make_request(
550
- "POST", url, body_slimmer(body)
551
- )
552
- return response.json().get("element", NO_ELEMENTS_FOUND)
553
-
554
- def get_metadata_element_by_unique_name(
555
- self,
556
- name: str,
557
- property_name: str = "qualifiedName",
558
- effective_time: str = None,
559
- for_lineage: bool = False,
560
- for_duplicate_processing: bool = False,
561
- ) -> str:
562
- """
563
- Retrieve the metadata element using its unique name (typically the *qualifiedName* attribute but other attributes
564
- can be used if they are unique - such as *pathName* for a file).
565
-
566
- Parameters
567
- ----------
568
- name : str
569
- - unique name to search for
570
- property_name: str, default = "qualifiedName"
571
- - property name to search in (typically the qualified name)
572
- effective_time: str, default = None
573
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
574
- for_lineage: bool, default is set by server
575
- - determines if elements classified as Memento should be returned - normally false
576
- for_duplicate_processing: bool, default is set by server
577
- - Normally false. Set true when the caller is part of a deduplication function
578
-
579
- Returns
580
- -------
581
- dict | str
582
- If the element is found, a dict of the element details is returned. Otherwise the string "No element found".
583
-
584
-
585
- Raises
586
- ------
587
- InvalidParameterException
588
- one of the parameters is null or invalid or
589
- PropertyServerException
590
- There is a problem adding the element properties to the metadata repository or
591
- UserNotAuthorizedException
592
- the requesting user is not authorized to issue this request.
593
- """
594
-
595
- loop = asyncio.get_event_loop()
596
- response = loop.run_until_complete(
597
- self._async_get_metadata_element_by_unique_name(
598
- name,
599
- property_name,
600
- effective_time,
601
- for_lineage,
602
- for_duplicate_processing,
603
- )
604
- )
605
- return response
606
-
607
- async def _async_get_metadata_element_history(
608
- self,
609
- guid: str,
610
- effective_time: str = None,
611
- oldest_first: bool = False,
612
- from_time: str = None,
613
- to_time: str = None,
614
- for_lineage: bool = None,
615
- for_duplicate_processing: bool = None,
616
- start_from: int = 0,
617
- page_size: int = max_paging_size,
618
- time_out: int = default_time_out,
619
- mermaid_only: bool = False,
620
- ) -> list | str:
621
- """
622
- Retrieve all the versions of a metadata element. Async version.
623
-
624
- Parameters
625
- ----------
626
- guid: str
627
- - Unique identity of element to retrieve.
628
- effective_time: str, default = None
629
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
630
- oldest_first: bool, default = False
631
- from_time: str, default = None
632
- Time to begin returning history
633
- to_time: str, default = None
634
- Time to end returning history
635
- for_lineage: bool, default is set by server
636
- - determines if elements classified as Memento should be returned - normally false
637
- for_duplicate_processing: bool, default is set by server
638
- - Normally false. Set true when the caller is part of a deduplication function
639
- start_from: int, default = 0
640
- - index of the list to start from (0 for start).
641
- page_size
642
- - maximum number of elements to return.
643
- time_out: int, default = default_time_out
644
- - http request timeout for this request
645
-
646
- Returns
647
- -------
648
- [dict] | str
649
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
650
- If mermaid_only is True, a string representing the mermaid graph will be returned.
651
- If no elements found, string "No element found".
652
-
653
- Raises
654
- ------
655
- InvalidParameterException
656
- one of the parameters is null or invalid or
657
- PropertyServerException
658
- There is a problem adding the element properties to the metadata repository or
659
- UserNotAuthorizedException
660
- the requesting user is not authorized to issue this request.
661
- """
662
-
663
- possible_query_params = query_string(
664
- [
665
- ("startFrom", start_from),
666
- ("pageSize", page_size),
667
- ("oldestFirst", oldest_first),
668
- ("forLineage", for_lineage),
669
- ("forDuplicateProcessing", for_duplicate_processing),
670
- ]
671
- )
672
-
673
- body = {
674
- "class": "HistoryRequestBody",
675
- "effectiveTime": effective_time,
676
- "fromTime": from_time,
677
- "toTime": to_time,
678
- }
679
-
680
- url = (
681
- f"{base_path(self, self.view_server)}/metadata-elements/{guid}/history"
682
- f"{possible_query_params}"
683
- )
684
-
685
- response: Response = await self._async_make_request(
686
- "POST", url, body_slimmer(body), time_out=time_out
687
- )
688
-
689
- elements = response.json().get("elementList", NO_ELEMENTS_FOUND)
690
- if type(elements) is list:
691
- if len(elements) == 0:
692
- return NO_ELEMENTS_FOUND
693
- return elements
694
-
695
- def get_metadata_element_history(
696
- self,
697
- guid: str,
698
- effective_time: str = None,
699
- oldest_first: bool = False,
700
- from_time: str = None,
701
- to_time: str = None,
702
- for_lineage: bool = None,
703
- for_duplicate_processing: bool = None,
704
- start_from: int = 0,
705
- page_size: int = max_paging_size,
706
- time_out: int = default_time_out,
707
- mermaid_only: bool = False,
708
- ) -> list | str:
709
- """
710
- Retrieve all the versions of a metadata element.
711
-
712
- Parameters
713
- ----------
714
- guid: str
715
- - Unique identity of element to retrieve.
716
- effective_time: str, default = None
717
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
718
- oldest_first: bool, default = False
719
- from_time: str, default = None
720
- Time to begin returning history
721
- to_time: str, default = None
722
- Time to end returning history
723
- for_lineage: bool, default is set by server
724
- - determines if elements classified as Memento should be returned - normally false
725
- for_duplicate_processing: bool, default is set by server
726
- - Normally false. Set true when the caller is part of a deduplication function
727
- start_from: int, default = 0
728
- - index of the list to start from (0 for start).
729
- page_size
730
- - maximum number of elements to return.
731
- time_out: int, default = default_time_out
732
- - http request timeout for this request
733
-
734
- Returns
735
- -------
736
- [dict] | str
737
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
738
- If mermaid_only is True, a string representing the mermaid graph will be returned.
739
- If no elements found, string "No element found".
740
-
741
- Raises
742
- ------
743
- InvalidParameterException
744
- one of the parameters is null or invalid or
745
- PropertyServerException
746
- There is a problem adding the element properties to the metadata repository or
747
- UserNotAuthorizedException
748
- the requesting user is not authorized to issue this request.
749
- """
750
-
751
- loop = asyncio.get_event_loop()
752
- response = loop.run_until_complete(
753
- self._async_get_metadata_element_history(
754
- guid,
755
- effective_time,
756
- oldest_first,
757
- from_time,
758
- to_time,
759
- for_lineage,
760
- for_duplicate_processing,
761
- start_from,
762
- page_size,
763
- time_out,
764
- mermaid_only,
765
- )
766
- )
767
- return response
768
-
769
- async def _async_find_metadata_elements_with_string(
770
- self,
771
- body: dict,
772
- for_lineage: bool = None,
773
- for_duplicate_processing: bool = None,
774
- start_from: int = 0,
775
- page_size: int = max_paging_size,
776
- time_out: int = default_time_out,
777
- ) -> list | str:
778
- """
779
- Return a list of metadata elements that match the supplied criteria. The results can be returned over many pages.
780
- Async version.
781
-
782
- Parameters
783
- ----------
784
- body: dict
785
- - A structure containing the search criteria. (example below)
786
- for_lineage: bool, default is set by server
787
- - determines if elements classified as Memento should be returned - normally false
788
- for_duplicate_processing: bool, default is set by server
789
- - Normally false. Set true when the caller is part of a deduplication function
790
- start_from: int, default = 0
791
- - index of the list to start from (0 for start).
792
- page_size
793
- - maximum number of elements to return.
794
- time_out: int, default = default_time_out
795
- - http request timeout for this request
796
-
797
- Returns
798
- -------
799
- [dict] | str
800
- Returns a string if no elements found and a list of dict of elements with the results.
801
-
802
- Raises
803
- ------
804
- InvalidParameterException
805
- one of the parameters is null or invalid or
806
- PropertyServerException
807
- There is a problem adding the element properties to the metadata repository or
808
- UserNotAuthorizedException
809
- the requesting user is not authorized to issue this request.
810
-
811
- Notes:
812
-
813
- Sample body:
814
- {
815
- "class" : "SearchStringRequestBody",
816
- "searchString" : "Egeria",
817
- "typeName" : "ValidValueDefinition",
818
- "effectiveTime" : "{{$isoTimestamp}}",
819
- "limitResultsByStatus" : ["ACTIVE"],
820
- "asOfTime" : "{{$isoTimestamp}}",
821
- "sequencingOrder": "CREATION_DATE_RECENT",
822
- "sequencingProperty": ""
823
- }
824
-
825
- """
826
-
827
- possible_query_params = query_string(
828
- [
829
- ("startFrom", start_from),
830
- ("pageSize", page_size),
831
- ("forLineage", for_lineage),
832
- ("forDuplicateProcessing", for_duplicate_processing),
833
- ]
834
- )
835
-
836
- url = (
837
- f"{base_path(self, self.view_server)}/metadata-elements/by-search-string"
838
- f"{possible_query_params}"
839
- )
840
-
841
- response: Response = await self._async_make_request(
842
- "POST", url, body_slimmer(body), time_out=time_out
843
- )
844
-
845
- elements = response.json().get("elementList", NO_ELEMENTS_FOUND)
846
- if type(elements) is list:
847
- if len(elements) == 0:
848
- return NO_ELEMENTS_FOUND
849
- return elements
850
-
851
- def find_metadata_elements_with_string(
852
- self,
853
- body: dict,
854
- for_lineage: bool = None,
855
- for_duplicate_processing: bool = None,
856
- start_from: int = 0,
857
- page_size: int = max_paging_size,
858
- time_out: int = default_time_out,
859
- ) -> list | str:
860
- """
861
- Return a list of metadata elements that match the supplied criteria. The results can be returned over many pages.
862
- Async version.
863
-
864
- Parameters
865
- ----------
866
- body: dict
867
- - A structure containing the search criteria. (example below)
868
- for_lineage: bool, default is set by server
869
- - determines if elements classified as Memento should be returned - normally false
870
- for_duplicate_processing: bool, default is set by server
871
- - Normally false. Set true when the caller is part of a deduplication function
872
- start_from: int, default = 0
873
- - index of the list to start from (0 for start).
874
- page_size
875
- - maximum number of elements to return.
876
- time_out: int, default = default_time_out
877
- - http request timeout for this request
878
-
879
- Returns
880
- -------
881
- [dict] | str
882
- Returns a string if no elements found and a list of dict of elements with the results.
883
-
884
- Raises
885
- ------
886
- InvalidParameterException
887
- one of the parameters is null or invalid or
888
- PropertyServerException
889
- There is a problem adding the element properties to the metadata repository or
890
- UserNotAuthorizedException
891
- the requesting user is not authorized to issue this request.
892
-
893
- Notes:
894
-
895
- Sample body:
896
- {
897
- "class" : "SearchStringRequestBody",
898
- "searchString" : "Egeria",
899
- "typeName" : "ValidValueDefinition",
900
- "effectiveTime" : "{{$isoTimestamp}}",
901
- "limitResultsByStatus" : ["ACTIVE"],
902
- "asOfTime" : "{{$isoTimestamp}}",
903
- "sequencingOrder": "CREATION_DATE_RECENT",
904
- "sequencingProperty": ""
905
- }
906
-
907
- """
908
- loop = asyncio.get_event_loop()
909
- response = loop.run_until_complete(
910
- self._async_find_metadata_elements_with_string(
911
- body,
912
- for_lineage,
913
- for_duplicate_processing,
914
- start_from,
915
- page_size,
916
- time_out,
917
- )
918
- )
919
- return response
920
-
921
- async def _async_get_all_related_metadata_elements(
922
- self,
923
- guid: str,
924
- body: dict,
925
- for_lineage: bool = None,
926
- for_duplicate_processing: bool = None,
927
- starting_at_end: int = 0,
928
- start_from: int = 0,
929
- page_size: int = max_paging_size,
930
- time_out: int = default_time_out,
931
- mermaid_only: bool = False,
932
- ) -> list | str:
933
- """
934
- Retrieve the metadata elements connected to the supplied element.
935
- Async version.
936
-
937
- Parameters
938
- ----------
939
- guid: str
940
- - Unique identity of element to retrieve.
941
- body: dict
942
- - A structure containing the search criteria. (example below)
943
- for_lineage: bool, default is set by server
944
- - determines if elements classified as Memento should be returned - normally false
945
- for_duplicate_processing: bool, default is set by server
946
- - Normally false. Set true when the caller is part of a deduplication function
947
- starting_at_end: int, default = 0
948
- - Relationship end to start from.
949
- start_from: int, default = 0
950
- - index of the list to start from (0 for start).
951
- page_size
952
- - maximum number of elements to return.
953
- time_out: int, default = default_time_out
954
- - http request timeout for this request
955
- mermaid_only: bool, default is False
956
- - if true only a string representing the mermaid graph will be returned
957
-
958
-
959
- Returns
960
- -------
961
- [dict] | str
962
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
963
- If mermaid_only is True, a string representing the mermaid graph will be returned.
964
- If no elements found, string "No element found".
965
- Raises
966
- ------
967
- InvalidParameterException
968
- one of the parameters is null or invalid or
969
- PropertyServerException
970
- There is a problem adding the element properties to the metadata repository or
971
- UserNotAuthorizedException
972
- the requesting user is not authorized to issue this request.
973
-
974
- Notes:
975
-
976
- Sample body:
977
- {
978
- "class" : "ResultsRequestBody",
979
- "effectiveTime" : "{{$isoTimestamp}}",
980
- "limitResultsByStatus" : ["ACTIVE"],
981
- "asOfTime" : "{{$isoTimestamp}}",
982
- "sequencingOrder": "PROPERTY_ASCENDING",
983
- "sequencingProperty": "fileName"
984
- }
985
-
986
- """
987
-
988
- possible_query_params = query_string(
989
- [
990
- ("startingAtEnd", starting_at_end),
991
- ("startFrom", start_from),
992
- ("pageSize", page_size),
993
- ("forLineage", for_lineage),
994
- ("forDuplicateProcessing", for_duplicate_processing),
995
- ]
996
- )
997
-
998
- url = (
999
- f"{base_path(self, self.view_server)}/related-elements/{guid}/any-type"
1000
- f"{possible_query_params}"
1001
- )
1002
-
1003
- response: Response = await self._async_make_request(
1004
- "POST", url, body_slimmer(body), time_out=time_out
1005
- )
1006
- return process_related_element_list(response, mermaid_only)
1007
-
1008
- def get_all_related_metadata_elements(
1009
- self,
1010
- guid: str,
1011
- body: dict,
1012
- for_lineage: bool = None,
1013
- for_duplicate_processing: bool = None,
1014
- starting_at_end: int = 0,
1015
- start_from: int = 0,
1016
- page_size: int = max_paging_size,
1017
- time_out: int = default_time_out,
1018
- mermaid_only: bool = False,
1019
- ) -> list | str:
1020
- """
1021
- Retrieve the metadata elements connected to the supplied element.
1022
-
1023
- Parameters
1024
- ----------
1025
- guid: str
1026
- - unique identity of element
1027
- body: dict
1028
- - A structure containing the search criteria. (example below)
1029
- for_lineage: bool, default is set by server
1030
- - determines if elements classified as Memento should be returned - normally false
1031
- for_duplicate_processing: bool, default is set by server
1032
- - Normally false. Set true when the caller is part of a deduplication function
1033
- starting_at_end: int, default = 0
1034
- - Relationship end to start from.
1035
- start_from: int, default = 0
1036
- - index of the list to start from (0 for start).
1037
- page_size
1038
- - maximum number of elements to return.
1039
- time_out: int, default = default_time_out
1040
- - http request timeout for this request
1041
- mermaid_only: bool, default is False
1042
- - if true only a string representing the mermaid graph will be returned
1043
-
1044
-
1045
- Returns
1046
- -------
1047
- [dict] | str
1048
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
1049
- If mermaid_only is True, a string representing the mermaid graph will be returned.
1050
- If no elements found, string "No element found".
1051
-
1052
- Raises
1053
- ------
1054
- InvalidParameterException
1055
- one of the parameters is null or invalid or
1056
- PropertyServerException
1057
- There is a problem adding the element properties to the metadata repository or
1058
- UserNotAuthorizedException
1059
- the requesting user is not authorized to issue this request.
1060
-
1061
- Notes:
1062
-
1063
- Sample body:
1064
- {
1065
- "class" : "ResultsRequestBody",
1066
- "effectiveTime" : "{{$isoTimestamp}}",
1067
- "limitResultsByStatus" : ["ACTIVE"],
1068
- "asOfTime" : "{{$isoTimestamp}}",
1069
- "sequencingOrder": "PROPERTY_ASCENDING",
1070
- "sequencingProperty": "fileName"
1071
- }
1072
-
1073
- """
1074
- loop = asyncio.get_event_loop()
1075
- response = loop.run_until_complete(
1076
- self._async_get_all_related_metadata_elements(
1077
- guid,
1078
- body,
1079
- for_lineage,
1080
- for_duplicate_processing,
1081
- starting_at_end,
1082
- start_from,
1083
- page_size,
1084
- time_out,
1085
- mermaid_only,
1086
- )
1087
- )
1088
- return response
1089
-
1090
- async def _async_get_related_metadata_elements(
1091
- self,
1092
- guid: str,
1093
- relationship_type: str,
1094
- body: dict,
1095
- for_lineage: bool = None,
1096
- for_duplicate_processing: bool = None,
1097
- starting_at_end: int = 0,
1098
- start_from: int = 0,
1099
- page_size: int = max_paging_size,
1100
- time_out: int = default_time_out,
1101
- mermaid_only: bool = False,
1102
- ) -> list | str:
1103
- """
1104
- Retrieve the metadata elements connected to the supplied element.
1105
- Async version.
1106
-
1107
- Parameters
1108
- ----------
1109
- guid: str
1110
- - Unique identity of element to retrieve.
1111
- relationship_type: str
1112
- - name of relationship type to retrieve relationships of
1113
- body: dict
1114
- - A structure containing the search criteria. (example below)
1115
- for_lineage: bool, default is set by server
1116
- - determines if elements classified as Memento should be returned - normally false
1117
- for_duplicate_processing: bool, default is set by server
1118
- - Normally false. Set true when the caller is part of a deduplication function
1119
- starting_at_end: int, default = 0
1120
- - Relationship end to start from.
1121
- start_from: int, default = 0
1122
- - index of the list to start from (0 for start).
1123
- page_size
1124
- - maximum number of elements to return.
1125
- time_out: int, default = default_time_out
1126
- - http request timeout for this request
1127
- mermaid_only: bool, default is False
1128
- - if true only a string representing the mermaid graph will be returned
1129
-
1130
- Returns
1131
- -------
1132
- [dict] | str
1133
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
1134
- If mermaid_only is True, a string representing the mermaid graph will be returned.
1135
- If no elements found, string "No element found".
1136
-
1137
- Raises
1138
- ------
1139
- InvalidParameterException
1140
- one of the parameters is null or invalid or
1141
- PropertyServerException
1142
- There is a problem adding the element properties to the metadata repository or
1143
- UserNotAuthorizedException
1144
- the requesting user is not authorized to issue this request.
1145
-
1146
- Notes:
1147
-
1148
- Sample body:
1149
- {
1150
- "class" : "ResultsRequestBody",
1151
- "effectiveTime" : "{{$isoTimestamp}}",
1152
- "limitResultsByStatus" : ["ACTIVE"],
1153
- "asOfTime" : "{{$isoTimestamp}}",
1154
- "sequencingOrder": "PROPERTY_ASCENDING",
1155
- "sequencingProperty": "fileName"
1156
- }
1157
-
1158
- """
1159
-
1160
- possible_query_params = query_string(
1161
- [
1162
- ("startingAtEnd", starting_at_end),
1163
- ("startFrom", start_from),
1164
- ("pageSize", page_size),
1165
- ("forLineage", for_lineage),
1166
- ("forDuplicateProcessing", for_duplicate_processing),
1167
- ]
1168
- )
1169
-
1170
- url = (
1171
- f"{base_path(self, self.view_server)}/related-elements/{guid}/type/{relationship_type}"
1172
- f"{possible_query_params}"
1173
- )
1174
-
1175
- response: Response = await self._async_make_request(
1176
- "POST", url, body_slimmer(body), time_out=time_out
1177
- )
1178
-
1179
- return process_related_element_list(response, mermaid_only)
1180
-
1181
- def get_related_metadata_elements(
1182
- self,
1183
- guid: str,
1184
- relationship_type: str,
1185
- body: dict,
1186
- for_lineage: bool = None,
1187
- for_duplicate_processing: bool = None,
1188
- starting_at_end: int = 0,
1189
- start_from: int = 0,
1190
- page_size: int = max_paging_size,
1191
- time_out: int = default_time_out,
1192
- mermaid_only: bool = False,
1193
- ) -> list | str:
1194
- """
1195
- Retrieve the metadata elements connected to the supplied element.
1196
-
1197
- Parameters
1198
- ----------
1199
- guid: str
1200
- - Unique identity of element to retrieve.
1201
- relationship_type: str
1202
- - name of relationship type to retrieve relationships of
1203
- body: dict
1204
- - A structure containing the search criteria. (example below)
1205
- for_lineage: bool, default is set by server
1206
- - determines if elements classified as Memento should be returned - normally false
1207
- for_duplicate_processing: bool, default is set by server
1208
- - Normally false. Set true when the caller is part of a deduplication function
1209
- starting_at_end: int, default = 0
1210
- - Relationship end to start from.
1211
- start_from: int, default = 0
1212
- - index of the list to start from (0 for start).
1213
- page_size
1214
- - maximum number of elements to return.
1215
- time_out: int, default = default_time_out
1216
- - http request timeout for this request
1217
- mermaid_only: bool, default is False
1218
- - if true only a string representing the mermaid graph will be returned
1219
-
1220
- Returns
1221
- -------
1222
- [dict] | str
1223
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
1224
- If mermaid_only is True, a string representing the mermaid graph will be returned.
1225
- If no elements found, string "No element found".
1226
-
1227
- Raises
1228
- ------
1229
- InvalidParameterException
1230
- one of the parameters is null or invalid or
1231
- PropertyServerException
1232
- There is a problem adding the element properties to the metadata repository or
1233
- UserNotAuthorizedException
1234
- the requesting user is not authorized to issue this request.
1235
-
1236
- Notes:
1237
-
1238
- Sample body:
1239
- {
1240
- "class" : "ResultsRequestBody",
1241
- "effectiveTime" : "{{$isoTimestamp}}",
1242
- "limitResultsByStatus" : ["ACTIVE"],
1243
- "asOfTime" : "{{$isoTimestamp}}",
1244
- "sequencingOrder": "PROPERTY_ASCENDING",
1245
- "sequencingProperty": "fileName"
1246
- }
1247
-
1248
- """
1249
- loop = asyncio.get_event_loop()
1250
- response = loop.run_until_complete(
1251
- self._async_get_related_metadata_elements(
1252
- guid,
1253
- relationship_type,
1254
- body,
1255
- for_lineage,
1256
- for_duplicate_processing,
1257
- starting_at_end,
1258
- start_from,
1259
- page_size,
1260
- time_out,
1261
- mermaid_only,
1262
- )
1263
- )
1264
- return response
1265
-
1266
- async def _async_get_all_metadata_element_relationships(
1267
- self,
1268
- end1_guid: str,
1269
- end2_guid: str,
1270
- body: dict,
1271
- for_lineage: bool = None,
1272
- for_duplicate_processing: bool = None,
1273
- starting_at_end: int = 0,
1274
- start_from: int = 0,
1275
- page_size: int = max_paging_size,
1276
- time_out: int = default_time_out,
1277
- mermaid_only: bool = False,
1278
- ) -> list | str:
1279
- """
1280
- Retrieve the relationships linking the supplied elements.
1281
- Async version.
1282
-
1283
- Parameters
1284
- ----------
1285
- end1_guid: str
1286
- - Unique identity of the metadata element at end1 of a relationship.
1287
- end2_guid: str
1288
- - Unique identity of the metadata element at end2 of a relationship.
1289
- body: dict
1290
- - A structure containing the search criteria. (example below)
1291
- for_lineage: bool, default is set by server
1292
- - determines if elements classified as Memento should be returned - normally false
1293
- for_duplicate_processing: bool, default is set by server
1294
- - Normally false. Set true when the caller is part of a deduplication function
1295
- starting_at_end: int, default = 0
1296
- - Relationship end to start from.
1297
- start_from: int, default = 0
1298
- - index of the list to start from (0 for start).
1299
- page_size
1300
- - maximum number of elements to return.
1301
- time_out: int, default = default_time_out
1302
- - http request timeout for this request
1303
- mermaid_only: bool, default is False
1304
- - if true only a string representing the mermaid graph will be returned
1305
-
1306
-
1307
- Returns
1308
- -------
1309
- [dict] | str
1310
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
1311
- If mermaid_only is True, a string representing the mermaid graph will be returned.
1312
- If no elements found, string "No element found".
1313
-
1314
- Raises
1315
- ------
1316
- InvalidParameterException
1317
- one of the parameters is null or invalid or
1318
- PropertyServerException
1319
- There is a problem adding the element properties to the metadata repository or
1320
- UserNotAuthorizedException
1321
- the requesting user is not authorized to issue this request.
1322
-
1323
- Notes:
1324
-
1325
- Sample body:
1326
- {
1327
- "class" : "ResultsRequestBody",
1328
- "effectiveTime" : "{{$isoTimestamp}}",
1329
- "limitResultsByStatus" : ["ACTIVE"],
1330
- "asOfTime" : "{{$isoTimestamp}}",
1331
- "sequencingOrder": "PROPERTY_ASCENDING",
1332
- "sequencingProperty": "fileName"
1333
- }
1334
-
1335
- """
1336
-
1337
- possible_query_params = query_string(
1338
- [
1339
- ("startingAtEnd", starting_at_end),
1340
- ("startFrom", start_from),
1341
- ("pageSize", page_size),
1342
- ("forLineage", for_lineage),
1343
- ("forDuplicateProcessing", for_duplicate_processing),
1344
- ]
1345
- )
1346
-
1347
- url = (
1348
- f"{base_path(self, self.view_server)}/metadata-elements/{end1_guid}/linked-by-any-type/"
1349
- f"to-elements/{end2_guid}"
1350
- f"{possible_query_params}"
1351
- )
1352
-
1353
- response: Response = await self._async_make_request(
1354
- "POST", url, body_slimmer(body), time_out=time_out
1355
- )
1356
-
1357
- return process_related_element_list(response, mermaid_only)
1358
-
1359
- def get_all_metadata_element_relationships(
1360
- self,
1361
- end1_guid: str,
1362
- end2_guid: str,
1363
- body: dict,
1364
- for_lineage: bool = None,
1365
- for_duplicate_processing: bool = None,
1366
- starting_at_end: int = 0,
1367
- start_from: int = 0,
1368
- page_size: int = max_paging_size,
1369
- time_out: int = default_time_out,
1370
- mermaid_only: bool = False,
1371
- ) -> list | str:
1372
- """
1373
- Retrieve the relationships linking the supplied elements.
1374
-
1375
- Parameters
1376
- ----------
1377
- end1_guid: str
1378
- - Unique identity of the metadata element at end1 of a relationship.
1379
- end2_guid: str
1380
- - Unique identity of the metadata element at end2 of a relationship.
1381
- body: dict
1382
- - A structure containing the search criteria. (example below)
1383
- for_lineage: bool, default is set by server
1384
- - determines if elements classified as Memento should be returned - normally false
1385
- for_duplicate_processing: bool, default is set by server
1386
- - Normally false. Set true when the caller is part of a deduplication function
1387
- starting_at_end: int, default = 0
1388
- - Relationship end to start from.
1389
- start_from: int, default = 0
1390
- - index of the list to start from (0 for start).
1391
- page_size
1392
- - maximum number of elements to return.
1393
- time_out: int, default = default_time_out
1394
- - http request timeout for this request
1395
- mermaid_only: bool, default is False
1396
- - if true only a string representing the mermaid graph will be returned
1397
-
1398
- Returns
1399
- -------
1400
- [dict] | str
1401
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
1402
- If mermaid_only is True, a string representing the mermaid graph will be returned.
1403
- If no elements found, string "No element found".
1404
-
1405
- Raises
1406
- ------
1407
- InvalidParameterException
1408
- one of the parameters is null or invalid or
1409
- PropertyServerException
1410
- There is a problem adding the element properties to the metadata repository or
1411
- UserNotAuthorizedException
1412
- the requesting user is not authorized to issue this request.
1413
-
1414
- Notes:
1415
-
1416
- Sample body:
1417
- {
1418
- "class" : "ResultsRequestBody",
1419
- "effectiveTime" : "{{$isoTimestamp}}",
1420
- "limitResultsByStatus" : ["ACTIVE"],
1421
- "asOfTime" : "{{$isoTimestamp}}",
1422
- "sequencingOrder": "PROPERTY_ASCENDING",
1423
- "sequencingProperty": "fileName"
1424
- }
1425
-
1426
- """
1427
- loop = asyncio.get_event_loop()
1428
- response = loop.run_until_complete(
1429
- self._async_get_all_metadata_element_relationships(
1430
- end1_guid,
1431
- end2_guid,
1432
- body,
1433
- for_lineage,
1434
- for_duplicate_processing,
1435
- starting_at_end,
1436
- start_from,
1437
- page_size,
1438
- time_out,
1439
- mermaid_only,
1440
- )
1441
- )
1442
- return response
1443
-
1444
- async def _async_get_metadata_element_relationships(
1445
- self,
1446
- end1_guid: str,
1447
- end2_guid: str,
1448
- relationship_type: str,
1449
- body: dict,
1450
- for_lineage: bool = None,
1451
- for_duplicate_processing: bool = None,
1452
- starting_at_end: int = 0,
1453
- start_from: int = 0,
1454
- page_size: int = max_paging_size,
1455
- time_out: int = default_time_out,
1456
- mermaid_only: bool = False,
1457
- ) -> list | str:
1458
- """
1459
- Retrieve the relationships linking the supplied elements.
1460
- Async version.
1461
-
1462
- Parameters
1463
- ----------
1464
- end1_guid: str
1465
- - Unique identity of the metadata element at end1 of a relationship.
1466
- end2_guid: str
1467
- - Unique identity of the metadata element at end2 of a relationship.
1468
- relationship_type: str
1469
- - name of relationship type to retrieve relationships of
1470
- body: dict
1471
- - A structure containing the search criteria. (example below)
1472
- for_lineage: bool, default is set by server
1473
- - determines if elements classified as Memento should be returned - normally false
1474
- for_duplicate_processing: bool, default is set by server
1475
- - Normally false. Set true when the caller is part of a deduplication function
1476
- starting_at_end: int, default = 0
1477
- - Relationship end to start from.
1478
- start_from: int, default = 0
1479
- - index of the list to start from (0 for start).
1480
- page_size
1481
- - maximum number of elements to return.
1482
- time_out: int, default = default_time_out
1483
- - http request timeout for this request
1484
- mermaid_only: bool, default is False
1485
- - if true only a string representing the mermaid graph will be returned
1486
-
1487
- Returns
1488
- -------
1489
- [dict] | str
1490
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
1491
- If mermaid_only is True, a string representing the mermaid graph will be returned.
1492
- If no elements found, string "No element found".
1493
-
1494
- Raises
1495
- ------
1496
- InvalidParameterException
1497
- one of the parameters is null or invalid or
1498
- PropertyServerException
1499
- There is a problem adding the element properties to the metadata repository or
1500
- UserNotAuthorizedException
1501
- the requesting user is not authorized to issue this request.
1502
-
1503
- Notes:
1504
-
1505
- Sample body:
1506
- {
1507
- "class" : "ResultsRequestBody",
1508
- "effectiveTime" : "{{$isoTimestamp}}",
1509
- "limitResultsByStatus" : ["ACTIVE"],
1510
- "asOfTime" : "{{$isoTimestamp}}",
1511
- "sequencingOrder": "PROPERTY_ASCENDING",
1512
- "sequencingProperty": "fileName"
1513
- }
1514
-
1515
- """
1516
-
1517
- possible_query_params = query_string(
1518
- [
1519
- ("startingAtEnd", starting_at_end),
1520
- ("startFrom", start_from),
1521
- ("pageSize", page_size),
1522
- ("forLineage", for_lineage),
1523
- ("forDuplicateProcessing", for_duplicate_processing),
1524
- ]
1525
- )
1526
-
1527
- url = (
1528
- f"{base_path(self, self.view_server)}/metadata-elements/{end1_guid}/linked-by-type/"
1529
- f"{relationship_type}/to-elements/{end2_guid}"
1530
- f"{possible_query_params}"
1531
- )
1532
-
1533
- response: Response = await self._async_make_request(
1534
- "POST", url, body_slimmer(body), time_out=time_out
1535
- )
1536
-
1537
- return process_related_element_list(response, mermaid_only)
1538
-
1539
- def get_metadata_element_relationships(
1540
- self,
1541
- end1_guid: str,
1542
- end2_guid: str,
1543
- relationship_type: str,
1544
- body: dict,
1545
- for_lineage: bool = None,
1546
- for_duplicate_processing: bool = None,
1547
- starting_at_end: int = 0,
1548
- start_from: int = 0,
1549
- page_size: int = max_paging_size,
1550
- time_out: int = default_time_out,
1551
- mermaid_only: bool = False,
1552
- ) -> list | str:
1553
- """
1554
- Retrieve the relationships linking the supplied elements.
1555
-
1556
- Parameters
1557
- ----------
1558
- end1_guid: str
1559
- - Unique identity of the metadata element at end1 of a relationship.
1560
- end2_guid: str
1561
- - Unique identity of the metadata element at end2 of a relationship.
1562
- relationship_type: str
1563
- - name of relationship type to retrieve relationships of
1564
- body: dict
1565
- - A structure containing the search criteria. (example below)
1566
- for_lineage: bool, default is set by server
1567
- - determines if elements classified as Memento should be returned - normally false
1568
- for_duplicate_processing: bool, default is set by server
1569
- - Normally false. Set true when the caller is part of a deduplication function
1570
- starting_at_end: int, default = 0
1571
- - Relationship end to start from.
1572
- start_from: int, default = 0
1573
- - index of the list to start from (0 for start).
1574
- page_size
1575
- - maximum number of elements to return.
1576
- time_out: int, default = default_time_out
1577
- - http request timeout for this request
1578
- mermaid_only: bool, default is False
1579
- - if true only a string representing the mermaid graph will be returned
1580
-
1581
-
1582
- Returns
1583
- -------
1584
- [dict] | str
1585
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
1586
- If mermaid_only is True, a string representing the mermaid graph will be returned.
1587
- If no elements found, string "No element found".
1588
-
1589
- Raises
1590
- ------
1591
- InvalidParameterException
1592
- one of the parameters is null or invalid or
1593
- PropertyServerException
1594
- There is a problem adding the element properties to the metadata repository or
1595
- UserNotAuthorizedException
1596
- the requesting user is not authorized to issue this request.
1597
-
1598
- Notes:
1599
-
1600
- Sample body:
1601
- {
1602
- "class" : "ResultsRequestBody",
1603
- "effectiveTime" : "{{$isoTimestamp}}",
1604
- "limitResultsByStatus" : ["ACTIVE"],
1605
- "asOfTime" : "{{$isoTimestamp}}",
1606
- "sequencingOrder": "PROPERTY_ASCENDING",
1607
- "sequencingProperty": "fileName"
1608
- }
1609
-
1610
- """
1611
- loop = asyncio.get_event_loop()
1612
- response = loop.run_until_complete(
1613
- self._async_get_metadata_element_relationships(
1614
- end1_guid,
1615
- end2_guid,
1616
- relationship_type,
1617
- body,
1618
- for_lineage,
1619
- for_duplicate_processing,
1620
- starting_at_end,
1621
- start_from,
1622
- page_size,
1623
- time_out,
1624
- mermaid_only,
1625
- )
1626
- )
1627
- return response
1628
-
1629
- async def _async_find_metadata_elements(
1630
- self,
1631
- body: dict,
1632
- for_lineage: bool = None,
1633
- for_duplicate_processing: bool = None,
1634
- start_from: int = 0,
1635
- page_size: int = max_paging_size,
1636
- time_out: int = default_time_out,
1637
- ) -> list | str:
1638
- """Return a list of metadata elements that match the supplied criteria.
1639
- The results can be returned over many pages. Async version.
1640
-
1641
- Parameters
1642
- ----------
1643
- body: dict
1644
- - A structure containing the search criteria. (example below)
1645
- for_lineage: bool, default is set by server
1646
- - determines if elements classified as Memento should be returned - normally false
1647
- for_duplicate_processing: bool, default is set by server
1648
- - Normally false. Set true when the caller is part of a deduplication function
1649
- start_from: int, default = 0
1650
- - index of the list to start from (0 for start).
1651
- page_size
1652
- - maximum number of elements to return.
1653
- time_out: int, default = default_time_out
1654
- - http request timeout for this request
1655
-
1656
- Returns
1657
- -------
1658
- [dict] | str
1659
- Returns a string if no elements found and a list of dict of elements with the results.
1660
-
1661
- Raises
1662
- ------
1663
- InvalidParameterException
1664
- one of the parameters is null or invalid or
1665
- PropertyServerException
1666
- There is a problem adding the element properties to the metadata repository or
1667
- UserNotAuthorizedException
1668
- the requesting user is not authorized to issue this request.
1669
-
1670
- Notes:
1671
-
1672
- Sample body:
1673
- {
1674
- "class" : "FindRequestBody",
1675
- "metadataElementTypeName": "add typeName here",
1676
- "metadataElementSubtypeNames": [],
1677
- "searchProperties": {
1678
- "class" : "SearchProperties",
1679
- "conditions": [ {
1680
- "nestedConditions": {
1681
- "class" : "SearchProperties",
1682
- "conditions": [
1683
- {
1684
- "property" : "add name of property here",
1685
- "operator": "EQ",
1686
- "value": {
1687
- "class" : "PrimitiveTypePropertyValue",
1688
- "typeName" : "string",
1689
- "primitiveValue" : "Add value here"
1690
- }
1691
- }],
1692
- "matchCriteria": "ALL"
1693
- }
1694
- }],
1695
- "matchCriteria": "ANY"
1696
- },
1697
- "matchClassifications": {
1698
- "class" : "SearchClassifications",
1699
- "conditions": [{
1700
- "name" : "add classification name here",
1701
- "searchProperties": {
1702
- "class" : "SearchProperties",
1703
- "conditions": [
1704
- {
1705
- "property" : "add name of property here",
1706
- "operator": "EQ",
1707
- "value": {
1708
- "class" : "PrimitiveTypePropertyValue",
1709
- "typeName" : "string",
1710
- "primitiveValue" : "Add value here"
1711
- }
1712
- }],
1713
- "matchCriteria": "ALL"
1714
- }
1715
- }],
1716
- "matchCriteria": "ANY"
1717
- },
1718
- "effectiveTime" : "{{$isoTimestamp}}",
1719
- "limitResultsByStatus" : ["ACTIVE"],
1720
- "asOfTime" : "{{$isoTimestamp}}",
1721
- "sequencingOrder": "CREATION_DATE_RECENT",
1722
- "sequencingProperty": ""
1723
- }
1724
- """
1725
-
1726
- possible_query_params = query_string(
1727
- [
1728
- ("startFrom", start_from),
1729
- ("pageSize", page_size),
1730
- ("forLineage", for_lineage),
1731
- ("forDuplicateProcessing", for_duplicate_processing),
1732
- ]
1733
- )
1734
-
1735
- url = (
1736
- f"{base_path(self, self.view_server)}/metadata-elements/by-search-conditions"
1737
- f"{possible_query_params}"
1738
- )
1739
-
1740
- response: Response = await self._async_make_request(
1741
- "POST", url, body_slimmer(body), time_out=time_out
1742
- )
1743
-
1744
- elements = response.json().get("elementList", NO_ELEMENTS_FOUND)
1745
- if type(elements) is list:
1746
- if len(elements) == 0:
1747
- return NO_ELEMENTS_FOUND
1748
- return elements
1749
-
1750
- def find_metadata_elements(
1751
- self,
1752
- body: dict,
1753
- for_lineage: bool = None,
1754
- for_duplicate_processing: bool = None,
1755
- start_from: int = 0,
1756
- page_size: int = max_paging_size,
1757
- time_out: int = default_time_out,
1758
- ) -> list | str:
1759
- """
1760
- Retrieve the relationships linking the supplied elements.
1761
-
1762
- Parameters
1763
- ----------
1764
- body: dict
1765
- - A structure containing the search criteria. (example below)
1766
- for_lineage: bool, default is set by server
1767
- - determines if elements classified as Memento should be returned - normally false
1768
- for_duplicate_processing: bool, default is set by server
1769
- - Normally false. Set true when the caller is part of a deduplication function
1770
- start_from: int, default = 0
1771
- - index of the list to start from (0 for start).
1772
- page_size
1773
- - maximum number of elements to return.
1774
- time_out: int, default = default_time_out
1775
- - http request timeout for this request
1776
-
1777
- Returns
1778
- -------
1779
- [dict] | str
1780
- Returns a string if no elements found and a list of dict of elements with the results.
1781
-
1782
- Raises
1783
- ------
1784
- InvalidParameterException
1785
- one of the parameters is null or invalid or
1786
- PropertyServerException
1787
- There is a problem adding the element properties to the metadata repository or
1788
- UserNotAuthorizedException
1789
- the requesting user is not authorized to issue this request.
1790
-
1791
- Notes:
1792
-
1793
- Sample body:
1794
- {
1795
- "class" : "FindRequestBody",
1796
- "metadataElementTypeName": "add typeName here",
1797
- "metadataElementSubtypeNames": [],
1798
- "searchProperties": {
1799
- "class" : "SearchProperties",
1800
- "conditions": [ {
1801
- "nestedConditions": {
1802
- "class" : "SearchProperties",
1803
- "conditions": [
1804
- {
1805
- "property" : "add name of property here",
1806
- "operator": "EQ",
1807
- "value": {
1808
- "class" : "PrimitiveTypePropertyValue",
1809
- "typeName" : "string",
1810
- "primitiveValue" : "Add value here"
1811
- }
1812
- }],
1813
- "matchCriteria": "ALL"
1814
- }
1815
- }],
1816
- "matchCriteria": "ANY"
1817
- },
1818
- "matchClassifications": {
1819
- "class" : "SearchClassifications",
1820
- "conditions": [{
1821
- "name" : "add classification name here",
1822
- "searchProperties": {
1823
- "class" : "SearchProperties",
1824
- "conditions": [
1825
- {
1826
- "property" : "add name of property here",
1827
- "operator": "EQ",
1828
- "value": {
1829
- "class" : "PrimitiveTypePropertyValue",
1830
- "typeName" : "string",
1831
- "primitiveValue" : "Add value here"
1832
- }
1833
- }],
1834
- "matchCriteria": "ALL"
1835
- }
1836
- }],
1837
- "matchCriteria": "ANY"
1838
- },
1839
- "effectiveTime" : "{{$isoTimestamp}}",
1840
- "limitResultsByStatus" : ["ACTIVE"],
1841
- "asOfTime" : "{{$isoTimestamp}}",
1842
- "sequencingOrder": "CREATION_DATE_RECENT",
1843
- "sequencingProperty": ""
1844
- }
1845
-
1846
- """
1847
- loop = asyncio.get_event_loop()
1848
- response = loop.run_until_complete(
1849
- self._async_find_metadata_elements(
1850
- body,
1851
- for_lineage,
1852
- for_duplicate_processing,
1853
- start_from,
1854
- page_size,
1855
- time_out,
1856
- )
1857
- )
1858
- return response
1859
-
1860
- async def _async_find_relationships_between_elements(
1861
- self,
1862
- body: dict,
1863
- for_lineage: bool = None,
1864
- for_duplicate_processing: bool = None,
1865
- start_from: int = 0,
1866
- page_size: int = max_paging_size,
1867
- time_out: int = default_time_out,
1868
- mermaid_only: bool = False,
1869
- ) -> list | str:
1870
- """Return a list of relationships that match the requested conditions.
1871
- The results can be received as a series of pages. Async version.
1872
-
1873
- Parameters
1874
- ----------
1875
- body: dict
1876
- - A structure containing the search criteria. (example below)
1877
- for_lineage: bool, default is set by server
1878
- - determines if elements classified as Memento should be returned - normally false
1879
- for_duplicate_processing: bool, default is set by server
1880
- - Normally false. Set true when the caller is part of a deduplication function
1881
- start_from: int, default = 0
1882
- - index of the list to start from (0 for start).
1883
- page_size
1884
- - maximum number of elements to return.
1885
- time_out: int, default = default_time_out
1886
- - http request timeout for this request
1887
- mermaid_only: bool, default is False
1888
- - if true only a string representing the mermaid graph will be returned
1889
-
1890
- Returns
1891
- -------
1892
- [dict] | str
1893
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
1894
- If mermaid_only is True, a string representing the mermaid graph will be returned.
1895
- If no elements found, string "No element found".
1896
-
1897
- Raises
1898
- ------
1899
- InvalidParameterException
1900
- one of the parameters is null or invalid or
1901
- PropertyServerException
1902
- There is a problem adding the element properties to the metadata repository or
1903
- UserNotAuthorizedException
1904
- the requesting user is not authorized to issue this request.
1905
-
1906
- Notes:
1907
-
1908
- Sample body:
1909
- {
1910
- "class" : "FindRelationshipRequestBody",
1911
- "relationshipTypeName": "add typeName here",
1912
- "searchProperties": {
1913
- "class" : "SearchProperties",
1914
- "conditions": [ {
1915
- "nestedConditions": {
1916
- "class" : "SearchProperties",
1917
- "conditions": [
1918
- {
1919
- "property" : "add name of property here",
1920
- "operator": "EQ",
1921
- "value": {
1922
- "class" : "PrimitiveTypePropertyValue",
1923
- "typeName" : "string",
1924
- "primitiveValue" : "Add value here"
1925
- }
1926
- }],
1927
- "matchCriteria": "ALL"
1928
- }
1929
- }],
1930
- "matchCriteria": "ANY"
1931
- },
1932
- "effectiveTime" : "{{$isoTimestamp}}",
1933
- "limitResultsByStatus" : ["ACTIVE"],
1934
- "asOfTime" : "{{$isoTimestamp}}",
1935
- "sequencingOrder": "CREATION_DATE_RECENT",
1936
- "sequencingProperty": ""
1937
- }
1938
- """
1939
-
1940
- possible_query_params = query_string(
1941
- [
1942
- ("startFrom", start_from),
1943
- ("pageSize", page_size),
1944
- ("forLineage", for_lineage),
1945
- ("forDuplicateProcessing", for_duplicate_processing),
1946
- ]
1947
- )
1948
-
1949
- url = (
1950
- f"{base_path(self, self.view_server)}/relationships/by-search-conditions"
1951
- f"{possible_query_params}"
1952
- )
1953
-
1954
- response: Response = await self._async_make_request(
1955
- "POST", url, body_slimmer(body), time_out=time_out
1956
- )
1957
-
1958
- return process_related_element_list(
1959
- response, mermaid_only, relationship_list=True
1960
- )
1961
-
1962
- def find_relationships_between_elements(
1963
- self,
1964
- body: dict,
1965
- for_lineage: bool = None,
1966
- for_duplicate_processing: bool = None,
1967
- start_from: int = 0,
1968
- page_size: int = max_paging_size,
1969
- time_out: int = default_time_out,
1970
- mermaid_only: bool = False,
1971
- ) -> list | str:
1972
- """Return a list of relationships that match the requested conditions.
1973
- The results can be received as a series of pages.
1974
-
1975
- Parameters
1976
- ----------
1977
- body: dict
1978
- - A structure containing the search criteria. (example below)
1979
- for_lineage: bool, default is set by server
1980
- - determines if elements classified as Memento should be returned - normally false
1981
- for_duplicate_processing: bool, default is set by server
1982
- - Normally false. Set true when the caller is part of a deduplication function
1983
- start_from: int, default = 0
1984
- - index of the list to start from (0 for start).
1985
- page_size
1986
- - maximum number of elements to return.
1987
- time_out: int, default = default_time_out
1988
- - http request timeout for this request
1989
- mermaid_only: bool, default is False
1990
- - if true only a string representing the mermaid graph will be returned
1991
-
1992
- Returns
1993
- -------
1994
- [dict] | str
1995
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
1996
- If mermaid_only is True, a string representing the mermaid graph will be returned.
1997
- If no elements found, string "No element found".
1998
-
1999
- Raises
2000
- ------
2001
- InvalidParameterException
2002
- one of the parameters is null or invalid or
2003
- PropertyServerException
2004
- There is a problem adding the element properties to the metadata repository or
2005
- UserNotAuthorizedException
2006
- the requesting user is not authorized to issue this request.
2007
-
2008
- Notes:
2009
-
2010
- Sample body:
2011
- {
2012
- "class" : "FindRelationshipRequestBody",
2013
- "relationshipTypeName": "add typeName here",
2014
- "searchProperties": {
2015
- "class" : "SearchProperties",
2016
- "conditions": [ {
2017
- "nestedConditions": {
2018
- "class" : "SearchProperties",
2019
- "conditions": [
2020
- {
2021
- "property" : "add name of property here",
2022
- "operator": "EQ",
2023
- "value": {
2024
- "class" : "PrimitiveTypePropertyValue",
2025
- "typeName" : "string",
2026
- "primitiveValue" : "Add value here"
2027
- }
2028
- }],
2029
- "matchCriteria": "ALL"
2030
- }
2031
- }],
2032
- "matchCriteria": "ANY"
2033
- },
2034
- "effectiveTime" : "{{$isoTimestamp}}",
2035
- "limitResultsByStatus" : ["ACTIVE"],
2036
- "asOfTime" : "{{$isoTimestamp}}",
2037
- "sequencingOrder": "CREATION_DATE_RECENT",
2038
- "sequencingProperty": ""
2039
- }
2040
-
2041
- """
2042
- loop = asyncio.get_event_loop()
2043
- response = loop.run_until_complete(
2044
- self._async_find_relationships_between_elements(
2045
- body,
2046
- for_lineage,
2047
- for_duplicate_processing,
2048
- start_from,
2049
- page_size,
2050
- time_out,
2051
- mermaid_only,
2052
- )
2053
- )
2054
- return response
2055
-
2056
- async def _async_get_relationship_by_guid(
2057
- self,
2058
- guid: str,
2059
- effective_time: str = None,
2060
- as_of_time: str = None,
2061
- for_lineage: bool = None,
2062
- for_duplicate_processing: bool = None,
2063
- ) -> dict | str:
2064
- """
2065
- Retrieve the relationship using its unique identifier. Async version.
2066
-
2067
- Parameters
2068
- ----------
2069
- guid : str
2070
- - unique identifier of the relationship to retrieve
2071
- effective_time: str, default = None
2072
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
2073
- for_lineage: bool, default is set by server
2074
- - determines if elements classified as Memento should be returned - normally false
2075
- for_duplicate_processing: bool, default is set by server
2076
- - Normally false. Set true when the caller is part of a deduplication function
2077
-
2078
- Returns
2079
- -------
2080
- dict | str
2081
- If the relationship is found, a dict of the relationship details is returned. Otherwise, the string "No element found".
2082
-
2083
- Raises
2084
- ------
2085
- InvalidParameterException
2086
- one of the parameters is null or invalid or
2087
- PropertyServerException
2088
- There is a problem adding the element properties to the metadata repository or
2089
- UserNotAuthorizedException
2090
- the requesting user is not authorized to issue this request.
2091
- """
2092
-
2093
- possible_query_params = query_string(
2094
- [
2095
- ("forLineage", for_lineage),
2096
- ("forDuplicateProcessing", for_duplicate_processing),
2097
- ]
2098
- )
2099
-
2100
- body = {
2101
- "class": "AnyTimeRequestBody",
2102
- "effectiveTime": effective_time,
2103
- "asOfTime": as_of_time,
2104
- }
2105
-
2106
- url = (
2107
- f"{base_path(self, self.view_server)}/relationships/by-guid/{guid}"
2108
- f"{possible_query_params}"
2109
- )
2110
- response: Response = await self._async_make_request(
2111
- "POST", url, body_slimmer(body)
2112
- )
2113
- return response.json().get("element", NO_ELEMENTS_FOUND)
2114
-
2115
- def get_relationship_by_guid(
2116
- self,
2117
- guid: str,
2118
- effective_time: str = None,
2119
- for_lineage: bool = None,
2120
- for_duplicate_processing: bool = None,
2121
- ) -> dict | str:
2122
- """
2123
- Retrieve the relationship using its unique identifier.
2124
-
2125
- Parameters
2126
- ----------
2127
- guid : str
2128
- - unique identifier of the relationship to retrieve
2129
- effective_time: str, default = None
2130
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
2131
- for_lineage: bool, default is set by server
2132
- - determines if elements classified as Memento should be returned - normally false
2133
- for_duplicate_processing: bool, default is set by server
2134
- - Normally false. Set true when the caller is part of a deduplication function
2135
-
2136
- Returns
2137
- -------
2138
- dict | str
2139
- If the relationship is found, a dict of the relationship details is returned. Otherwise, the string "No element found".
2140
-
2141
- Raises
2142
- ------
2143
- InvalidParameterException
2144
- one of the parameters is null or invalid or
2145
- PropertyServerException
2146
- There is a problem adding the element properties to the metadata repository or
2147
- UserNotAuthorizedException
2148
- the requesting user is not authorized to issue this request.
2149
- """
2150
-
2151
- loop = asyncio.get_event_loop()
2152
- response = loop.run_until_complete(
2153
- self._async_get_relationship_by_guid(
2154
- guid, effective_time, for_lineage, for_duplicate_processing
2155
- )
2156
- )
2157
- return response
2158
-
2159
- async def _async_get_relationship_history(
2160
- self,
2161
- guid: str,
2162
- effective_time: str = None,
2163
- oldest_first: bool = False,
2164
- from_time: str = None,
2165
- to_time: str = None,
2166
- for_lineage: bool = None,
2167
- for_duplicate_processing: bool = None,
2168
- start_from: int = 0,
2169
- page_size: int = max_paging_size,
2170
- time_out: int = default_time_out,
2171
- mermaid_only: bool = False,
2172
- ) -> list | str:
2173
- """
2174
- Retrieve all the versions of a relationship. Async version.
2175
-
2176
- Parameters
2177
- ----------
2178
- guid: str
2179
- - Unique identity of element to retrieve.
2180
- effective_time: str, default = None
2181
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
2182
- oldest_first: bool, default = False
2183
- from_time: str, default = None
2184
- Time to begin returning history
2185
- to_time: str, default = None
2186
- Time to end returning history
2187
- for_lineage: bool, default is set by server
2188
- - determines if elements classified as Memento should be returned - normally false
2189
- for_duplicate_processing: bool, default is set by server
2190
- - Normally false. Set true when the caller is part of a deduplication function
2191
- start_from: int, default = 0
2192
- - index of the list to start from (0 for start).
2193
- page_size
2194
- - maximum number of elements to return.
2195
- time_out: int, default = default_time_out
2196
- - http request timeout for this request
2197
- mermaid_only: bool, default is False
2198
- - if true only a string representing the mermaid graph will be returned
2199
-
2200
- Returns
2201
- -------
2202
- [dict] | str
2203
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
2204
- If mermaid_only is True, a string representing the mermaid graph will be returned.
2205
- If no elements found, string "No element found".
2206
-
2207
- Raises
2208
- ------
2209
- InvalidParameterException
2210
- one of the parameters is null or invalid or
2211
- PropertyServerException
2212
- There is a problem adding the element properties to the metadata repository or
2213
- UserNotAuthorizedException
2214
- the requesting user is not authorized to issue this request.
2215
- """
2216
-
2217
- possible_query_params = query_string(
2218
- [
2219
- ("startFrom", start_from),
2220
- ("pageSize", page_size),
2221
- ("oldestFirst", oldest_first),
2222
- ("forLineage", for_lineage),
2223
- ("forDuplicateProcessing", for_duplicate_processing),
2224
- ]
2225
- )
2226
-
2227
- body = {
2228
- "class": "HistoryRequestBody",
2229
- "effectiveTime": effective_time,
2230
- "fromTime": from_time,
2231
- "toTime": to_time,
2232
- }
2233
-
2234
- url = (
2235
- f"{base_path(self, self.view_server)}/relationships/{guid}/history"
2236
- f"{possible_query_params}"
2237
- )
2238
-
2239
- response: Response = await self._async_make_request(
2240
- "POST", url, body_slimmer(body), time_out=time_out
2241
- )
2242
- rel = response.json().get("relationshipList", NO_ELEMENTS_FOUND)
2243
- if isinstance(rel, (list, dict)):
2244
- return rel.get("elementList", NO_ELEMENTS_FOUND)
2245
- else:
2246
- return rel
2247
-
2248
- def get_relationship_history(
2249
- self,
2250
- guid: str,
2251
- effective_time: str = None,
2252
- oldest_first: bool = False,
2253
- from_time: str = None,
2254
- to_time: str = None,
2255
- for_lineage: bool = None,
2256
- for_duplicate_processing: bool = None,
2257
- start_from: int = 0,
2258
- page_size: int = max_paging_size,
2259
- time_out: int = default_time_out,
2260
- mermaid_only: bool = False,
2261
- ) -> list | str:
2262
- """
2263
- Retrieve all the versions of a relationship.
2264
-
2265
- Parameters
2266
- ----------
2267
- guid: str
2268
- - Unique identity of element to retrieve.
2269
- effective_time: str, default = None
2270
- - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
2271
- oldest_first: bool, default = False
2272
- from_time: str, default = None
2273
- Time to begin returning history
2274
- to_time: str, default = None
2275
- Time to end returning history
2276
- for_lineage: bool, default is set by server
2277
- - determines if elements classified as Memento should be returned - normally false
2278
- for_duplicate_processing: bool, default is set by server
2279
- - Normally false. Set true when the caller is part of a deduplication function
2280
- start_from: int, default = 0
2281
- - index of the list to start from (0 for start).
2282
- page_size
2283
- - maximum number of elements to return.
2284
- time_out: int, default = default_time_out
2285
- - http request timeout for this request
2286
- mermaid_only: bool, default is False
2287
- - if true only a string representing the mermaid graph will be returned
2288
-
2289
- Returns
2290
- -------
2291
- [dict] | str
2292
- If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
2293
- If mermaid_only is True, a string representing the mermaid graph will be returned.
2294
- If no elements found, string "No element found".
2295
-
2296
- Raises
2297
- ------
2298
- InvalidParameterException
2299
- one of the parameters is null or invalid or
2300
- PropertyServerException
2301
- There is a problem adding the element properties to the metadata repository or
2302
- UserNotAuthorizedException
2303
- the requesting user is not authorized to issue this request.
2304
- """
2305
-
2306
- loop = asyncio.get_event_loop()
2307
- response = loop.run_until_complete(
2308
- self._async_get_relationship_history(
2309
- guid,
2310
- effective_time,
2311
- oldest_first,
2312
- from_time,
2313
- to_time,
2314
- for_lineage,
2315
- for_duplicate_processing,
2316
- start_from,
2317
- page_size,
2318
- time_out,
2319
- mermaid_only,
2320
- )
2321
- )
2322
- return response
2323
-
2324
-
2325
- if __name__ == "__main__":
2326
- print("Main-Metadata Explorer")