import bpy


bpy.data.objects['Cube'].select_set(True)


bpy.ops.object.delete(True)


bpy.data.curves.new(type=, name=).body = 
font_obj = bpy.data.objects.new(name=, object_data=bpy.data.curves[])
bpy.context.scene.collection.objects.link(font_obj)


bpy.context.scene.camera.location = (2.5,0.3,10)


bpy.context.scene.camera.rotation_euler = (0,0,0)


area = next(area for area in bpy.context.screen.areas if area.type == 'VIEW_3D')
area.spaces[0].region_3d.view_perspective = 'CAMERA'