Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

samples: add async upload sample#665

Merged
unforced merged 9 commits intogoogleapis:mainfrom
unforced:async
Jan 18, 2022
Merged

samples: add async upload sample#665
unforced merged 9 commits intogoogleapis:mainfrom
unforced:async

Conversation

@unforced
Copy link
Copy Markdown
Contributor

FYI: I'll be OOO for winter holidays starting Monday, so any requested changes after business hours on Friday, please feel free to amend and merge without me.

@unforced unforced requested a review from a team December 10, 2021 21:34
@unforced unforced requested a review from a team as a code owner December 10, 2021 21:34
@unforced unforced requested review from a team and nicain December 10, 2021 21:34
@snippet-bot
Copy link
Copy Markdown

snippet-bot Bot commented Dec 10, 2021

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label Bot added api: storage Issues related to the googleapis/python-storage API. samples Issues that are directly related to samples. labels Dec 10, 2021
Copy link
Copy Markdown
Contributor

@andrewsg andrewsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!



# [START storage_async_upload]
async def async_upload_blob(bucket_name):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment that the sample can be run, in practice, with asyncio.run() as it is in the tests? So that people unfamiliar with async functions know they don't have to change their whole program.

Copy link
Copy Markdown
Contributor

@andrewsg andrewsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@unforced unforced merged commit 71a4535 into googleapis:main Jan 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storage Issues related to the googleapis/python-storage API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants