Python API, get bezier points taking into account shape key values I need to access the points of a curve object (at the current frame) using the Python API.

If the object doesn't have shape keys, it's easy enough, object.data.splines has all the info I need.

If the object has shape keys, I know the shape key info is in object.data.shape_keys.key_blocks but I'm not entirely sure how to get the final position of each point/tangent in the bezier curves out of this.

First of all, the data in there is not split into splines.

Then if I know the value of each ShapeKey object I'm not sure what's the correct formula to interpolate them.

It would be great if there's some way to get for each spline in the curve, the position of each point and handles, taking into account all the shape keys that are into effect at the current frame.
You can create a shape key that is the mix of the current shape keys (as it is accessible from the shape key menu).

From it get spline info.

Then delete this shape key which was created only for that purpose.

Something like:

import bpy

curve = bpy.context.object

# Add a new shape key that is a mix of the existing one
bpy.ops.object.shape_key_add(from_mix=True)

# Get the last shape key
shape_key = curve.data.shape_keys.key_blocks[len(curve.data.shape_keys.key_blocks)-1]

# Get the info you want
for sk in shape_key.data:
    print( sk.co )
    print( sk.handle_left )
    print( sk.radius )

# Remove the shape key 
bpy.ops.object.shape_key_remove( all = False )