Create Extrusion Fuse by sizes

 1from salome.shaper import model
 2
 3model.begin()
 4partSet = model.moduleDocument()
 5Part_1 = model.addPart(partSet)
 6Part_1_doc = Part_1.document()
 7Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
 8ExtrusionFuse_1 = model.addExtrusionFuse(Part_1_doc,
 9                                         [],
10                                         model.selection(),
11                                         0,
12                                         5,
13                                         [model.selection("SOLID", "Box_1_1")])
14Sketch_1 = model.addSketch(Part_1_doc,
15                           model.selection("FACE", "Box_1_1/Top"))
16SketchCircle_1 = Sketch_1.addCircle(5, 0, 2)
17ExtrusionFuse_1.setNestedSketch(Sketch_1)
18model.do()
19model.end()

Download this script