From 7ce1bb12550da41ca950a33895e89dd6c07b32ee Mon Sep 17 00:00:00 2001 From: jgstew Date: Mon, 10 Apr 2023 15:52:09 -0400 Subject: [PATCH] example for getting resource uris from session relevance results. --- examples/export_bes_by_relevance.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 examples/export_bes_by_relevance.py diff --git a/examples/export_bes_by_relevance.py b/examples/export_bes_by_relevance.py new file mode 100644 index 0000000..e125db9 --- /dev/null +++ b/examples/export_bes_by_relevance.py @@ -0,0 +1,27 @@ +""" +Example export bes files by session relevance result + +requires `besapi`, install with command `pip install besapi` +""" +import besapi + + +def main(): + """Execution starts here""" + print("main()") + bes_conn = besapi.besapi.get_bes_conn_using_config_file() + bes_conn.login() + + print(bes_conn.last_connected) + + session_relevance = '(type of it as lowercase & "/custom/" & name of site of it & "/" & id of it as string) of custom bes fixlets whose(name of it as lowercase contains "oracle")' + + result = bes_conn.session_relevance_array(session_relevance) + + print(result) + + # TODO: export files + + +if __name__ == "__main__": + main()