Grid to many planes?
you can use the edge split operator to divide the grid into individual squares , then you can separate them by loose parts , here is the lines that do that :

        bpy.ops.object.mode_set(mode = 'EDIT')
        bpy.ops.mesh.select_all(action = 'SELECT')        
        bpy.ops.mesh.edge_split()
        bpy.ops.mesh.separate(type = 'LOOSE')
        bpy.ops.object.editmode_toggle()