So I have the labels set using the answer here
How to add text in blender using python
import bpy
tech_list = ["TechA", "TechB", "TechC", "TechD"]
for tech in tech_list:
bpy.data.curves.new(type="FONT", name=tech).body = tech
label = bpy.data.objects.new(name=("label"+str(tech_list.index(tech))),\
object_data=bpy.data.curves[tech])
bpy.context.scene.collection.objects.link(label)
But there is no way I can get these objects rotated 90*, the bpy.ops.rotate only works in edit mode on meshes and the labels are curves, I tried to convert to meshes but I get into infinite loop of trial and failure.
Would you be able to point me in the right direction?