code: def atlasdb_row_factory( cursor, row ):
      
      d = {}
      for idx, col in enumerate( cursor.description ):
          if col[0] in ["present", "tried_storage"]:
              if row[idx] == 0:
                  d[col[0]] = False
              elif row[idx] == 1:
                  d[col[0]] = True
              else:
                  raise Exception("Invalid value for '%s': %s" % (col[0], row[idx]))
  
          else:
              d[col[0]] = row[idx]
  
      return d
docs: row factory
      * convert known booleans to booleans