Backblaze / b2-sdk-python

Python library to access B2 cloud storage.
Other
186 stars 61 forks source link

Interface for description changing in active listeners #455

Closed kkalinowski-reef closed 11 months ago

kkalinowski-reef commented 11 months ago

In order to provide a "generated" filename to the progress bar during DownloadFile.save_to, we need to be able to change the description right after we receive headers but before we call the save_to method.

Because of that, description becomes part of the AbstractProgressListener, albeit optional. Two methods are exposed, one allowing to perform a change on the description and another checking whether the change can be performed. In case of both tqdm and SimpleProgressListener it is impossible to perform the change at any time.