Your description appears to be a bit loose. Do you mean you want to calculate the bearing of the segments between bends, or the final heading of the end of the pipeline, or the included angle? Maybe you want to add a bend in the line given the offset implied by the joint name?
The math module has a function atan2() that returns a 360 degree bearing given the delta_x and delta_y. There are also functions to convert radians to degrees and all the trig functions.
thanks kimo, Yes I am looking to determine the angle of the bends in a pipeline to determine the bending method. induction vs cold(rope). Thank you for your input. I believe the arctan2 function will work. I will let you know what i find out.