Get the angle of an edge
The raw answer is

import bpy
from mathutils import *
from math import *

v1 = Vector([3,2,0])
v2 = Vector([3,2,1])
C = v2-v1

theta = atan2(C[1], C[0])

print(theta)


If you need to be able to compute this from the currently selected edge of a mesh, let me know and I can upgrade the python.