Exporting animation F-curve points from the Graph Editor
The coordinate and handles (co, handle_left, handle_right) can be read / set from the KeyFrame keyframe point.

Test code, runs on action on active object. Prints the fcurve name and each co and handle.

import bpy

context = bpy.context
obj = context.object
action =  context.object.animation_data.action
#print("fcurve_dic = {")
for fcurve in action.fcurves:

    print("'%s[%d]' : [" % (fcurve.data_path, fcurve.array_index))
    for kfp in fcurve.keyframe_points:
        #print("\t{", end="")
        vals = []
        for prop in ["co", "handle_left", "handle_right"]:
            co = getattr(kfp, prop)
            vals.append("{'x':%.4f, 'y':%.4f}" %  co[:])
        print("\t[%s]" % ", ".join(vals))
    print("\t]")

#print("}")