How to duplicate and move a selected edge in normal direction?
There are several normal directions, not sure what you actually desire. In your figure, it looks as if you want to translate to the average vertex normal direction, but only in 2D.

Here's a 3D example using the bmesh module:

import bpy
import bmesh

me = bpy.context.object.data
bm = bmesh.from_edit_mesh(me)

active_edge = None
for elem in reversed(bm.select_history):
    if isinstance(elem, bmesh.types.BMEdge):
        active_edge = elem
        break
else:
    raise Exception("No active edge!")

v1, v2 = active_edge.verts
#co1 = v1.co + v1.normal
#co2 = v2.co + v2.normal
n = (v1.normal + v2.normal) * 0.5
co1 = v1.co + n
co2 = v2.co + n

ret = bmesh.ops.duplicate(bm, geom=[active_edge])
new_verts = [elem for elem in ret['geom'] if isinstance(elem, bmesh.types.BMVert)]

# Order???
new_verts[0].co = co1
new_verts[1].co = co2

bmesh.update_edit_mesh(me)