# AUTOGENERATED! DO NOT EDIT! File to edit: dictUtil.ipynb (unless otherwise specified).

__all__ = ['printDict', 'allKeysInDict']

# Cell
def printDict(d:dict, length:int = 10, space = 0):
  '''print dictionary as first x value of values'''
  if type(d) != dict:
    print('this is not a dict')
    print(d)
  else:
    for k, v in d.items():
      if type(v) == dict:
        print(f"{' '*space}{k}")
        printDict(v, space=space+1)
      else:
        print(f"{' '*space}{k} : {v[:length] if type(v)==str else v}")

# Cell
def allKeysInDict(inputDict:dict, keys:list):
  return all(key in inputDict for key in keys)