-
Notifications
You must be signed in to change notification settings - Fork 14
[feature request] SFTPStore
#336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is unlikely to happen natively unless the Rust However, this is why I've started thinking about exposing the |
Alright, I can move this issue there.
Could you elaborate on that? It seems like quite a common use case.
I think this is going to be useful! |
I expect they'll say that the primary storage backends for the DataFusion, Parquet, and Arrow communities are commodity object storage solutions, specifically S3, GCS, and Azure. I doubt they'll want to take on the maintenance burden themselves for an SFTP implementation as well, but I don't know for sure 🤷♂ . You could also create your own Rust crate that implements the https://github.com/Eugeny/russh looks like a great pure-Rust library for working with SSH and SFTP. Might be a good place to look if you wanted to implement your own Rust SFTP ObjectStore backend. Or, you could implement an SFTP backend in pure Python, as long as you find an async SFTP client in Python. |
It doesn't look like russh supports range requests for file reads, though, which could be problematic: https://docs.rs/russh-sftp/2.0.8/russh_sftp/client/struct.SftpSession.html#method.read |
It looks like paramiko supports range requests: https://docs.paramiko.org/en/stable/api/sftp.html#paramiko.sftp_file.SFTPFile.read |
@kylebarron you could perhaps use opendal which as sftp support and then use https://docs.rs/object_store_opendal/0.50.0/object_store_opendal/struct.OpendalStore.html for the objectstore wrapper |
Wow that project looks amazing |
Sorry I have no interest in taking on the maintenance of SFTP in this library. But I am fully supportive of you making an API-compatible " Do either of you have any feedback on obspec so far? Also note that opendal have their own Python binding: https://opendal.apache.org/docs/python/opendal.html |
I like the idea of May I ask why currently all these functions (I assume they are supposed to be standalone functions like in |
There are two ways to handle subtyping in Python, nominal and structural subtyping. Neither really supports pure functions. You can use protocols with pure functions, but then it has to be defined with a single obstore/obstore/python/obstore/_store/_aws.pyi Lines 452 to 454 in a4f915a
You can't use structural subtyping based on the name of a pure function. So in order to handle an object store with multiple types of methods, And then in obstore we now have a wrapper to expose class methods in addition to top-level pure functions. |
Uhh I've missed that PR. Everything makes complete sense now, thanks! |
In #346 I ran into a core problem with obspec-obstore, where it's really hard to ensure any raised exceptions come from (or are subclassed from) obspec. I think it's probably crucial for obspec to have common exceptions, so that callers of obspec can have some allowed exceptions. I think to keep things moving, it's best to release a new version of obstore without obspec, and then we can come back to obspec after release. |
It would be great if
obstore
had an interface for SFTP.The text was updated successfully, but these errors were encountered: