**Background:** I have seen lots of examples of integrating a progress bar into a for loop, however nothing for my use case, and as such am looking for some advice.

For my use case, I am calling an API and testing if `meta` is in the response (`meta` = data I need). If `meta` is not in the API response, then the API returns a key pair value named `percent_complete`, which indicates the data I am trying to return is still aggregating, and provides a value on the progress of data aggregation.

**Current code:**

```
def api_call():

    key, secret, url = ini_reader()
    endpoint_url = endpoint_initializer()

    while True:
        response = requests.get(url = endpoint_url, auth = HTTPBasicAuth(key, secret), headers = {"vendor-firm": "111"})
        api_response = json.loads(response.text)

        if "meta" not in api_response:
            id_value = "id"
            res1 = [val[id_value] for key, val in api_response.items() if id_value in val]
            id_value = "".join(res1)
            percent_value = "percent_complete"
            res2 = api_response["data"]["attributes"].get("percent_complete", '')*100
            print(f' Your data request for: {id_value} is {res2}% complete!')
            time.sleep(60)

       elif "meta" in api_response:

     return api_response

```

**What I am trying to achieve:** `{res2}` \*100 gives the percentage, which I would like to use the measure of progress in a progress bar.

Can anyone suggest an appropriate dependency to use?