fruitbat.utils

The collection of utility functions for Fruitbat.

fruitbat.utils.check_keys_in_dict(dictionary, keys)[source]

Checks that a list of keys exist in a dictionary.

Parameters:
  • dictionary (dict) – The input dictionary.
  • keys (list of strings) – The keys that the dictionary must contain.
Returns:

bool – Returns True is all required keys exist in the dictionary. Otherwise a KeyError is raised.