Use the bevel-tool from python script
You can find out the answer to this in several ways. Here's what I did:


Use the UI tool (mark the middle edge then press CtrlB to bevel).
Go to the info panel (above the 3D view on the default layout), and open it up a little bit. Not always, but often, using the UI commands and operators will print out the command used in the info panel. Here we can see that the bpy.ops.mesh.bevel operator was used.
To further explore this command and its documentation, open the python console. Type in:

bpy.ops.mesh.bevel(

Then press CtrlSpace to see the autocompleted documentation for this operator. In this case:

bevel()
bpy.ops.mesh.bevel(
    offset_type   = 'OFFSET',
    offset        = 0,
    segments      = 1,
    profile       = 0.5,
    vertex_only   = False,
    clamp_overlap = False,
    loop_slide    = True,
    material      = -1
)



This shows you all the parameters and their defaults, you can then experiment with other values and search for this operator in the official docs to review any additional information you might need.