Load camera track from an external file (by Python script)
Something similar to this works for me, didn't test if this code runs without errors, but it may help you

import bpy
import numpy as np
dirPath = "C:/Users/examplepath/examplepath/examplepath/camera.blend/Object/"
nameList = ['Camera0','Camera1','Camera2','Camera3']

# [euler0, euler1, euler2, x, y, z]
cam0 = [77.487, -0.000244, 91.4015, 13.6156, 0.094522, 2.19869]
cam1 = [70.2677, -0.000819, 173.623, 1.1328, 11.1731, 3.33687]
cam2 = [85.5084, 0.000169, -90.6852, -12.8706, 0.355527, 1.29131]
cam3 = [74.6794, -0.002039, 11.1926, 3.2923, -15.5643, 4.444]

camList = [cam0, cam1, cam2, cam3]

def setupCamera(scene, c):
    pi = np.pi

    scene.camera.rotation_euler[0] = c[0] * (pi / 180.0)
    scene.camera.rotation_euler[1] = c[1] * (pi / 180.0)
    scene.camera.rotation_euler[2] = c[2] * (pi / 180.0)

    scene.camera.location.x = c[3]
    scene.camera.location.y = c[4]
    scene.camera.location.z = c[5]

    return

# Append cameras to the scene
for i in range(nameList.__len__()):
    bpy.ops.wm.append(filename=nameList[i], directory=dirPath)

scene = bpy.data.scenes["Scene"]

for i in range(camList.__len__()):
    bpy.ops.object.camera_add()
    newCamera = bpy.data.objects['Camera']
    newCamera.name = 'c' + str(i)

    newCamera.rotation_mode = 'XYZ'
    scene.camera = newCamera

    config = camList[i]
    setupCamera(scene=scene, c=config)