cloudpathlib
cloudpathlib copied to clipboard
Python pathlib-style classes for cloud storage services such as Amazon S3, Azure Blob Storage, and Google Cloud Storage.
Personally, I'd find it more intuitive to have separate methods `_move_file` and `_copy_file`, where the base implementation of `_move_file` would be something like: ```python def _move_file(self, src: BoundedCloudPath, dst: BoundedCloudPath)...
A pass at trying to detect when `__fspath__` is called by `open` with a write mode. IMO it doesn't work all that well. It appears `open` is a weird function...
Our touch implementation depends on the `MetadataDirective="REPLACE"`: https://github.com/drivendataorg/cloudpathlib/blob/de6b54737014b06982e8c3af54d2da4238fcd8e3/cloudpathlib/s3/s3client.py#L158-L165 However, this fails our test for `touch` when the rig is `custom_s3_rig` running against our MinIO test server: https://github.com/drivendataorg/cloudpathlib/blob/de6b54737014b06982e8c3af54d2da4238fcd8e3/tests/test_cloudpath_file_io.py#L61-L66 I suspect that...
Would be cool to have snippets page that covers some very common tasks. Here are a few off the top of my head: - [ ] recursively get all files...
`CloudPath.replace` and `CloudPath.rename` (which are the same function for cloudpathlib) do not handle "directories". The pathlib docs say: ``` Rename this file or directory to the given target, and return...
Now that we have the `CloudPath` factory on the client, it can be nice to have a scoped backend that you don't have to worry about conflicting with other backends....
It would be great to be able to generate URLs that can be used. ```python S3Path("s3://bucket/file.txt").as_url() # > https://bucket.amazons3.com/file.txt S3Path("s3://bucket/file.txt").as_url(presign_expiry_min=100) # > https://bucket.amazons3.com/file.txt?presign=accesstokenwithexpiry ```
I had a few thoughts while looking at #132 that may be useful for improving our documentation content and styling Content: - [ ] "Getting started" page - usually the...
I was loading a file from s3 and mistyped the file location. The error I got showed me the local tmp path, which was misleading. I think this should be...
Unfortunately the following code does not behave as expected: ```python with open(cloud_path, "w") as fp: fp.write("foo") ``` (as opposed to using `cloud_path.open("w")` which does work as expected). What will happen...