import bpy
bpy.context.camera.sensor_width = 9.6
bpy.context.camera.sensor_height = 5.4
bpy.context.camera.sensor_fit = 'HORIZONTAL'