skip to Main Content

getting data from JSON in Python

I am trying to isolate several variables from a JSON file I have taken from https://api.weatherapi.com/v1/forecast.json?q='s-Hertogenbosch&days=3&alerts=yes&aqi=yes&key=X Key removed for safety reasons. Therefore I use the following code: import json response = urlopen(url) weer_data = json.loads(response.read()) location = weer_data['location']['name'] temp_current =…

VIEW QUESTION

Amazon web services – How to select the last created object in S3

I have this path in S3: object1/object2/object3/object4/ In Object4/ I have a list of objects, example: directory1/directory2/directory3/directory4/2022-30-09-15h21/ directory1/directory2/directory3/directory4/2023-20-12-12h30/ directory1/directory2/directory3/directory4/2022-31-12-09h34/ directory1/directory2/directory3/directory4/2023-12-08-14h56/ I would like to select the last created directory in directory4/ then I should download all files inside it. I…

VIEW QUESTION
Back To Top
Search