Url shortener for Python