How do I set up a Follow Path constraint and also control its influence?
Following code worked for me:
import bpy

ob = bpy.context.object
curve_ob = bpy.data.objects[&quot;Plane&quot;]


con = ob.constraints.new('FOLLOW_PATH')
con.target = curve_ob

curve_ob.data.use_path = True
anim = curve_ob.data.animation_data_create()
anim.action = bpy.data.actions.new(&quot;%sAction&quot; % curve_ob.data.name)

fcu = anim.action.fcurves.new(&quot;eval_time&quot;)
mod = fcu.modifiers.new('GENERATOR')
mod.use_restricted_range = True 

mod.frame_start = 1
mod.frame_end = 100