# Defying keylist from 1st url
def keylist():
urls = []
for x in data["values"]:
formattedUrl = furl.format((x["key"]))
print(formattedUrl)
urls.append(formattedUrl)
return urls
urls = keylist()
# Defying put request
def putUrls():
for x in urls:
credentials = base64.b64encode(f"{username}:{password}".encode()).decode("ascii")
headers = {'Authorization': "Basic "+credentials}
req = urllib.request.Request(url='{}'.format(x), method='PUT', headers=headers)
urllib.request.urlopen(req)
putUrls()