How to animate Constraints with Python?
Right click on the property and select copy data path and use it :

in this case it's constraints["Follow Path"].offset

and the adding a keyframe would be like :

cube.keyframe_insert(data_path='constraints["Follow Path"].offset', frame=10)