Title: Pubsub Could Use Autocreate on Topics and Subscriptions · Issue #905 · googleapis/google-cloud-python · GitHub
Open Graph Title: Pubsub Could Use Autocreate on Topics and Subscriptions · Issue #905 · googleapis/google-cloud-python
X Title: Pubsub Could Use Autocreate on Topics and Subscriptions · Issue #905 · googleapis/google-cloud-python
Description: I think this will be a recurring pattern: topic = pubsub.Topic('book-process-queue') if not topic.exists(): topic.create() subscription = pubsub.Subscription('book-sub', topic) if not subscription.exists(): subscription.create() So it mi...
Open Graph Description: I think this will be a recurring pattern: topic = pubsub.Topic('book-process-queue') if not topic.exists(): topic.create() subscription = pubsub.Subscription('book-sub', topic) if not subscription....
X Description: I think this will be a recurring pattern: topic = pubsub.Topic('book-process-queue') if not topic.exists(): topic.create() subscription = pubsub.Subscription('book-sub', topic) if n...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/905
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pubsub Could Use Autocreate on Topics and Subscriptions","articleBody":"I think this will be a recurring pattern:\n\n``` python\ntopic = pubsub.Topic('book-process-queue')\nif not topic.exists():\n topic.create()\n\nsubscription = pubsub.Subscription('book-sub', topic)\nif not subscription.exists():\n subscription.create()\n```\n\nSo it might be a good idea to simplify it to:\n\n``` python\ntopic = pubsub.Topic('book-process-queue', auto_create=True)\n```\n\n`gcloud-node` does something like this already.\n","author":{"url":"https://github.com/waprin","@type":"Person","name":"waprin"},"datePublished":"2015-06-01T16:50:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/905/google-cloud-python/issues/905"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e273e776-9926-d85b-744a-2a99da6f9b47 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ECFA:179A4C:50E4A3:774067:6A4E0BA6 |
| html-safe-nonce | 690bd3ed9b552a2c3d7428669caede592277e4ad62aeb4a08d2da8a6e9f54689 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0ZBOjE3OUE0Qzo1MEU0QTM6Nzc0MDY3OjZBNEUwQkE2IiwidmlzaXRvcl9pZCI6IjIyMjQ5ODc4ODA4MjgwNDYyNDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7db6b6560917a4cb3e7e5146db2a24fe35702e78e44246c4f388982a96969b9a |
| hovercard-subject-tag | issue:83600022 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/905/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f5a55978e066ac90ff96162f35bf0c53fe59ecf11eff04a7cdb6618478b04b23/googleapis/google-cloud-python/issues/905 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f5a55978e066ac90ff96162f35bf0c53fe59ecf11eff04a7cdb6618478b04b23/googleapis/google-cloud-python/issues/905 |
| og:image:alt | I think this will be a recurring pattern: topic = pubsub.Topic('book-process-queue') if not topic.exists(): topic.create() subscription = pubsub.Subscription('book-sub', topic) if not subscription.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | waprin |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 51470c353b8a1f52a88d3e3cc2014b17ab8cc1ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width