Accessing data in the UV layout in Python?
Turns out I need to get into the EDIT mode and select all vertices, and then perform the projection.

bpy.ops.object.mode_set(mode='OBJECT')
bpy.context.scene.objects.active = obj
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.uv.smart_project()
bpy.ops.object.mode_set(mode='OBJECT')


After that, accessing data is as easy as the solution given in Get/Set coordinates for UV vertices using Python.