GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||
GeezerVison is showing github.com — added support for generation-based query and delete of blobs. by tsinha · Pull Request #1435 · googleapis/google-cloud-python ConversationSmall modifications to get_blob and delete_blob to handle generation ids when querying buckets that have versioning enabled.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. …I paths. added generation support to blob.delete and blob.exists.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. …l to help with generation based queries of blobs. also added version-based blob copying and renaming. fixed a typo in _helpers.py.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
@dhermes, @tsinha, thanks for looking into this. Do you have any updates on when this PR might get merged to address #2463? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tillahoffmann There have been lots of changes to Peeking at the code, at least the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@dhermes, thanks for the update. Do you have any recommendations on how to access md5 and crc32c hashes given a generation number from python? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sure thing. Here is a somewhat icky hack (but it'll work for now). For a file with multiple versions: If you >>> from google.cloud import storage >>> >>> client = storage.Client() >>> bucket = client.bucket('some-bucket') >>> blob_normal = bucket.blob('file.txt') >>> blob_normal.reload() >>> blob_normal._properties {u'bucket': u'some-bucket', u'contentType': u'text/plain', u'crc32c': u'JcxYOQ==', u'etag': u'CLH7moCB59QCEAE=', u'generation': u'1498875135704497', u'id': u'some-bucket/file.txt/1498875135704497', u'kind': u'storage#object', u'md5Hash': u'F/IyVDfyzIWJW12F0xO6+Q==', u'mediaLink': u'https://www.googleapis.com/download/storage/v1/b/some-bucket/o/file.txt?generation=1498875135704497&alt=media', u'metageneration': u'1', u'name': u'file.txt', u'selfLink': u'https://www.googleapis.com/storage/v1/b/some-bucket/o/file.txt', u'size': u'1672', u'storageClass': u'MULTI_REGIONAL', u'timeCreated': u'2017-07-01T02:12:15.663Z', u'timeStorageClassUpdated': u'2017-07-01T02:12:15.663Z', u'updated': u'2017-07-01T02:12:15.663Z'} However, if you manually patch >>> from google.cloud.storage.blob import _quote >>> >>> GENERATION = '1498874876972049' >>> >>> def reload(self, client=None): ... client = self._require_client(client) ... query_params = {'projection': 'noAcl', 'generation': GENERATION} ... api_response = client._connection.api_request( ... method='GET', path=self.path, query_params=query_params, ... _target_object=self) ... self._set_properties(api_response) ... >>> >>> blob_patched = bucket.blob('file.txt') >>> blob_patched.reload = reload.__get__(blob_patched) >>> blob_patched._properties {u'bucket': u'some-bucket', u'contentType': u'text/plain', u'crc32c': u'MO9tZQ==', u'etag': u'CJGY64SA59QCEAE=', u'generation': u'1498874876972049', u'id': u'some-bucket/file.txt/1498874876972049', u'kind': u'storage#object', u'md5Hash': u'zPc9wCyNcKGiYV3ijiB2iw==', u'mediaLink': u'https://www.googleapis.com/download/storage/v1/b/some-bucket/o/file.txt?generation=1498874876972049&alt=media', u'metageneration': u'1', u'name': u'file.txt', u'selfLink': u'https://www.googleapis.com/storage/v1/b/some-bucket/o/file.txt', u'size': u'1635', u'storageClass': u'MULTI_REGIONAL', u'timeCreated': u'2017-07-01T02:07:56.965Z', u'timeDeleted': u'2017-07-01T02:12:15.704Z', u'timeStorageClassUpdated': u'2017-07-01T02:07:56.965Z', u'updated': u'2017-07-01T02:07:56.965Z'} |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hi If there are any outstanding issues remaining, feel free to re-open (or open a new issue). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…tform/python-docs-samples#1435) * remove face detection samples * update docstring * linter * linter
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* deps: remove upper bound on packaging dependency Towards #1435 * install prerelease version of packaging * bump minimum packaging version Co-authored-by: Anthonios Partheniou <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [3.1.0](https://togithub.com/googleapis/python-storage/compare/v3.0.0...v3.1.0) (2025-02-27) ### Features * Add api_key argument to Client constructor ([#1441](https://togithub.com/googleapis/python-storage/issues/1441)) ([c869e15](https://togithub.com/googleapis/python-storage/commit/c869e15ec535a0aa50029d30b6a3ce64ff119b5f)) * Add Bucket.move_blob() for HNS-enabled buckets ([#1431](https://togithub.com/googleapis/python-storage/issues/1431)) ([24c000f](https://togithub.com/googleapis/python-storage/commit/24c000fb7b9f576e6d6c6ec5733f3971fe133655)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.