Returning Progress / Status of Current Upload


I’m using the python-frameio-client to script the upload of an mp4, create a review link and send email etc etc.

I’m using asset = client.assets.upload(parent_asset_id,file_path)

I’m struggling with how to get feedback from the current upload, so I might present a progress bar or status updates. Currently the upload progresses but it appears as though the script has hung as there’s no status output to the terminal.

Does python-frameio-client have this functionality?

I understand this is probably more a Python question than API but hope you might point me in the direction of similar functionality and I can pick it apart.

Regards, Kenny.

1 Like

This is an excellent question!

I actually had a branch of frameioclient in which I had added console output with progress updates, but ultimately I decided that really only makes sense within a CLI environment.

The right solution for this is to have an update callback argument within client.assets.upload(parent_asset_id, file_path, update_callback=print) to which you pass the function you want to run whenever a progress update is emitted.

For example you could pass print and every time a progress even is emitted, the progress as a percentage would get passed as an argument to the provided print function which would then print it to stdout.

This is something you could add, or I could look into adding as well, but I’m a bit slammed right now I don’t think I’d get to for a week or two.