# How can i animate the spin property for curves (extruding while rotating)

I'm trying to make a video explaining "Solids of revolutions" in calculus; i need to animate the "spin" tool, i have looked it up, and all what i found talks about rotations, which is not what i'm looking for, by spinning i mean using this command line

bpy.ops.mesh.spin(steps = 90,angle = 2 *math.pi, center=(0, 0, 0), axis = (1, 0, 0))