Answer toward "Snap object to (0,0,0)"
You can use both operator or built-in method:
Operator
bpy.ops.object.location_clear(clear_delta=False)
This is equivalent to the button in Object → Clear → Clear Location (Alt + G)
And you can set clear_delta
parameter if you want to clear delta-transform as well.
built-in method:
obj.location = Vector((0,0,0))
(where obj is Blender object)obj.delta_location = Vector((0,0,0))
(Clear delta location)
This give you direct(kind of) assess to location value, which should be saved as a Blender's Vector
Operator will somehow rely on context
when you call it, so the scene, selected objects, other possible associate content should be set properly. And I personally don't like to use operator in script because they are wrap function set that should be used in User Interface, making it hard to guess what will the operator do when you call it.