drivendataorg / cloudpathlib

Python pathlib-style classes for cloud storage services such as Amazon S3, Azure Blob Storage, and Google Cloud Storage.
https://cloudpathlib.drivendata.org
MIT License
478 stars 62 forks source link

GSPath md5 hash property could potentially be supported #482

Open fafnirZ opened 3 weeks ago

fafnirZ commented 3 weeks ago

In the supported methods and properties table in the README, it shows that the md5 property is only supported for AzureBlobPath, but isnt supported for GSPath.

however there exists a property returned by bucket.get_blob: Blob.md5_hash https://cloud.google.com/python/docs/reference/storage/latest/google.cloud.storage.blob.Blob#google_cloud_storage_blob_Blob_md5_hash

so if I understand correctly it should be as simple as updating a line in this dictionary to reflect that, https://github.com/drivendataorg/cloudpathlib/blob/7f1a5dce4277eb2bcd1611389241b818651f9f3a/cloudpathlib/gs/gsclient.py#L119 (and adding a property inside GSPath too)

Happy to submit a PR for it which addresses this and updates docs / tests if this functionality is wanted!!

pjbull commented 3 weeks ago

Great, we would accept a PR. You can find contribution guidelines here: https://cloudpathlib.drivendata.org/stable/contributing/