Python: Calculate angle between vertices
You can get two selected vertices via bm.select_history and calculate a direction vector, then measure the angle between this angle and the up vector (0, 0, 1) in radians and convert it to degrees (below script prints the smaller angle):

import bpy
import bmesh
from math import degrees, pi
from mathutils import Vector

ob = bpy.context.object
assert ob.type == 'MESH'
me = ob.data

bm = bmesh.from_edit_mesh(me)
verts_sel = [el for el in bm.select_history if isinstance(el, bmesh.types.BMVert)]
assert len(verts_sel) == 2

v1 = verts_sel[1].co - verts_sel[0].co    
v2 = Vector((0, 0, 1))

a1 = v1.angle(v2)
if a1 &gt; pi * 0.5:
    a1 = pi - a1
print("{:.2f} degrees".format(degrees(a1)))