Exemplo n.º 1
0
class Four_Day_Forecast(db.Model):
    __tablename__ = "Four_Day_Forcast"
    __table_args__ = {"schema": "openweatherapi"}

    __id__ = db.Column(db.Integer, primary_key=True)

    cod = db.Column(db.Text)
    message = db.Column(db.Float)
Exemplo n.º 2
0
class Snow(db.Model):
    __tablename__ = "Snow"
    __table_args__ = {"schema": "openweatherapi"}

    __id__ = db.Column(db.Integer, primary_key=True)

    lists = db.relationship('List', back_populates='snow')

    ## Snow volume for last hour mm -- formerly 1h
    oneh = db.Column(db.Integer)  ## NOTE :: type of data unknown currently
Exemplo n.º 3
0
class Clouds(db.Model):
    __tablename__ = "Clouds"
    __table_args__ = {"schema": "openweatherapi"}

    __id__ = db.Column(db.Integer, primary_key=True)

    lists = db.relationship('List', back_populates='clouds')

    # Cloudiness, %
    all = db.Column(db.Integer)
Exemplo n.º 4
0
class Wind(db.Model):
    __tablename__ = "Wind"
    __table_args__ = {"schema": "openweatherapi"}

    __id__ = db.Column(db.Integer, primary_key=True)

    lists = db.relationship('List', back_populates='wind')

    ## Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour.
    speed = db.Column(db.Float)
    ## Wind direction, degrees (meteorological)
    deg = db.Column(db.Integer)
Exemplo n.º 5
0
class Main(db.Model):
    __tablename__ = "Main"
    __table_args__ = {"schema": "openweatherapi"}

    __id__ = db.Column(db.Integer, primary_key=True)

    lists = db.relationship('List', back_populates='main')

    ## Temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    temp = db.Column(db.Integer)

    ## This temperature parameter accounts for the human
    ## perception of weather. Unit Default: Kelvin, Metric: Celsius,
    ## Imperial: Fahrenheit.
    feels_like = db.Column(db.Float)

    ## Minimum temperature at the moment of calculation. This is minimal
    ## forecasted temperature (within large megalopolises and urban areas),
    ## use this parameter optionally. Unit Default: Kelvin, Metric: Celsius,
    ## Imperial: Fahrenheit.
    temp_min = db.Column(db.Float)

    ## Maximum temperature at the moment of calculation. This is maximal
    ## forecasted temperature (within large megalopolises and urban areas),
    ## use these parameter optionally. Unit Default: Kelvin, Metric: Celsius,
    ## Imperial: Fahrenheit.
    temp_max = db.Column(db.Float)

    ## Atmospheric pressure on the sea level by default, hPa
    pressure = db.Column(db.Integer)

    ## Atmospheric pressure on the sea level, hPa
    sea_level = db.Column(db.Integer)

    ## Atmospheric pressure on the ground level, hPa
    grnd_level = db.Column(db.Integer)

    ## Humidity, %
    humidity = db.Column(db.Integer)

    ## Internal parameter
    temp_kf = db.Column(db.Integer)
Exemplo n.º 6
0
class Weather(db.Model):
    __tablename__ = "Weather"
    __table_args__ = {"schema": "openweatherapi"}

    __id__ = db.Column(db.Integer, primary_key=True)

    lists = db.relationship('List', back_populates='weather')

    ## Weather condition id -- formerly id
    condition_id = db.Column(db.Integer)

    ## Group of weather parameters (Rain, Snow, Extreme etc.)
    main = db.Column(db.Text)

    ## Weather condition within the group. You can get the output
    ## in your language. Learn more.
    description = db.Column(db.Text)

    ## Weather icon id
    icon = db.Column(db.Text)
Exemplo n.º 7
0
class List(db.Model):
    __tablename__ = "List"
    __table_args__ = {"schema": "openweatherapi"}

    __id__ = db.Column(db.Integer, primary_key = True)

    dt = db.Column(db.Integer)

    ## main
    __MAIN__ = db.Column(db.Integer, db.ForeignKey('openweatherapi.Main.__id__'))
    main = db.relationship('Main', back_populates='lists')

    ## weather
    __WEATHER__ = db.Column(db.Integer, db.ForeignKey('openweatherapi.Weather.__id__'))
    weather = db.relationship('Weather', back_populates='lists')

    ## clouds
    __CLOUDS__ = db.Column(db.Integer, db.ForeignKey('openweatherapi.Clouds.__id__'))
    clouds =  db.relationship('Clouds', back_populates='lists')

    ## wind
    __WIND__ = db.Column(db.Integer, db.ForeignKey('openweatherapi.Wind.__id__'))
    wind = db.relationship('Wind', back_populates='lists')

    ## rain
    __RAIN__ = db.Column(db.Integer, db.ForeignKey('openweatherapi.Rain.__id__'))
    rain = db.relationship('Rain', back_populates='lists')

    ## snow
    __SNOW__ = db.Column(db.Integer, db.ForeignKey('openweatherapi.Snow.__id__'))
    snow = db.relationship('Snow', back_populates='lists')

    visibility = db.Column(db.Integer)
    pop = db.Column(db.Float)

    ## sys

    dt_text = db.Column(db.Text)