https://prefect.io logo
j

James Phoenix

09/07/2022, 5:49 PM
Copy code
from prefect import flow, task
from prefect.filesystems import GCS


@flow
async def analyse_youtube_video():
    # 1. Download the video from YouTube and upload it to GCS
    gcs_block = GCS.load("buffalo-raw-video-files")

    # Make some fake JSON data:
    data = {"name": "John", "age": 30, "city": "New York"}
    result = await gcs_block.write_path(
        "video.mp4", data)
    print(result)
    return 42