UV model from python

So, i’ve been following this tutorial right here: http://www.creativeshrimp.com/blender-quick-tip-9-displacement.html

And made a python script that randomizes some of these values and ended up creating a small rock generator, using that technique. Now i wanted to UV my rock so i can export a few maps, such as AO and Normal, and use it in a low-poly model. Any ideas how this can be done in scripting?