Getting local rotation in python
Blender's objects have three rotation values, rotation_euler, rotation_quaternion and rotation_axis_angle with the rotation_mode property defining which one is used.

If euler rotation is used and you want the quaternion rotation you can use to_quaternion() to convert it. Quaternion values also have to_axis_angle() and to_euler() if you need to convert the other way. The mathutils module contains some extras.

Note that euler values are stored as radians so you will want to use math.degrees() to get the degrees of each rotation. Both index and property access are available for euler and quaternion rotation values.

if 'Z' in bpy.data.objects['Cube'].rotation_mode:
    r = bpy.data.objects['Cube'].rotation_euler
    print(math.degrees(r[0])) # 0=X, 1=Y, 2=Z
    print(math.degrees(r.x))

    q = r.to_quaternion()
    print(q[0]) # 0=W, 1=X, 2=Y, 3=Z