Python generate unique id from string