sondehub-infra/lambda/query_ham/__main__.py

25 lines
694 B
Python
Raw Normal View History

2022-02-26 23:55:34 +00:00
from . import *
import base64
import zlib
response = get_telem_full(
2022-02-26 23:55:34 +00:00
{
2022-05-11 03:34:57 +00:00
"pathParameters": {
"payload_callsign": "PD3EGE"
2022-05-11 03:34:57 +00:00
},
2022-02-26 23:55:34 +00:00
"queryStringParameters":{
# "payload_callsign" : "NOB14,VE6AGD-11",
"last": "22269",
"datetime": "1688655220.471",
# "format": "kml"
#"duration": "732d"
2022-02-26 23:55:34 +00:00
}
}, {})
2022-05-11 03:34:57 +00:00
print(len(response['body']))
2022-02-26 23:55:34 +00:00
compressed = base64.b64decode(response['body'])
decompressed = (zlib.decompress(compressed, 16 + zlib.MAX_WBITS))
2022-05-11 03:34:57 +00:00
#print(json.loads(decompressed))
2022-07-02 07:06:13 +00:00
#print(decompressed.decode().splitlines()[:5])
print(decompressed.decode())