How to keyframe the image sequence offset using Python?
In general, set the property's value and THEN insert the keyframe with that value (mentioning the frame number). The value needs to match the property type. In your case:
Step 1 -
bpy.data.materials[&quot;Testing&quot;].node_tree.nodes[&quot;ShaderNodeTexImage&quot;].image_user.frame_offset = 1

Step 2 -
bpy.data.materials[&quot;Testing&quot;].node_tree.nodes[&quot;ShaderNodeTexImage&quot;].image_user.keyframe_insert(&quot;frame_offset&quot;, frame=1)

Which sets the frame offset to 1 for ShaderNodeTexImage at frame 1, for Testing material.
For objects, it's a bit different, but the concept is the same -
bpy.data.objects[&quot;obj_name&quot;].hide_render = True
bpy.data.objects[&quot;obj_name&quot;].keyframe_insert(&quot;hide_render&quot;, frame = 100)

which hides the object in render, at frame 100
The API documentation is not explicit about all this, but you have to connect the dots by understanding how Blender API is structured and how Python works. Refer:
https://docs.blender.org/api/current/bpy.types.ImageUser.html?highlight=frame_offset#bpy.types.ImageUser.frame_offset
https://docs.blender.org/api/current/bpy.types.bpy_struct.html?highlight=keyframe_insert#bpy.types.bpy_struct.keyframe_insert
This module is used for all Blender/Python access:
https://docs.blender.org/api/current/bpy.data.html
Play around and practice, self learning is best learning :)