not used anymore since we get the openweathermap data from the database
from flask_sqlalchemy import SQLAlchemy, inspect
from flask_sqlalchemy import SQLAlchemy, inspect
-app_path = os.path.dirname(os.path.realpath(__file__))
-lib_path = os.path.join(app_path, '..')
-sys.path.append(lib_path)
-from seeparklib.openweathermap import openweathermap_json, OpenWeatherMapError
-
-
# https://stackoverflow.com/a/37350445
def sqlalchemy_model_to_dict(model):
return {c.key: getattr(model, c.key)
# https://stackoverflow.com/a/37350445
def sqlalchemy_model_to_dict(model):
return {c.key: getattr(model, c.key)