Python URL manipulation revisited

My last blog post about publishing standalone files to Nexus repositories prompted me to revisit URL manipulation in Python. When I did this the last time, I used Python stand library’s urlparse and it did the job. This time around, I needed to do a different kind of manipulation. Given a URL, I had to set credentials on it.

I started at urlparse and soon realized that Python3 moved this module to urllib.parse. That is not too bad, I thought. After playing around with it, it became clear that urllib.parse can’t manipulate credentials in a URL.