1234567 |
- def upload_hour_data_to_s3(_datetime, url):
- print("Requesting", url)
- response = requests.get(url)
- if response.status_code != 200:
- print(response)
- json_string = GzipFile(fileobj=BytesIO(response.content)).read()
- S3_BUCKET.put_object(Key=json_file_name_for_datetime(_datetime), Body=json_string)
|