Modifiers
The modifiers are stored on an object basis:
import bpy
obj = bpy.context.active_object
print(obj.modifiers)
Add modifier
Modifiers can be added by calling the new-function:
# see if there is already a modifier
mod = o.modifiers.get("SelectedSolidify")
if mod is None:
# otherwise add a modifier to selected object
mod = o.modifiers.new("SelectedSolidify", 'SOLIDIFY')
Or via an operator:
bpy.ops.object.modifier_add(type='SOLIDIFY')
bpy.context.object.modifiers["Solidify"].thickness = 0.1
Remove modifer
Remove a modifier with this operator:
bpy.ops.object.modifier_remove(modifier="GeometryNodes")