git.io is an awesome URL shortener provided by Github. It works when shortening URLs from *.github.com/* to a small https://git.io/ link.
>>> import requests
>>> requests.post('https://git.io/create', {'url': 'https://github.com/myano/lmddgtfy'}).text
u'tZmc2g'
requests can be installed via pip
>> import urllib
>> import urllib2
>> urllib2.urlopen(urllib2.Request('https://git.io/create', urllib.urlencode({'url': 'https://github.com/myano/lmddgtfy'}))).read()
'tZmc2g'