bpy_extras submodule (bpy_extras.keyconfig_utils)

bpy_extras.keyconfig_utils.keyconfig_export(wm, kc, filepath)
bpy_extras.keyconfig_utils.keyconfig_merge(kc1, kc2)

note: kc1 takes priority over kc2

bpy_extras.keyconfig_utils.keyconfig_test(kc)
bpy_extras.keyconfig_utils.km_exists_in(km, export_keymaps)