def __init__(self): handleEnvironment.initialize() self.log = logging.getLogger(__name__) self.log.setLevel(LOG_LEVEL) self.URL_YOLP_WEATHER = 'https://map.yahooapis.jp/weather/V1/place' self.YAHOO_API_KEY = os.environ['YAHOO_API_KEY'] self.LATITUDE = os.environ['GEO_LATITUDE'] self.LONGITUDE = os.environ['GEO_LONGITUDE']
def __init__(self): self.NATURE_AUTH = os.environ["NATURE_AUTH"] self.NATURE_ID = os.environ["NATURE_ID"] self.NATURE_URL = "https://api.nature.global/" # Log Set. handleEnvironment.initialize() self.log = logging.getLogger(__name__) self.log.setLevel(LOG_LEVEL)
def __init__(self): handleEnvironment.initialize() self.log = logging.getLogger(__name__) self.log.setLevel(LOG_LEVEL) self.API_KEY = os.environ['ACCU_WEATHER_API_KEY'] self.BASE_URL = 'https://dataservice.accuweather.com' self.GEO_LAT = os.environ['GEO_LATITUDE'] self.GEO_LON = os.environ['GEO_LONGITUDE']
def testfunc(): handleEnvironment.initialize() log = logging.getLogger('Test Func2') log.setLevel(LOG_LEVEL) log.info('test func2') print('test func') db = mariaDbAgent() db.selectCount([db.COL_TYPE], [db.TYPE_RECORD]) return
def __init__(self, database='homeDB'): # Logset handleEnvironment.initialize() self.log = logging.getLogger(__name__) self.log.setLevel(LOG_LEVEL) # DBset self.DB_HOST = 'localhost' self.DB_USER = '******' self.DB_DATABASE = database return
def __init__(self): handleEnvironment.initialize() self.log = logging.getLogger(__name__) self.log.setLevel(LOG_LEVEL) self.API_KEY = os.environ['OPEN_WEATHER_API_KEY'] self.GEO_LAT = os.environ['GEO_LATITUDE'] self.GEO_LON = os.environ['GEO_LONGITUDE'] self.BASE_URL_ONE_CALL = 'https://api.openweathermap.org/data/2.5/onecall?' self.BASE_URL_CURRENT_WEATHER = 'https://api.openweathermap.org/data/2.5/weather?'
def __init__(self): # Logset handleEnvironment.initialize() self.log = logging.getLogger(__name__) self.log.setLevel(LOG_LEVEL) self.log.debug('environmentLogger start.') # default data. try: self.place = { 'latitude': os.environ['GEO_LATITUDE'], 'longitude': os.environ['GEO_LONGITUDE']} except Exception as e: self.log.error('set place error.') self.log.debug(e) return
db.TYPE_ALARM_DONE, json.dumps(alarm_data, ensure_ascii=False) ] w_columns = [db.COL_ID] w_values = [str(alarm_id)] db.updateData(set_colmns, set_values, w_columns, w_values) log.info('-- google_Home_Notify end.') return if __name__ == "__main__": # set Log handleEnvironment.initialize() log = logging.getLogger('homeScheduler') log.setLevel(LOG_LEVEL) log.info('scheduler start.') task = taskManager() el = environmentLogger() # 実行前処理 task.checkTask() task.setRainCondition() # 毎時タスク if task.IS_EVERY_HOUR: log.info('every hour task start.')
def __init__(self): handleEnvironment.initialize() self.log = logging.getLogger(__name__) self.log.setLevel(LOG_LEVEL)