No sign requests

pull/2/head
Michaela 2021-02-16 09:30:44 +10:00
rodzic 2fe17a579b
commit 6141ca12b7
4 zmienionych plików z 45 dodań i 51 usunięć

Wyświetl plik

@ -1,16 +1,4 @@
import sondehub
from multiprocessing import Queue
# def on_message(message):
# print(f"{message['serial']} - {message['alt']}")
# test = sondehub.Stream(on_message=on_message)
# while 1:
# pass
print(sondehub.download(serial="S1120364"))
#print(sondehub.download(datetime_prefix="2021-02-04T02:19"))
# tasks_to_accomplish = Queue()
# blah = Queue()
# tasks_to_accomplish.put(("sondehub-open-data","serial/S1120364/2020-10-18T01:10:12.152254Z-5fb87ccb-7a0e-4975-b39f-593e19bc2bcd.json"))
# print(sondehub.parallel_download(tasks_to_accomplish,blah))

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -1,6 +1,6 @@
[tool.poetry]
name = "sondehub"
version = "0.1.7"
version = "0.1.8"
description = "SDK to access SondeHub open data"
authors = ["Michaela <git@michaela.lgbt>"]
readme = "README.md"

Wyświetl plik

@ -3,6 +3,8 @@ from urllib.parse import urlparse
import http.client
import json
import boto3
from botocore import UNSIGNED
from botocore.config import Config
import sys
import threading
from queue import Queue
@ -93,7 +95,7 @@ class Downloader(threading.Thread):
super().__init__(*args, **kwargs)
def run(self):
s3 = boto3.client("s3")
s3 = boto3.client("s3", config=Config(signature_version=UNSIGNED))
while True:
try:
task = self.tasks_to_accomplish.get_nowait()
@ -117,7 +119,7 @@ def download(serial=None, datetime_prefix=None, debug=False):
else:
prefix_filter = "date/"
s3 = boto3.resource("s3")
s3 = boto3.resource("s3", config=Config(signature_version=UNSIGNED))
bucket = s3.Bucket(S3_BUCKET)
data = []