Rotation by axis and angle

 1from salome.shaper import model
 2
 3model.begin()
 4partSet = model.moduleDocument()
 5Part_1 = model.addPart(partSet)
 6Part_1_doc = Part_1.document()
 7Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10)
 8Rotation_1 = model.addRotation(Part_1_doc, [model.selection("COMPOUND", "all-in-Cone_1")], model.selection("EDGE", "PartSet/OX"), 120)
 9model.do()
10model.end()

Download this script