pyslk.gen_search_query_raw#
- pyslk.gen_search_query_raw(key_value_pairs: str | list[str], recursive: bool = False, search_query: str | None = None, return_type: int = 0) str | int | CompletedProcess #
Generates a search query that searches based on the conditions provided as key-values pairs
These key-value pairs are actually key-operator-value-triples. E.g.
path=/arch/bm0146/k204221/iow resources.size < 1024 resources.created > 2023-01-01
Details are given in the slk_helpers documentation at https://docs.dkrz.de
- Parameters:
key_value_pairs (str or list) – list of key-value pairs connected via an operator
recursive (bool) – do recursive search in the namespaces
search_query (str) – an existing search query to be extended
return_type (int) – select between 0 (== str output), 1 (== exit code), 2 (subprocess output)
- Returns:
stdout of the slk_helpers call
- Return type:
Union[str, int, subprocess.CompletedProcess]