Get video id for cloudflare stream with python

Hey, I am using python tus client to upload the files but I would like to retrieve the video id so I can check the progress within my script. I understand how to do this in a bash script but I want to include it in my python app

from tusclient import client

zone_id = "xxxxx"
api_key = "xxxxx"
chunk_sz = 5242880
email = "xxxxx"
file_name = "sample.mp4"
api_url = f"{zone_id}/media"

my_client = client.TusClient(api_url,headers={'X-Auth-Key': api_key,'X-Auth-Email':email})

uploader = my_client.uploader(file_name, chunk_size=chunk_sz)


Although this thread is a bit old - I just came across the same issue. For reference, I think the URL of your video is the same as the tus upload ID. Using the python tus library, this is:


You can use this as the endpoint to query for encoding progress etc.