Animate between script-drawn frames?
It's not clear from the question your exact requirement because the link provided doesn't work.
Since you already know how to set keyframes using the Python Api here,animating between keyframes is only a matter of setting the correct interpolation at individual keyframes until next keyframe.
#Setting individual interpolation points
import bpy  
ob = bpy.data.objects['Cube']  

frame_num = 0 
bpy.context.scene.frame_set(frame_num)
ob.scale = (4,1,1)
ob.keyframe_insert(data_path=&quot;scale&quot;, index=-1) # &quot;-1&quot; sets values for all axis's
bpy.context.scene.frame_set(frame_num)
key = ob.animation_data.action.fcurves[0].keyframe_points[0]
key.interpolation = 'BEZIER'


frame_num = 10
bpy.context.scene.frame_set(frame_num)
ob.scale = (1,5,1)
ob.keyframe_insert(data_path=&quot;scale&quot;, index=-1) 
key = ob.animation_data.action.fcurves[0].keyframe_points[1]
key.interpolation = 'LINEAR'

#And so on ............

#Setting all interpolations at once
import bpy  

ob = bpy.data.objects['Cube']
scales = [(4,1,1),(1,5,1),(1,1,6),(1,1,1)]
frame_num = 0 

for scale in scales: 
   bpy.context.scene.frame_set(frame_num)
   ob.scale = scale
   ob.keyframe_insert(data_path=&quot;scale&quot;, index=-1) # &quot;-1&quot; sets values for all axis's

   
    for fcurve in ob.animation_data.action.fcurves:
        key = fcurve.keyframe_points[-1]
        key.interpolation = &quot;BEZIER&quot;
    frame_num += 10