Script to add rigid body to object in scene?
This worked for me:

candidate_list = [item.name for item in bpy.data.objects if item.type == "MESH"]
for object_name in candidate_list:
    bpy.data.objects[object_name].select = True
bpy.ops.rigidbody.objects_add(type='ACTIVE')


In the loop it selects all the objects that you want to add rigid_body to. Then add them in one go.