Set rotation values without applying them Is it possible to set some rotation values to Blender GUI corresponding object fields (or any other like location or scale) without actually applying them to the object itself, like some sort of "offset"?

I mean I have script that set some objects to scene, rotate them right but writes its values as (0,0,0) instead of their real rotation values (but I know those real values myself so I could set them BUT without changing object actual rotation)...like let's say object rotation value is 0 but I want to be represented and set visually in Blender rotation fields as 90 - is something like this possible, please?

P.S.: I NEED SCRIPT BASED ANSWERS ONLY
Here's a script which does this, comments inline.

import bpy
import math

#target rotation:
target_rotation = [90, 90, 90]
#object to operate on (active object):
ob = bpy.context.active_object



#this assumes you are starting at 0 rotaton, so you pobably want to apply rotation before doing anything:
bpy.ops.object.transform_apply(location=False, rotation=True, scale=False) #apply rotation
#get inverse of rotation we want:
t_rot = (math.radians(target_rotation[0]*-1),
         math.radians(target_rotation[1]*-1), 
         math.radians(target_rotation[2]*-1))
#we need to apply the rotations in reverse order, so unsure that we are in zyx:
ob.rotation_mode = 'ZYX'
ob.rotation_euler = (t_rot) #set rotation to inverse
bpy.ops.object.transform_apply(location=False, rotation=True, scale=False) #apply rotation

t_rot = (math.radians(target_rotation[0]),
         math.radians(target_rotation[1]), 
         math.radians(target_rotation[2]))
ob.rotation_mode = 'XYZ' #set rotation mode back (was zyx, so we want xyz)
ob.rotation_euler = (t_rot) #set rotation


Pardon my probably poor python ;)