def token_urlsafe(nbytes=None):
 tok = token_bytes(nbytes)
 return base64.urlsafe_b64encode(tok).rstrip('=').decode('ascii')

def token_urlsafe ( nbytes = None ) : tok = token_bytes ( nbytes ) return base64 . urlsafe_b64encode ( tok ) . rstrip ( '=' ) . decode ( 'ascii' )
return a random url-safe text string .