Exporting only 1 object at a time to .stl using blender script python
Set the use_selection property



To export only the selection, set the use_selection property to True. Also select object before and deselect after.

2.79 and prior.

Export all selected objects to individual stl

import bpy
context = bpy.context
obs = context.selected_objects  # makes a "snapshot" copy of property
bpy.ops.object.select_all(action='DESELECT')    
scene = context.scene
for ob in obs:
    scene.objects.active = ob
    ob.select = True
    stl_path = os.path.join('C://Users/deden/Desktop/', name + '.stl')
    bpy.ops.export_mesh.stl(
            filepath=stl_path,
            use_selection=True)
    ob.select = False


>= 2.80

2.8 version.  Exports all mesh objects in scene to stl.

import bpy
from pathlib import Path

context = bpy.context
scene = context.scene
viewlayer = context.view_layer


obs = [o for o in scene.objects if o.type == 'MESH']
bpy.ops.object.select_all(action='DESELECT')    

path = Path("/tmp")
for ob in obs:
    viewlayer.objects.active = ob
    ob.select_set(True)
    stl_path = path / f"{ob.name}.stl"
    bpy.ops.export_mesh.stl(
            filepath=str(stl_path),
            use_selection=True)
    ob.select_set(False)