Have a look at bge.types.BL_ArmatureChannel. It has a lot of attributes related to Inverse Kinematics. I don’t think the Childof constraint is accessible in the BGE through Python. Maybe someone else can tell you for sure.
I tried to do a similar thing just recently actually,
I found this code will work for the transforms constraints and I am pretty sure the tracking constraints:
sense = cont.sensors['Keyboard']
armature = own.scene.objects['Armature']
constraint = armature.constraints[0]
if sense.positive:
constraint.active = False
To access different constraints, just change the array position from 0 to whatever. 0 being the first slot of course.
An alternative method would be to use a loop and assign the desired constraints into variables by name using a loop through all of a bones constraints. This will also work for all transform and tracking constraints.
if cont.sensors[0].positive:
bone = own.channels["top"]
for i in own.constraints:
if i.name == "transforms":
storage = i
Which ever on you choose, you could then edit influence (enforce), target, active state, ect.
However, I could get neither of these codes to work for the relationships constraints sadly. Maybe I did something wrong for them. If somebody can see why they would not work with my code, feel free to fix it and use it.