revise uri in python and ruby