# Path: mod/settings.py
# API_KEY = os.environ.pop('MOD_API_KEY', None)
# 
# DEVICE_KEY = os.environ.pop('MOD_DEVICE_KEY', None)
# 
# DEVICE_TAG = os.environ.pop('MOD_DEVICE_TAG', None)
# 
# DEVICE_UID = os.environ.pop('MOD_DEVICE_UID', None)
# 
# IMAGE_VERSION = fh.read().strip() or None


import os
from mod.settings import API_KEY, DEVICE_KEY, DEVICE_TAG, DEVICE_UID, IMAGE_VERSION

def get_uid():
    if DEVICE_UID is None:
        raise Exception('Missing device uid')
    if os.path.isfile(DEVICE_UID):
        with open(DEVICE_UID, 'r') as fh:
            return fh.read().strip()
    return DEVICE_UID

def get_tag():

# Path: mod/settings.py
# API_KEY = os.environ.pop('MOD_API_KEY', None)
# 
# DEVICE_KEY = os.environ.pop('MOD_DEVICE_KEY', None)
# 
# DEVICE_TAG = os.environ.pop('MOD_DEVICE_TAG', None)
# 
# DEVICE_UID = os.environ.pop('MOD_DEVICE_UID', None)
# 
# IMAGE_VERSION = fh.read().strip() or None


# Path: mod/communication/device.py
import os
from mod.settings import API_KEY, DEVICE_KEY, DEVICE_TAG, DEVICE_UID, IMAGE_VERSION


def get_uid():
    if DEVICE_UID is None:
        raise Exception('Missing device uid')
    if os.path.isfile(DEVICE_UID):
        with open(DEVICE_UID, 'r') as fh:
            return fh.read().strip()
    return DEVICE_UID

def get_tag():

    if DEVICE_TAG is None: