Switch to vertex, edge, face mode in edit mode via python
I prefer to not use operators, if they can be avoided. You may use:

bpy.context.tool_settings.mesh_select_mode


Assign a tuple of 3 booleans to set Vertex, Edge, Face selection.

To activate vertex selection mode, use:

bpy.context.tool_settings.mesh_select_mode = (True, False, False)


For edge + face multi-selection mode, use:

bpy.context.tool_settings.mesh_select_mode = (False, True, True)


etc.



When working with the BMesh Module (bmesh), there's also

bm.select_mode


For edge selection, do:

bm.select_mode = {'EDGE'}


For vertex and face selection multi-mode, do:

bm.select_mode = {'VERT', 'EDGE', 'FACE'}