Skip to main content

system.kanoa.utilities.formatDictionary

This function requires KanoaCore module

Description

This function takes a dictionary and formats it into a human-readable string.

Syntax

formatDictionary(dictionary, paramsDict)
  • Parameters:
      dictionary: dict - The dictionary to be formatted
      paramsDict: dict - Parameters for formatting the dictionary
            'excludeNulls' (bool): If True, excludes null values from the output (default is False)
            'includeKeys' (list of str): List of keys to include in the output
    • Returns: str - A formatted string representing the dictionary
    • Code Example

      # Example Usage:
      formatted_string = system.kanoa.utilities.formatDictionary(dictionary, paramsDict)