How can I find out what kind of relationship between a parent bone and the child, using python?
Edit mode, relations panel

As is displayed in the relations panel of a bone in edit mode, can look at the properties in the python console.
Simple armatrure, active and in edit mode. List each edit bones EditBone.parent and EditBone.use_connect properties.
&gt;&gt;&gt; C.object
bpy.data.objects['Armature']

&gt;&gt;&gt; bpy.ops.object.mode_set(mode='EDIT')
{'FINISHED'}

&gt;&gt;&gt; for b in C.object.data.edit_bones:
...     b.name, b.parent, b.use_connect
...     
('Bone.002', None, False)
('Bone', bpy.data.armatures['Armature']...EditBone, False)
('Bone.001', bpy.data.armatures['Armature']...EditBone, True)

Pose / Object Mode
or similarly in Object or pose mode by looking at the armature objects  pose bones collection.
&gt;&gt;&gt; for pb in C.object.pose.bones:
...     pb.name, getattr(pb.parent, &quot;name&quot;, None), pb.bone.use_connect
...     
('Bone', 'Bone.002', False)
('Bone.002', None, False)
('Bone.001', 'Bone', True)

&gt;&gt;&gt;