Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
pyuser583
· 2y ago · 0 comments
urlib.parse is a pain. We really need something more like pathlib.Path.
Comments
[–]
Ch00k
2y ago
There is
https://github.com/gruns/furl
[–]
AMCMneCy
2y ago
Also
https://github.com/aio-libs/yarl
[–]
4ec0755f5522
2y ago
I use yarl as my default for this as well, it's been great to work with.
[–]
VagabundoP
2y ago
This library is very pythonic.
[–]
pyuser583
OP
2y ago
Yes! That’s the one I like!
[–]
masklinn
2y ago
That used to be werkzeug.urls, kinda (it certainly had a more convenient API than urllib.parse), but it was killed in Werkzeug 3.
[–]
pyuser583
OP
2y ago
I remember and miss that. But I’m not going to install werkzeug just for the url parsing.
[–]
d_kahneman7
2y ago
Is it that inconvenient?
[–]
pyuser583
OP
2y ago
It’s heavy. It’s a freaking server.
[–]
joouha
2y ago
You might be interested in
https://github.com/fsspec/universal_pathlib