3 ms·
urlib.parse is a pain. We really need something more like pathlib.Path.
by pyuser583 3y ago
urlib.parse is a pain. We really need something more like pathlib.Path.
- masklinn 3y agoThat used to be werkzeug.urls, kinda (it certainly had a more convenient API than urllib.parse), but it was killed in Werkzeug 3.
- pyuser583 3y agoI remember and miss that. But I’m not going to install werkzeug just for the url parsing.
- d_kahneman7 3y agoIs it that inconvenient?
- Ch00k 3y agoThere is https://github.com/gruns/furl https://github.com/gruns/furl
- AMCMneCy 3y agoAlso https://github.com/aio-libs/yarl https://github.com/aio-libs/yarl
- 4ec0755f5522 3y agoI use yarl as my default for this as well, it's been great to work with.
- pyuser583 3y agoYes! That’s the one I like!
- VagabundoP 3y agoThis library is very pythonic.
- joouha 3y agoYou might be interested in https://github.com/fsspec/universal_pathlib https://github.com/fsspec/universal_pathlib