Generate unique ID for URL

Richard richardbp at
Wed Nov 14 00:20:53 CET 2012


I want to create a URL-safe unique ID for URL's.
Currently I use:
url_id = base64.urlsafe_b64encode(url)

>>> base64.urlsafe_b64encode('')

I would prefer more concise ID's. 
What do you recommend? - Compression?


More information about the Python-list mailing list