Read/write URLs to various backends


#1

Is there anything in Rust like Python’s urllib, which allows different back-end implementations to be selected for different URL schemes?

For example, one can use this to write a program that takes a URL parameter and to dynamically read and write S3, Google Cloud Storage, generic http, sftp, local files, etc.


#2

I don’t believe so, although all the individual parts are there. The url crate is production quality, reqwest currently handles http/https really well, and I know there are libraries out there for S3, ftp, and friends.

I imagine it wouldn’t be difficult to write your own urllib which matches on the protocol and provides a homogeneous API, but creating a crate like that would require a non-negligible amount of effort…