I want to set the influence of the child of constraint on multiple objects to 0

We have created a Rubik’s K-Yub using Python. To animate it, we have built a Child of constraint on several objects. I have one Empty for all of its parents, and after I finish rotating one face, I want to rotate the next face, so I want to set the influence to 0, but I don’t know how to write the code. Please help.

I don’t know what kind of context or condition you’re running the constraint code in, but this code will set all constraints, if type Child Of, to have a influence value of 0.0.

import bpy

for o in bpy.data.objects:
    for m in o.constraints:
        if m.type == "CHILD_OF":
            m.influence = 0.0