import bpy
bpy.context.camera.sensor_width = 36
bpy.context.camera.sensor_height = 24
bpy.context.camera.sensor_fit = 'HORIZONTAL'