-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Storage: updating Connection docstring; turning make_request private. #604
Storage: updating Connection docstring; turning make_request private. #604
Conversation
Making it clear in the docstring that the Connection itself only handles "bucket" queries and that the other classes handle the other 30 (give or take) methods of the API.
LGTM |
Storage: updating Connection docstring; turning make_request private.
@tseaver WDYT of missing support / overlapping support of |
I think we should remove the single-bucket-centric connection methods, and surface such operations only on
|
I like it! In the implicit case, WDYT of: >>> b = Bucket(bucket_name)
>>> b.exists()
False
>>> b.create()
>>> b.exists()
True |
In line with this would be putting most of the This leaves us storage.set_default_connection()
buckets = storage.get_all_buckets()
bucket = buckets.next() # Iterator
for blob in bucket.get_all_blobs():
do_something(blob) or even in the more extreme scenario that there is a default bucket storage.set_defaults()
for blob in storage.get_all_blobs():
do_something(blob) |
I like I'm not sure about calling ISTM that |
* feat: Add support for python 3.11 chore: Update gapic-generator-python to v1.8.0 PiperOrigin-RevId: 500768693 Source-Link: googleapis/googleapis@190b612 Source-Link: googleapis/googleapis-gen@7bf29a4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2JmMjlhNDE0YjllY2FjMzE3MGYwYjY1YmRjMmE5NTcwNWMwZWYxYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Making it clear in the docstring that the Connection itself only handles
storage.bucket...
API methods and that the other classes handle the other 30 (give or take) methods of the API.@tseaver This documents our decision from earlier today (about the responsibilities of
Connection
).Also note
storage.buckets.update
anywhere (butConnection.api_request
would allow it)storage.buckets.patch
onConnection
. Only viaBucket
(through_PropertyMixin._patch_properties()
).Bucket._reload_properties()
(via_PropertyMixin
) andConnection.get_bucket
implementstorage.buckets.get
.For your reference: discovery document.