local rotation

Hello to all.
I have a cylinder in the scene that was rotated to world coordinates, then I need to rotate about its axis ‘Y’, with local coordinates and using a script.
I think that this function is related to the topic, but I do not use it well.

bpy.ops.transform.rotate(value=(0.191027,), axis=(0.338614, -0.757322, 0.558394), constraint_axis=(False, False, True), constraint_orientation=‘LOCAL’, mirror=False, proportional=‘DISABLED’, proportional_edit_falloff=‘SMOOTH’, proportional_size=4.59497, snap=False, snap_target=‘CLOSEST’, snap_point=(0, 0, 0), snap_align=False, snap_normal=(0, 0, 0), release_confirm=False)

How can I use it? :confused::confused::confused::confused::confused:
Thanks in advance.

you could use matrices, something like this will rotate object 45º (converted to radians) around ‘Y’

import bpy, mathutils
rot = mathutils.Matrix.Rotation(45 * 0.0174532925, 4, 'Y')
ob = bpy.context.object
ob.matrix_world *= rot

Liero, you can’t imagine how your suggestion helped me.
Thanks, really.

jaja un abrazo! keep blending