Apply mesh transformations to primitive_uv_sphere_add()
This can be achieved by getting the mesh of the object and multiplying the transformation matrix to each vertex. (Possibly there is a convenience function for that).

import bpy
from bpy import context
import mathutils
from mathutils import Vector,Quaternion
import math

obj = bpy.data.objects["Cube"]  # particular object by name
#obj = bpy.context.scene.objects.active # active object

# setup whatever matrix
mx = mathutils.Matrix.Rotation(math.radians(15.0), 4, 'X')

mesh = obj.data
for vert in mesh.vertices:
    vert.co = mx * vert.co