This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Example for how to return a https link to a GCS file that expires in {expiration} | |
seconds from now. | |
Receivers of the link do not need a Google account or any special access. | |
Dependencies: | |
pip install google-auth | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aiohttp | |
def request_tracer(results_collector): | |
async def on_request_start(session, context, params): | |
context.on_request_start = session.loop.time() | |
context.is_redirect = False | |
async def on_request_end(session, context, params): | |
total = session.loop.time() - context.on_request_start |
OlderNewer