Python module to create short links from tinyurl.com
git clone https://github.com/daxeel/TinyURL-Python.git
cd TinyURL-Python
python setup.py install
>>> import tinyurl
>>> print tinyurl.shorten("www.abc.com", "xyz")
>>> http://www.abc.com/xyz
>>> print tinyurl.shorten("www.abc.com", "")
>>> http://www.abc.com/wxghf
Here, tinyurl has shorten function which takes two parameters. First is URL which you want to short and second one is custome name.
Leave blank second argument if you want random alias.