The beauty of Ubuntu is that everything is free and open source. So why don't you read Unity's source code, get the relevant blocks you want, and adapt it to your uses?
Just notice Unity was not made in Python, but in C/C++. But you should be able to find python bindings for all the libraries used.
Unity is, formally, "just" a Compiz plugin... so your best start would be to download its source code, study it, and learn how compiz plugins work.
apt-get source unity unity-2d-spread
Compiz also have (or had, prior to Gnome 3) other plugins with a similar effect, for example, Expo. So it's worth investigating it.
Find out which libraries they use, and search for documentation (wikis, forums, IRC channels) for those libraries.