René's URL Explorer Experiment


Title: PROPOSAL: Storage API consistency fix · Issue #632 · googleapis/google-cloud-python · GitHub

Open Graph Title: PROPOSAL: Storage API consistency fix · Issue #632 · googleapis/google-cloud-python

X Title: PROPOSAL: Storage API consistency fix · Issue #632 · googleapis/google-cloud-python

Description: Guiding principles: Getters and setters should never make HTTP requests. Lazy loading is OK, but only when it involves instance creation / other local (non-network bound) behavior. For example, in Bucket.acl this already happens: @proper...

Open Graph Description: Guiding principles: Getters and setters should never make HTTP requests. Lazy loading is OK, but only when it involves instance creation / other local (non-network bound) behavior. For example, in ...

X Description: Guiding principles: Getters and setters should never make HTTP requests. Lazy loading is OK, but only when it involves instance creation / other local (non-network bound) behavior. For example, in ...

Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/632

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PROPOSAL: Storage API consistency fix","articleBody":"Guiding principles:\n-   [x] Getters and setters should **never** make HTTP requests. Lazy loading is OK,\n  but only when it involves instance creation / other local (non-network bound) behavior. For [example](https://github.com/GoogleCloudPlatform/gcloud-python/blob/f73ad7e8fc877e14e2f9c0b4ec42430f2396f770/gcloud/storage/bucket.py#L139-L144), in `Bucket.acl` this already happens:\n  \n  ``` python\n  @property\n  def acl(self):\n      \"\"\"Create our ACL on demand.\"\"\"\n      if self._acl is None:\n          self._acl = BucketACL(self)\n      return self._acl\n  ```\n-   [ ] More generally HTTP requests should be limited to explicit method calls. This also rules out constructors loading data.\n-   [ ] `Blob`, `Bucket`, and `*ACL` (the only nouns) instances should have `load()`, `exists()`, `create()`, `delete()`, and `update()` methods. This design gives rise to code like\n  \n  ``` python\n  blob = Blob('/remote/path.txt', bucket=bucket, properties=properties)\n  try:\n      blob.load()  # Just metadata\n  except NotFound:\n      blob.upload_from_file(filename)  # Sends metadata from properties\n  ```\n  \n  (this maybe screams for `get_or_create()`, we'll feel it out as we develop). It's unclear if it's worth making a distinction between `storage.NOUN.update \u003c--\u003e PUT` and `storage.NOUN.patch \u003c--\u003e PATCH`. (As of right now, we don't implement `PUT` / `update` anywhere.)\n-   [x] `exists()` should use `fields` in the requests to minimize the payload.\n-   [ ] A `Connection` should not be required to be bound to any object (one of the nouns `Bucket`, `ACL`, or `Blob`) but should be an optional argument to methods which actually talk to the API.\n-   [ ] We should **strongly** consider adding a `last_updated` field to classes to indicate the last time the values were updated (from the server).\n-   [ ] For list methods: List all buckets top-level, e.g.\n  \n  ``` python\n  storage.get_all_buckets(connection=optional_connection)\n  ```\n  \n  and then `bucket.get_all_objects()`. It's unclear how the other 3 nouns (`objectAccessControls`, `bucketAccessControls` and `defaultObjectAccessControls`) will handle this. Right now they are handled via `ObjectACL.reload()` and `BucketACL.reload()` (a superclass of `DefaultObjectACL`).\n-   [x] Implicit behavior (default project, default bucket and/or default connection) should be used wherever possible (and documented)\n\n@tseaver Please weigh in. This was inspired by our [discussion](https://github.com/GoogleCloudPlatform/gcloud-python/pull/604#issuecomment-73929760) at the end of #604.\n\n/cc @thobrla I'd like to close #545 and focus on this (possibly broken down into sub-bugs). Does that sound OK?\n","author":{"url":"https://github.com/dhermes","@type":"Person","name":"dhermes"},"datePublished":"2015-02-13T07:57:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/632/google-cloud-python/issues/632"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:175ee791-cb37-28bd-1d19-b91fd8e2f4dd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB5BC:29330:A0CC3D:A4641A:6A4DB34D
html-safe-nonce8ca726b22989f95ae5bf8405e08c34473bb16da36ca349d25eb9add86b5f28a0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUJDOjI5MzMwOkEwQ0MzRDpBNDY0MUE6NkE0REIzNEQiLCJ2aXNpdG9yX2lkIjoiODQxMjUxNDk5NjYzODgyMzI0NiIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9
visitor-hmac7302040e21521a384adc807508aef478044e9c85a788b50585c045ee705f9d58
hovercard-subject-tagissue:57569934
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/632/issue_layout
twitter:imagehttps://opengraph.githubassets.com/711a70626f1218c0703033be7c0031e5fcfb15923e0314c311ebbf4e094a9d31/googleapis/google-cloud-python/issues/632
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/711a70626f1218c0703033be7c0031e5fcfb15923e0314c311ebbf4e094a9d31/googleapis/google-cloud-python/issues/632
og:image:altGuiding principles: Getters and setters should never make HTTP requests. Lazy loading is OK, but only when it involves instance creation / other local (non-network bound) behavior. For example, in ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedhermes
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
turbo-cache-controlno-preview
go-importgithub.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id16316451
octolytics-dimension-repository_nwogoogleapis/google-cloud-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id16316451
octolytics-dimension-repository_network_root_nwogoogleapis/google-cloud-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release32f7b614aca06e6bbd89842b1370df1328264f68
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/googleapis/google-cloud-python/issues/632#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-cloud-python%2Fissues%2F632
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-cloud-python%2Fissues%2F632
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fgoogle-cloud-python
Reloadhttps://github.com/googleapis/google-cloud-python/issues/632
Reloadhttps://github.com/googleapis/google-cloud-python/issues/632
Reloadhttps://github.com/googleapis/google-cloud-python/issues/632
Please reload this pagehttps://github.com/googleapis/google-cloud-python/issues/632
googleapis https://github.com/googleapis
google-cloud-pythonhttps://github.com/googleapis/google-cloud-python
Notifications https://github.com/login?return_to=%2Fgoogleapis%2Fgoogle-cloud-python
Fork 1.7k https://github.com/login?return_to=%2Fgoogleapis%2Fgoogle-cloud-python
Star 5.3k https://github.com/login?return_to=%2Fgoogleapis%2Fgoogle-cloud-python
Code https://github.com/googleapis/google-cloud-python
Issues 439 https://github.com/googleapis/google-cloud-python/issues
Pull requests 130 https://github.com/googleapis/google-cloud-python/pulls
Discussions https://github.com/googleapis/google-cloud-python/discussions
Actions https://github.com/googleapis/google-cloud-python/actions
Projects https://github.com/googleapis/google-cloud-python/projects
Security and quality 0 https://github.com/googleapis/google-cloud-python/security
Insights https://github.com/googleapis/google-cloud-python/pulse
Code https://github.com/googleapis/google-cloud-python
Issues https://github.com/googleapis/google-cloud-python/issues
Pull requests https://github.com/googleapis/google-cloud-python/pulls
Discussions https://github.com/googleapis/google-cloud-python/discussions
Actions https://github.com/googleapis/google-cloud-python/actions
Projects https://github.com/googleapis/google-cloud-python/projects
Security and quality https://github.com/googleapis/google-cloud-python/security
Insights https://github.com/googleapis/google-cloud-python/pulse
PROPOSAL: Storage API consistency fixhttps://github.com/googleapis/google-cloud-python/issues/632#top
https://github.com/lukesneeringer
api: storageIssues related to the Cloud Storage API.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20storage%22
Storage Stablehttps://github.com/googleapis/google-cloud-python/milestone/6
https://github.com/dhermes
dhermeshttps://github.com/dhermes
on Feb 13, 2015https://github.com/googleapis/google-cloud-python/issues/632#issue-57569934
examplehttps://github.com/GoogleCloudPlatform/gcloud-python/blob/f73ad7e8fc877e14e2f9c0b4ec42430f2396f770/gcloud/storage/bucket.py#L139-L144
@tseaverhttps://github.com/tseaver
discussionhttps://github.com/GoogleCloudPlatform/gcloud-python/pull/604#issuecomment-73929760
#604https://github.com/googleapis/google-cloud-python/pull/604
@thobrlahttps://github.com/thobrla
#545https://github.com/googleapis/google-cloud-python/issues/545
lukesneeringerhttps://github.com/lukesneeringer
api: storageIssues related to the Cloud Storage API.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20storage%22
Storage Stablehttps://github.com/googleapis/google-cloud-python/milestone/6
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.