pyslk.tag_raw

Contents

pyslk.tag_raw#

pyslk.tag_raw(path_or_id: str | int | Path, metadata: dict | None = None, recursive: bool = False, display: bool = False, return_type: int = 0) str | int | CompletedProcess#

Apply metadata to the namespace and child resources

Parameters:
  • path_or_id (str or int or Path) – search id or gns path of resources to retrieve

  • metadata (dict) – dict that holds as keys “[metadata schema].[field]” and as values the metadata values

  • recursive (bool) – use the -R flag to tag recursively, Default: False

  • display (bool) – print metadata as JSON (ignore “metadata” if this is True), Default: False

  • 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]