import bpy
bpy.context.object.data.sensor_width = 30.0
bpy.context.object.data.sensor_height = 15.0
bpy.context.object.data.sensor_fit = 'HORIZONTAL'