move keys to config file

This commit is contained in:
sessionm21 2020-05-12 22:11:33 +01:00
parent d86cd5b72e
commit 4a8b2474b8
2 changed files with 8 additions and 2 deletions

3
config.ini Normal file
View File

@ -0,0 +1,3 @@
[Default]
AppId=app_id
AccessKey=ttn-account-v2.redacted

View File

@ -4,9 +4,12 @@ import base64
import message_pb2 import message_pb2
import sqlite3 import sqlite3
app_id = "fenceles_grazing" import configparser
access_key = "ttn-account-v2.XVvtBVcWzkeby-fe9eLtiJBLRbjQR-b358S4z70Xa-0" config = configparser.ConfigParser()
config.read("config.ini")
app_id = config['Default']['AppId']
access_key = config['Default']['AccessKey']
# For now use collar id of 1, should look up collar id based on collarname from db # For now use collar id of 1, should look up collar id based on collarname from db
def store_coord(collarname, x, y): def store_coord(collarname, x, y):