Skip to content

Instantly share code, notes, and snippets.

@jmettes jmettes/dynamodb
Created Nov 26, 2016

Embed
What would you like to do?
import boto3
import json
from decimal import Decimal
# TIME(GPST) SAT R P1(m) P2(m) L1(cyc) L2(cyc) D1(Hz) D2(Hz) S1 S2 LLI
# 08:29:20.0 G02 1 24371639.98 24371633.08 128073906.34 99797864.41 0.0 0.0 45 32 0 0
dynamodb = boto3.resource('dynamodb', region_name='ap-southeast-2')
table = dynamodb.Table('obs')
epoch = "08:29:20.0"
sat = "G02"
r = 1
p1 = Decimal(24371639.98)
p2 = Decimal(24371633.08)
l1 = Decimal(128073906.34)
l2 = Decimal(99797864.41)
d1 = Decimal(0.0)
d2 = Decimal(0.0)
s1 = 45
s2 = 32
lli = "0 0"
table.put_item(
Item={
'epoch': epoch,
'sat': sat,
'r': r,
'p1': p1,
'p2': p2,
'l1': l1,
'l2': l2,
'd1': d1,
'd2': d2,
's1': s1,
's2': s2,
'lli': lli,
'cool': 1234
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.