How to rotate object around a global point using Blender's Python API?
Things to look at. 1) simple script

import bpy
import math

R = 10
start_pos = (R,0,0)

ob = bpy.data.objects["Cube"]

for frame_num in range(1,101):
    angle = 2*math.pi*frame_num/100.0
    x = R*math.cos( angle)
    y = R*math.sin( angle)
    z = 0
    bpy.context.scene.frame_set(frame_num)
    ob.location=(x,y,z)
    ob.keyframe_insert(data_path="location", index = -1)


2) place an empty at the point around which you wish to rotate, and make that parent --- see Olav3D's  https://www.youtube.com/watch?v=nmLjYSmaW48

3) understand Euler rotations and their limitations

4) For 'Rolls Royce' rotation --- study quaternions.