Skip to content

API Documentation - Models

API models.

ATCReport pydantic-model

Bases: BaseModel

Data for ATC dashboard.

Show JSON schema:
{
  "$defs": {
    "ATCReportForecast": {
      "description": "Forecast for ATC dashboard.",
      "properties": {
        "hourly": {
          "items": {
            "$ref": "#/$defs/HourlyWindForecast"
          },
          "title": "Hourly",
          "type": "array"
        }
      },
      "required": [
        "hourly"
      ],
      "title": "ATCReportForecast",
      "type": "object"
    },
    "HourlyWindForecast": {
      "description": "Hourly wind report, at different altitude (feet).",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "qnh": {
          "title": "Qnh",
          "type": "integer"
        },
        "wind": {
          "$ref": "#/$defs/Wind"
        },
        "wind1500": {
          "$ref": "#/$defs/Wind"
        },
        "wind2500": {
          "$ref": "#/$defs/Wind"
        },
        "wind5000": {
          "$ref": "#/$defs/Wind"
        },
        "wind10000": {
          "$ref": "#/$defs/Wind"
        }
      },
      "required": [
        "date",
        "qnh",
        "wind",
        "wind1500",
        "wind2500",
        "wind5000",
        "wind10000"
      ],
      "title": "HourlyWindForecast",
      "type": "object"
    },
    "Wind": {
      "description": "Wind model.",
      "properties": {
        "direction": {
          "title": "Direction",
          "type": "string"
        },
        "speed": {
          "title": "Speed",
          "type": "string"
        },
        "gusts": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gusts"
        }
      },
      "required": [
        "direction",
        "speed"
      ],
      "title": "Wind",
      "type": "object"
    }
  },
  "description": "Data for ATC dashboard.",
  "properties": {
    "forecast": {
      "$ref": "#/$defs/ATCReportForecast"
    }
  },
  "required": [
    "forecast"
  ],
  "title": "ATCReport",
  "type": "object"
}

Fields:

Source code in meteolux/models.py
class ATCReport(BaseModel):
  """Data for ATC dashboard."""

  forecast: ATCReportForecast

ATCReportForecast pydantic-model

Bases: BaseModel

Forecast for ATC dashboard.

Show JSON schema:
{
  "$defs": {
    "HourlyWindForecast": {
      "description": "Hourly wind report, at different altitude (feet).",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "qnh": {
          "title": "Qnh",
          "type": "integer"
        },
        "wind": {
          "$ref": "#/$defs/Wind"
        },
        "wind1500": {
          "$ref": "#/$defs/Wind"
        },
        "wind2500": {
          "$ref": "#/$defs/Wind"
        },
        "wind5000": {
          "$ref": "#/$defs/Wind"
        },
        "wind10000": {
          "$ref": "#/$defs/Wind"
        }
      },
      "required": [
        "date",
        "qnh",
        "wind",
        "wind1500",
        "wind2500",
        "wind5000",
        "wind10000"
      ],
      "title": "HourlyWindForecast",
      "type": "object"
    },
    "Wind": {
      "description": "Wind model.",
      "properties": {
        "direction": {
          "title": "Direction",
          "type": "string"
        },
        "speed": {
          "title": "Speed",
          "type": "string"
        },
        "gusts": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gusts"
        }
      },
      "required": [
        "direction",
        "speed"
      ],
      "title": "Wind",
      "type": "object"
    }
  },
  "description": "Forecast for ATC dashboard.",
  "properties": {
    "hourly": {
      "items": {
        "$ref": "#/$defs/HourlyWindForecast"
      },
      "title": "Hourly",
      "type": "array"
    }
  },
  "required": [
    "hourly"
  ],
  "title": "ATCReportForecast",
  "type": "object"
}

Fields:

Source code in meteolux/models.py
class ATCReportForecast(BaseModel):
  """Forecast for ATC dashboard."""

  hourly: list['HourlyWindForecast']

BookmarkCity pydantic-model

Bases: BaseModel

With additional info for mobile app ep.

Show JSON schema:
{
  "$defs": {
    "Icon": {
      "description": "Base icon.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "Icon",
      "type": "object"
    }
  },
  "description": "With additional info for mobile app ep.",
  "properties": {
    "id": {
      "title": "Id",
      "type": "integer"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "region": {
      "default": "S",
      "enum": [
        "N",
        "S"
      ],
      "title": "Region",
      "type": "string"
    },
    "canton": {
      "enum": [
        "Capellen",
        "Clervaux",
        "Diekirch",
        "Echternach",
        "Esch-sur-Alzette",
        "Grevenmacher",
        "Luxembourg",
        "Mersch",
        "Redange",
        "Remich",
        "Vianden",
        "Wiltz"
      ],
      "title": "Canton",
      "type": "string"
    },
    "domain": {
      "enum": [
        "villes",
        "lieu",
        "fluvial"
      ],
      "title": "Domain",
      "type": "string"
    },
    "lat": {
      "title": "Lat",
      "type": "number"
    },
    "long": {
      "title": "Long",
      "type": "number"
    },
    "temperature": {
      "title": "Temperature",
      "type": "number"
    },
    "icon": {
      "$ref": "#/$defs/Icon"
    }
  },
  "required": [
    "id",
    "name",
    "canton",
    "domain",
    "lat",
    "long",
    "temperature",
    "icon"
  ],
  "title": "BookmarkCity",
  "type": "object"
}

Fields:

  • id (int)
  • name (str)
  • region (Literal['N', 'S'])
  • canton (Literal['Capellen', 'Clervaux', 'Diekirch', 'Echternach', 'Esch-sur-Alzette', 'Grevenmacher', 'Luxembourg', 'Mersch', 'Redange', 'Remich', 'Vianden', 'Wiltz'])
  • domain (Literal['villes', 'lieu', 'fluvial'])
  • lat (float)
  • long (float)
  • temperature (float)
  • icon (Icon)
Source code in meteolux/models.py
class BookmarkCity(BaseModel):
  """With additional info for mobile app ep."""

  id: int
  name: str
  region: Literal['N', 'S'] = 'S'
  canton: Literal[
    'Capellen', 'Clervaux', 'Diekirch', 'Echternach', 'Esch-sur-Alzette', 'Grevenmacher', 'Luxembourg', 'Mersch', 'Redange', 'Remich', 'Vianden', 'Wiltz'
  ]
  domain: Literal['villes', 'lieu', 'fluvial']
  lat: float
  long: float
  temperature: float
  icon: Icon

Bookmarks pydantic-model

Bases: BaseModel

Bookmarks model.

Show JSON schema:
{
  "$defs": {
    "BookmarkCity": {
      "description": "With additional info for mobile app ep.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "region": {
          "default": "S",
          "enum": [
            "N",
            "S"
          ],
          "title": "Region",
          "type": "string"
        },
        "canton": {
          "enum": [
            "Capellen",
            "Clervaux",
            "Diekirch",
            "Echternach",
            "Esch-sur-Alzette",
            "Grevenmacher",
            "Luxembourg",
            "Mersch",
            "Redange",
            "Remich",
            "Vianden",
            "Wiltz"
          ],
          "title": "Canton",
          "type": "string"
        },
        "domain": {
          "enum": [
            "villes",
            "lieu",
            "fluvial"
          ],
          "title": "Domain",
          "type": "string"
        },
        "lat": {
          "title": "Lat",
          "type": "number"
        },
        "long": {
          "title": "Long",
          "type": "number"
        },
        "temperature": {
          "title": "Temperature",
          "type": "number"
        },
        "icon": {
          "$ref": "#/$defs/Icon"
        }
      },
      "required": [
        "id",
        "name",
        "canton",
        "domain",
        "lat",
        "long",
        "temperature",
        "icon"
      ],
      "title": "BookmarkCity",
      "type": "object"
    },
    "Icon": {
      "description": "Base icon.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "Icon",
      "type": "object"
    }
  },
  "description": "Bookmarks model.",
  "properties": {
    "cities": {
      "items": {
        "$ref": "#/$defs/BookmarkCity"
      },
      "title": "Cities",
      "type": "array"
    },
    "nearestCity": {
      "anyOf": [
        {
          "$ref": "#/$defs/BookmarkCity"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "cities"
  ],
  "title": "Bookmarks",
  "type": "object"
}

Fields:

Source code in meteolux/models.py
class Bookmarks(BaseModel):
  """Bookmarks model."""

  cities: list[BookmarkCity]
  nearest_city: BookmarkCity | None = Field(None, alias='nearestCity')

Climatology pydantic-model

Bases: BaseModel

History part of data.

Show JSON schema:
{
  "description": "History part of data.",
  "properties": {
    "date": {
      "format": "date-time",
      "title": "Date",
      "type": "string"
    },
    "minTemp": {
      "title": "Mintemp",
      "type": "number"
    },
    "maxTemp": {
      "title": "Maxtemp",
      "type": "number"
    },
    "precipitation": {
      "title": "Precipitation",
      "type": "number"
    },
    "meanTemp": {
      "title": "Meantemp",
      "type": "number"
    },
    "sunshine": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Sunshine"
    }
  },
  "required": [
    "date",
    "minTemp",
    "maxTemp",
    "precipitation",
    "meanTemp"
  ],
  "title": "Climatology",
  "type": "object"
}

Fields:

  • date (datetime)
  • min_temp (float)
  • max_temp (float)
  • precipitation (float)
  • mean_temp (float)
  • sunshine (float | None)
Source code in meteolux/models.py
class Climatology(BaseModel):
  """History part of data."""

  date: datetime
  min_temp: float = Field(..., alias='minTemp')
  max_temp: float = Field(..., alias='maxTemp')
  precipitation: float
  mean_temp: float = Field(..., alias='meanTemp')
  sunshine: float | None = None

CurrentWeather pydantic-model

Bases: BaseModel

Part of the global weather model.

Show JSON schema:
{
  "$defs": {
    "Icon": {
      "description": "Base icon.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "Icon",
      "type": "object"
    },
    "Temperature": {
      "description": "Temperature model.",
      "properties": {
        "temperature": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          ],
          "title": "Temperature"
        },
        "humidex": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Humidex"
        },
        "felt": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Felt"
        }
      },
      "required": [
        "temperature"
      ],
      "title": "Temperature",
      "type": "object"
    },
    "Wind": {
      "description": "Wind model.",
      "properties": {
        "direction": {
          "title": "Direction",
          "type": "string"
        },
        "speed": {
          "title": "Speed",
          "type": "string"
        },
        "gusts": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gusts"
        }
      },
      "required": [
        "direction",
        "speed"
      ],
      "title": "Wind",
      "type": "object"
    }
  },
  "description": "Part of the global weather model.",
  "properties": {
    "date": {
      "format": "date-time",
      "title": "Date",
      "type": "string"
    },
    "icon": {
      "$ref": "#/$defs/Icon"
    },
    "wind": {
      "$ref": "#/$defs/Wind"
    },
    "rain": {
      "title": "Rain",
      "type": "string"
    },
    "snow": {
      "title": "Snow",
      "type": "string"
    },
    "type": {
      "const": "current",
      "default": "current",
      "title": "Type",
      "type": "string"
    },
    "temperature": {
      "$ref": "#/$defs/Temperature"
    }
  },
  "required": [
    "date",
    "icon",
    "wind",
    "rain",
    "snow",
    "temperature"
  ],
  "title": "CurrentWeather",
  "type": "object"
}

Fields:

  • date (datetime)
  • icon (Icon)
  • wind (Wind)
  • rain (str)
  • snow (str)
  • type (Literal['current'])
  • temperature (Temperature)
Source code in meteolux/models.py
class CurrentWeather(BaseModel):
  """Part of the global weather model."""

  date: datetime
  icon: Icon
  wind: Wind
  rain: str
  snow: str
  type: Literal['current'] = 'current'
  temperature: Temperature

DailyWeather pydantic-model

Bases: BaseModel

For the list of following days.

Show JSON schema:
{
  "$defs": {
    "Icon": {
      "description": "Base icon.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "Icon",
      "type": "object"
    },
    "Temperature": {
      "description": "Temperature model.",
      "properties": {
        "temperature": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          ],
          "title": "Temperature"
        },
        "humidex": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Humidex"
        },
        "felt": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Felt"
        }
      },
      "required": [
        "temperature"
      ],
      "title": "Temperature",
      "type": "object"
    },
    "Wind": {
      "description": "Wind model.",
      "properties": {
        "direction": {
          "title": "Direction",
          "type": "string"
        },
        "speed": {
          "title": "Speed",
          "type": "string"
        },
        "gusts": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gusts"
        }
      },
      "required": [
        "direction",
        "speed"
      ],
      "title": "Wind",
      "type": "object"
    }
  },
  "description": "For the list of following days.",
  "properties": {
    "date": {
      "format": "date-time",
      "title": "Date",
      "type": "string"
    },
    "icon": {
      "$ref": "#/$defs/Icon"
    },
    "wind": {
      "$ref": "#/$defs/Wind"
    },
    "rain": {
      "title": "Rain",
      "type": "string"
    },
    "snow": {
      "title": "Snow",
      "type": "string"
    },
    "type": {
      "const": "daily",
      "default": "daily",
      "title": "Type",
      "type": "string"
    },
    "temperatureMin": {
      "$ref": "#/$defs/Temperature"
    },
    "temperatureMax": {
      "$ref": "#/$defs/Temperature"
    },
    "sunshine": {
      "title": "Sunshine",
      "type": "integer"
    },
    "uvIndex": {
      "title": "Uvindex",
      "type": "integer"
    }
  },
  "required": [
    "date",
    "icon",
    "wind",
    "rain",
    "snow",
    "temperatureMin",
    "temperatureMax",
    "sunshine",
    "uvIndex"
  ],
  "title": "DailyWeather",
  "type": "object"
}

Fields:

  • date (datetime)
  • icon (Icon)
  • wind (Wind)
  • rain (str)
  • snow (str)
  • type (Literal['daily'])
  • temperature_min (Temperature)
  • temperature_max (Temperature)
  • sunshine (int)
  • uv_index (int)
Source code in meteolux/models.py
class DailyWeather(BaseModel):
  """For the list of following days."""

  date: datetime
  icon: Icon
  wind: Wind
  rain: str
  snow: str
  type: Literal['daily'] = 'daily'
  temperature_min: Temperature = Field(..., alias='temperatureMin')
  temperature_max: Temperature = Field(..., alias='temperatureMax')
  sunshine: int
  uv_index: int = Field(..., alias='uvIndex')

Ephemeris pydantic-model

Bases: BaseModel

Ephemeris model.

Show JSON schema:
{
  "$defs": {
    "MoonIcon": {
      "description": "As different id are used.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "MoonIcon",
      "type": "object"
    }
  },
  "description": "Ephemeris model.",
  "properties": {
    "date": {
      "format": "date",
      "title": "Date",
      "type": "string"
    },
    "sunrise": {
      "title": "Sunrise",
      "type": "string"
    },
    "sunset": {
      "title": "Sunset",
      "type": "string"
    },
    "moonrise": {
      "title": "Moonrise",
      "type": "string"
    },
    "moonset": {
      "title": "Moonset",
      "type": "string"
    },
    "sunshine": {
      "maximum": 16.0,
      "minimum": 0.0,
      "title": "Sunshine",
      "type": "integer"
    },
    "moonIcon": {
      "$ref": "#/$defs/MoonIcon"
    },
    "uvIndex": {
      "maximum": 12.0,
      "minimum": 0.0,
      "title": "Uvindex",
      "type": "integer"
    }
  },
  "required": [
    "date",
    "sunrise",
    "sunset",
    "moonrise",
    "moonset",
    "sunshine",
    "moonIcon",
    "uvIndex"
  ],
  "title": "Ephemeris",
  "type": "object"
}

Fields:

  • date (date)
  • sunrise (str)
  • sunset (str)
  • moonrise (str)
  • moonset (str)
  • sunshine (int)
  • moon_icon (MoonIcon)
  • uv_index (int)
Source code in meteolux/models.py
class Ephemeris(BaseModel):
  """Ephemeris model."""

  date: date
  sunrise: str
  sunset: str
  moonrise: str
  moonset: str
  sunshine: int = Field(..., ge=0.0, le=16.0)
  moon_icon: MoonIcon = Field(..., alias='moonIcon')
  uv_index: int = Field(..., alias='uvIndex', ge=0.0, le=12.0)

GraphicalData pydantic-model

Bases: BaseModel

Graphical group of data.

Show JSON schema:
{
  "$defs": {
    "Climatology": {
      "description": "History part of data.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "minTemp": {
          "title": "Mintemp",
          "type": "number"
        },
        "maxTemp": {
          "title": "Maxtemp",
          "type": "number"
        },
        "precipitation": {
          "title": "Precipitation",
          "type": "number"
        },
        "meanTemp": {
          "title": "Meantemp",
          "type": "number"
        },
        "sunshine": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Sunshine"
        }
      },
      "required": [
        "date",
        "minTemp",
        "maxTemp",
        "precipitation",
        "meanTemp"
      ],
      "title": "Climatology",
      "type": "object"
    },
    "Trend": {
      "description": "Forecast part of data.",
      "properties": {
        "date": {
          "format": "date",
          "title": "Date",
          "type": "string"
        },
        "minTemp": {
          "title": "Mintemp",
          "type": "number"
        },
        "maxTemp": {
          "title": "Maxtemp",
          "type": "number"
        },
        "precipitation": {
          "title": "Precipitation",
          "type": "number"
        }
      },
      "required": [
        "date",
        "minTemp",
        "maxTemp",
        "precipitation"
      ],
      "title": "Trend",
      "type": "object"
    }
  },
  "description": "Graphical group of data.",
  "properties": {
    "history": {
      "items": {
        "$ref": "#/$defs/Climatology"
      },
      "title": "History",
      "type": "array"
    },
    "forecast": {
      "items": {
        "$ref": "#/$defs/Trend"
      },
      "title": "Forecast",
      "type": "array"
    }
  },
  "required": [
    "history",
    "forecast"
  ],
  "title": "GraphicalData",
  "type": "object"
}

Fields:

Source code in meteolux/models.py
class GraphicalData(BaseModel):
  """Graphical group of data."""

  history: list[Climatology]
  forecast: list[Trend]

HourlyWeather pydantic-model

Bases: BaseModel

For the list of following hours.

Show JSON schema:
{
  "$defs": {
    "Icon": {
      "description": "Base icon.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "Icon",
      "type": "object"
    },
    "Temperature": {
      "description": "Temperature model.",
      "properties": {
        "temperature": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          ],
          "title": "Temperature"
        },
        "humidex": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Humidex"
        },
        "felt": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Felt"
        }
      },
      "required": [
        "temperature"
      ],
      "title": "Temperature",
      "type": "object"
    },
    "Wind": {
      "description": "Wind model.",
      "properties": {
        "direction": {
          "title": "Direction",
          "type": "string"
        },
        "speed": {
          "title": "Speed",
          "type": "string"
        },
        "gusts": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gusts"
        }
      },
      "required": [
        "direction",
        "speed"
      ],
      "title": "Wind",
      "type": "object"
    }
  },
  "description": "For the list of following hours.",
  "properties": {
    "date": {
      "format": "date-time",
      "title": "Date",
      "type": "string"
    },
    "icon": {
      "$ref": "#/$defs/Icon"
    },
    "wind": {
      "$ref": "#/$defs/Wind"
    },
    "rain": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ],
      "title": "Rain"
    },
    "snow": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ],
      "title": "Snow"
    },
    "type": {
      "const": "hourly",
      "default": "hourly",
      "title": "Type",
      "type": "string"
    },
    "temperature": {
      "$ref": "#/$defs/Temperature"
    }
  },
  "required": [
    "date",
    "icon",
    "wind",
    "rain",
    "snow",
    "temperature"
  ],
  "title": "HourlyWeather",
  "type": "object"
}

Fields:

  • date (datetime)
  • icon (Icon)
  • wind (Wind)
  • rain (str | int)
  • snow (str | int)
  • type (Literal['hourly'])
  • temperature (Temperature)
Source code in meteolux/models.py
class HourlyWeather(BaseModel):
  """For the list of following hours."""

  date: datetime
  icon: Icon
  wind: Wind
  rain: str | int
  snow: str | int
  type: Literal['hourly'] = 'hourly'
  temperature: Temperature

HourlyWindForecast pydantic-model

Bases: BaseModel

Hourly wind report, at different altitude (feet).

Show JSON schema:
{
  "$defs": {
    "Wind": {
      "description": "Wind model.",
      "properties": {
        "direction": {
          "title": "Direction",
          "type": "string"
        },
        "speed": {
          "title": "Speed",
          "type": "string"
        },
        "gusts": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gusts"
        }
      },
      "required": [
        "direction",
        "speed"
      ],
      "title": "Wind",
      "type": "object"
    }
  },
  "description": "Hourly wind report, at different altitude (feet).",
  "properties": {
    "date": {
      "format": "date-time",
      "title": "Date",
      "type": "string"
    },
    "qnh": {
      "title": "Qnh",
      "type": "integer"
    },
    "wind": {
      "$ref": "#/$defs/Wind"
    },
    "wind1500": {
      "$ref": "#/$defs/Wind"
    },
    "wind2500": {
      "$ref": "#/$defs/Wind"
    },
    "wind5000": {
      "$ref": "#/$defs/Wind"
    },
    "wind10000": {
      "$ref": "#/$defs/Wind"
    }
  },
  "required": [
    "date",
    "qnh",
    "wind",
    "wind1500",
    "wind2500",
    "wind5000",
    "wind10000"
  ],
  "title": "HourlyWindForecast",
  "type": "object"
}

Fields:

  • date (datetime)
  • qnh (int)
  • wind (Wind)
  • wind1500 (Wind)
  • wind2500 (Wind)
  • wind5000 (Wind)
  • wind10000 (Wind)
Source code in meteolux/models.py
class HourlyWindForecast(BaseModel):
  """Hourly wind report, at different altitude (feet)."""

  date: datetime
  qnh: int
  wind: Wind
  wind1500: Wind
  wind2500: Wind
  wind5000: Wind
  wind10000: Wind

Icon pydantic-model

Bases: BaseModel

Base icon.

Show JSON schema:
{
  "description": "Base icon.",
  "properties": {
    "id": {
      "title": "Id",
      "type": "integer"
    },
    "name": {
      "title": "Name",
      "type": "string"
    }
  },
  "required": [
    "id",
    "name"
  ],
  "title": "Icon",
  "type": "object"
}

Fields:

  • id (int)
  • name (str)
Source code in meteolux/models.py
class Icon(BaseModel):
  """Base icon."""

  id: int
  name: str

ImageOut pydantic-model

Bases: BaseModel

Image with url.

Show JSON schema:
{
  "description": "Image with url.",
  "properties": {
    "date": {
      "format": "date-time",
      "title": "Date",
      "type": "string"
    },
    "provider": {
      "title": "Provider",
      "type": "string"
    },
    "url": {
      "maxLength": 2083,
      "minLength": 1,
      "title": "Url",
      "type": "string"
    }
  },
  "required": [
    "date",
    "provider",
    "url"
  ],
  "title": "ImageOut",
  "type": "object"
}

Fields:

  • date (datetime)
  • provider (str)
  • url (str)
Source code in meteolux/models.py
class ImageOut(BaseModel):
  """Image with url."""

  date: datetime
  provider: str
  url: str = Field(..., max_length=2083, min_length=1)

InObservation pydantic-model

Bases: BaseModel

Observation from public users.

Show JSON schema:
{
  "description": "Observation from public users.",
  "properties": {
    "lat": {
      "maximum": 90.0,
      "minimum": -90.0,
      "title": "Lat",
      "type": "number"
    },
    "long": {
      "maximum": 180.0,
      "minimum": -180.0,
      "title": "Long",
      "type": "number"
    },
    "description": {
      "maxLength": 1024,
      "title": "Description",
      "type": "string"
    },
    "weather": {
      "title": "Weather",
      "type": "integer"
    }
  },
  "required": [
    "lat",
    "long",
    "description",
    "weather"
  ],
  "title": "InObservation",
  "type": "object"
}

Fields:

  • lat (float)
  • long (float)
  • description (str)
  • weather (int)
Source code in meteolux/models.py
class InObservation(BaseModel):
  """Observation from public users."""

  lat: float = Field(..., ge=-90.0, le=90.0)
  long: float = Field(..., ge=-180.0, le=180.0)
  description: str = Field(..., max_length=1024)
  weather: int

MoonIcon pydantic-model

Bases: BaseModel

As different id are used.

Show JSON schema:
{
  "description": "As different id are used.",
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "name": {
      "title": "Name",
      "type": "string"
    }
  },
  "required": [
    "id",
    "name"
  ],
  "title": "MoonIcon",
  "type": "object"
}

Fields:

  • id (str)
  • name (str)
Source code in meteolux/models.py
class MoonIcon(BaseModel):
  """As different id are used."""

  id: str
  name: str

ObservationMetadata pydantic-model

Bases: BaseModel

Sensor definition.

Show JSON schema:
{
  "$defs": {
    "SensorLevel": {
      "description": "Sensor level definition.",
      "properties": {
        "levelType": {
          "const": "height_above_ground",
          "title": "Leveltype",
          "type": "string"
        },
        "unit": {
          "const": "m",
          "title": "Unit",
          "type": "string"
        },
        "value": {
          "minimum": 0.0,
          "title": "Value",
          "type": "number"
        }
      },
      "required": [
        "levelType",
        "unit",
        "value"
      ],
      "title": "SensorLevel",
      "type": "object"
    }
  },
  "description": "Sensor definition.",
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "description": {
      "title": "Description",
      "type": "string"
    },
    "dataType": {
      "enum": [
        "realtime",
        "climate"
      ],
      "title": "Datatype",
      "type": "string"
    },
    "unit": {
      "enum": [
        "m",
        "m/s",
        "%",
        "1/10 kt",
        "degC",
        "degrees",
        "ft",
        "hPa",
        "mm"
      ],
      "title": "Unit",
      "type": "string"
    },
    "category": {
      "enum": [
        "Wind",
        "Cloud Cover",
        "Atmospheric pressure",
        "Precipitation",
        "Temperature",
        "Humidity",
        "Visibility"
      ],
      "title": "Category",
      "type": "string"
    },
    "performanceCategory": {
      "enum": [
        "A",
        "B",
        "C",
        "D",
        "E"
      ],
      "title": "Performancecategory",
      "type": "string"
    },
    "qualityCode": {
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7
      ],
      "title": "Qualitycode",
      "type": "integer"
    },
    "timeOffsets": {
      "const": "PT0H",
      "title": "Timeoffsets",
      "type": "string"
    },
    "timeResolution": {
      "enum": [
        "PT1M",
        "PT1H"
      ],
      "title": "Timeresolution",
      "type": "string"
    },
    "sensorLevels": {
      "anyOf": [
        {
          "$ref": "#/$defs/SensorLevel"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "dataType",
    "unit",
    "category",
    "performanceCategory",
    "qualityCode",
    "timeOffsets",
    "timeResolution",
    "sensorLevels"
  ],
  "title": "ObservationMetadata",
  "type": "object"
}

Fields:

  • id (str)
  • name (str)
  • description (str)
  • data_type (Literal['realtime', 'climate'])
  • unit (Literal['m', 'm/s', '%', '1/10 kt', 'degC', 'degrees', 'ft', 'hPa', 'mm'])
  • category (Literal['Wind', 'Cloud Cover', 'Atmospheric pressure', 'Precipitation', 'Temperature', 'Humidity', 'Visibility'])
  • performance_category (Literal['A', 'B', 'C', 'D', 'E'])
  • qualitycode (Literal[0, 1, 2, 3, 4, 5, 6, 7])
  • timeoffsets (Literal['PT0H'])
  • timeresolution (Literal['PT1M', 'PT1H'])
  • sensorlevels (SensorLevel | None)
Source code in meteolux/models.py
class ObservationMetadata(BaseModel):
  """Sensor definition."""

  id: str
  name: str
  description: str
  data_type: Literal['realtime', 'climate'] = Field(..., alias='dataType')
  unit: Literal['m', 'm/s', '%', '1/10 kt', 'degC', 'degrees', 'ft', 'hPa', 'mm']
  category: Literal['Wind', 'Cloud Cover', 'Atmospheric pressure', 'Precipitation', 'Temperature', 'Humidity', 'Visibility']
  performance_category: Literal['A', 'B', 'C', 'D', 'E'] = Field(..., alias='performanceCategory')
  qualitycode: Literal[0, 1, 2, 3, 4, 5, 6, 7] = Field(..., alias='qualityCode')
  timeoffsets: Literal['PT0H'] = Field(..., alias='timeOffsets')
  timeresolution: Literal['PT1M', 'PT1H'] = Field(..., alias='timeResolution')
  sensorlevels: SensorLevel | None = Field(..., alias='sensorLevels')

ObservationMetadataResponse pydantic-model

Bases: BaseModel

Elements metadata.

Show JSON schema:
{
  "$defs": {
    "ObservationMetadata": {
      "description": "Sensor definition.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "description": {
          "title": "Description",
          "type": "string"
        },
        "dataType": {
          "enum": [
            "realtime",
            "climate"
          ],
          "title": "Datatype",
          "type": "string"
        },
        "unit": {
          "enum": [
            "m",
            "m/s",
            "%",
            "1/10 kt",
            "degC",
            "degrees",
            "ft",
            "hPa",
            "mm"
          ],
          "title": "Unit",
          "type": "string"
        },
        "category": {
          "enum": [
            "Wind",
            "Cloud Cover",
            "Atmospheric pressure",
            "Precipitation",
            "Temperature",
            "Humidity",
            "Visibility"
          ],
          "title": "Category",
          "type": "string"
        },
        "performanceCategory": {
          "enum": [
            "A",
            "B",
            "C",
            "D",
            "E"
          ],
          "title": "Performancecategory",
          "type": "string"
        },
        "qualityCode": {
          "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7
          ],
          "title": "Qualitycode",
          "type": "integer"
        },
        "timeOffsets": {
          "const": "PT0H",
          "title": "Timeoffsets",
          "type": "string"
        },
        "timeResolution": {
          "enum": [
            "PT1M",
            "PT1H"
          ],
          "title": "Timeresolution",
          "type": "string"
        },
        "sensorLevels": {
          "anyOf": [
            {
              "$ref": "#/$defs/SensorLevel"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "name",
        "description",
        "dataType",
        "unit",
        "category",
        "performanceCategory",
        "qualityCode",
        "timeOffsets",
        "timeResolution",
        "sensorLevels"
      ],
      "title": "ObservationMetadata",
      "type": "object"
    },
    "SensorLevel": {
      "description": "Sensor level definition.",
      "properties": {
        "levelType": {
          "const": "height_above_ground",
          "title": "Leveltype",
          "type": "string"
        },
        "unit": {
          "const": "m",
          "title": "Unit",
          "type": "string"
        },
        "value": {
          "minimum": 0.0,
          "title": "Value",
          "type": "number"
        }
      },
      "required": [
        "levelType",
        "unit",
        "value"
      ],
      "title": "SensorLevel",
      "type": "object"
    }
  },
  "description": "Elements metadata.",
  "properties": {
    "licence": {
      "default": [
        "Creative Commons",
        "https://creativecommons.org/public-domain/cc0/"
      ],
      "items": {
        "type": "string"
      },
      "title": "Licence",
      "type": "array"
    },
    "docUrl": {
      "default": "/docs",
      "title": "Docurl",
      "type": "string"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/ObservationMetadata"
      },
      "title": "Data",
      "type": "array"
    },
    "totalItemCount": {
      "default": 1,
      "title": "Totalitemcount",
      "type": "integer"
    },
    "qualityCodes": {
      "additionalProperties": {
        "type": "string"
      },
      "default": {
        "0": "Value is controlled and found O.K."
      },
      "title": "Qualitycodes",
      "type": "object"
    },
    "performanceCategory": {
      "additionalProperties": {
        "type": "string"
      },
      "default": {
        "A": "The sensor type fulfills the requirements from WMO/CIMOs on measurement accuracy, calibration and maintenance."
      },
      "title": "Performancecategory",
      "type": "object"
    }
  },
  "required": [
    "data"
  ],
  "title": "ObservationMetadataResponse",
  "type": "object"
}

Fields:

  • licence (list[str])
  • doc_url (str)
  • data (list[ObservationMetadata])
  • total_item_count (int)
  • quality_codes (dict[str, str])
  • performance_category (dict[str, str])
Source code in meteolux/models.py
class ObservationMetadataResponse(BaseModel):
  """Elements metadata."""

  licence: list[str] = ['Creative Commons', 'https://creativecommons.org/public-domain/cc0/']
  doc_url: str = Field('/docs', alias='docUrl')
  data: list[ObservationMetadata]
  total_item_count: int = Field(1, alias='totalItemCount')
  quality_codes: dict[str, str] = Field({'0': 'Value is controlled and found O.K.'}, alias='qualityCodes')
  performance_category: dict[str, str] = Field(
    {'A': 'The sensor type fulfills the requirements from WMO/CIMOs on measurement accuracy, calibration and maintenance.'}, alias='performanceCategory'
  )

ObservationResponse pydantic-model

Bases: BaseModel

Last Observations.

Show JSON schema:
{
  "$defs": {
    "ObservationResponseData": {
      "description": "Model to link gendata id to their values.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "value": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value"
        }
      },
      "required": [
        "id",
        "value"
      ],
      "title": "ObservationResponseData",
      "type": "object"
    }
  },
  "description": "Last Observations.",
  "properties": {
    "licence": {
      "default": [
        "Creative Commons",
        "https://creativecommons.org/public-domain/cc0/"
      ],
      "items": {
        "type": "string"
      },
      "title": "Licence",
      "type": "array"
    },
    "docUrl": {
      "default": "/docs",
      "title": "Docurl",
      "type": "string"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/ObservationResponseData"
      },
      "title": "Data",
      "type": "array"
    },
    "totalItemCount": {
      "default": 1,
      "title": "Totalitemcount",
      "type": "integer"
    },
    "timestamp": {
      "format": "date-time",
      "title": "Timestamp",
      "type": "string"
    }
  },
  "required": [
    "data",
    "timestamp"
  ],
  "title": "ObservationResponse",
  "type": "object"
}

Fields:

  • licence (list[str])
  • doc_url (str)
  • data (list[ObservationResponseData])
  • total_item_count (int)
  • timestamp (datetime)
Source code in meteolux/models.py
class ObservationResponse(BaseModel):
  """Last Observations."""

  licence: list[str] = ['Creative Commons', 'https://creativecommons.org/public-domain/cc0/']
  doc_url: str = Field('/docs', alias='docUrl')
  data: list[ObservationResponseData]
  total_item_count: int = Field(1, alias='totalItemCount')
  timestamp: datetime

ObservationResponseData pydantic-model

Bases: BaseModel

Model to link gendata id to their values.

Show JSON schema:
{
  "description": "Model to link gendata id to their values.",
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "value": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Value"
    }
  },
  "required": [
    "id",
    "value"
  ],
  "title": "ObservationResponseData",
  "type": "object"
}

Fields:

  • id (str)
  • value (int | float | None)
Source code in meteolux/models.py
class ObservationResponseData(BaseModel):
  """Model to link gendata id to their values."""

  id: str
  value: int | float | None

OutCity pydantic-model

Bases: BaseModel

City with translated name.

Show JSON schema:
{
  "description": "City with translated name.",
  "properties": {
    "id": {
      "title": "Id",
      "type": "integer"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "region": {
      "default": "S",
      "enum": [
        "N",
        "S"
      ],
      "title": "Region",
      "type": "string"
    },
    "canton": {
      "enum": [
        "Capellen",
        "Clervaux",
        "Diekirch",
        "Echternach",
        "Esch-sur-Alzette",
        "Grevenmacher",
        "Luxembourg",
        "Mersch",
        "Redange",
        "Remich",
        "Vianden",
        "Wiltz"
      ],
      "title": "Canton",
      "type": "string"
    },
    "domain": {
      "enum": [
        "villes",
        "lieu",
        "fluvial"
      ],
      "title": "Domain",
      "type": "string"
    },
    "lat": {
      "title": "Lat",
      "type": "number"
    },
    "long": {
      "title": "Long",
      "type": "number"
    }
  },
  "required": [
    "id",
    "name",
    "canton",
    "domain",
    "lat",
    "long"
  ],
  "title": "OutCity",
  "type": "object"
}

Fields:

  • id (int)
  • name (str)
  • region (Literal['N', 'S'])
  • canton (Literal['Capellen', 'Clervaux', 'Diekirch', 'Echternach', 'Esch-sur-Alzette', 'Grevenmacher', 'Luxembourg', 'Mersch', 'Redange', 'Remich', 'Vianden', 'Wiltz'])
  • domain (Literal['villes', 'lieu', 'fluvial'])
  • lat (float)
  • long (float)
Source code in meteolux/models.py
class OutCity(BaseModel):
  """City with translated name."""

  id: int
  name: str
  region: Literal['N', 'S'] = 'S'
  canton: Literal[
    'Capellen', 'Clervaux', 'Diekirch', 'Echternach', 'Esch-sur-Alzette', 'Grevenmacher', 'Luxembourg', 'Mersch', 'Redange', 'Remich', 'Vianden', 'Wiltz'
  ]
  domain: Literal['villes', 'lieu', 'fluvial']
  lat: float
  long: float

Radar pydantic-model

Bases: BaseModel

Radar image model.

Show JSON schema:
{
  "$defs": {
    "ImageOut": {
      "description": "Image with url.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "provider": {
          "title": "Provider",
          "type": "string"
        },
        "url": {
          "maxLength": 2083,
          "minLength": 1,
          "title": "Url",
          "type": "string"
        }
      },
      "required": [
        "date",
        "provider",
        "url"
      ],
      "title": "ImageOut",
      "type": "object"
    }
  },
  "description": "Radar image model.",
  "properties": {
    "realTime": {
      "items": {
        "$ref": "#/$defs/ImageOut"
      },
      "title": "Realtime",
      "type": "array"
    },
    "forecast": {
      "items": {
        "$ref": "#/$defs/ImageOut"
      },
      "title": "Forecast",
      "type": "array"
    }
  },
  "required": [
    "realTime",
    "forecast"
  ],
  "title": "Radar",
  "type": "object"
}

Fields:

Source code in meteolux/models.py
class Radar(BaseModel):
  """Radar image model."""

  real_time: list[ImageOut] = Field(..., alias='realTime')
  forecast: list[ImageOut]

RoadStatusItem pydantic-model

Bases: BaseModel

Road status item model as per the spec.

Show JSON schema:
{
  "description": "Road status item model as per the spec.",
  "properties": {
    "date": {
      "anyOf": [
        {
          "format": "date",
          "type": "string"
        },
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      ],
      "title": "Date"
    },
    "description": {
      "title": "Description",
      "type": "string"
    }
  },
  "required": [
    "date",
    "description"
  ],
  "title": "RoadStatusItem",
  "type": "object"
}

Fields:

  • date (date | list[str])
  • description (str)
Source code in meteolux/models.py
class RoadStatusItem(BaseModel):
  """Road status item model as per the spec."""

  date: date | list[str]
  description: str

Satellite pydantic-model

Bases: BaseModel

Satellite image model.

Show JSON schema:
{
  "$defs": {
    "ImageOut": {
      "description": "Image with url.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "provider": {
          "title": "Provider",
          "type": "string"
        },
        "url": {
          "maxLength": 2083,
          "minLength": 1,
          "title": "Url",
          "type": "string"
        }
      },
      "required": [
        "date",
        "provider",
        "url"
      ],
      "title": "ImageOut",
      "type": "object"
    }
  },
  "description": "Satellite image model.",
  "properties": {
    "infrared": {
      "items": {
        "$ref": "#/$defs/ImageOut"
      },
      "title": "Infrared",
      "type": "array"
    },
    "visual": {
      "items": {
        "$ref": "#/$defs/ImageOut"
      },
      "title": "Visual",
      "type": "array"
    }
  },
  "required": [
    "infrared",
    "visual"
  ],
  "title": "Satellite",
  "type": "object"
}

Fields:

Source code in meteolux/models.py
class Satellite(BaseModel):
  """Satellite image model."""

  infrared: list[ImageOut]
  visual: list[ImageOut]

SensorLevel pydantic-model

Bases: BaseModel

Sensor level definition.

Show JSON schema:
{
  "description": "Sensor level definition.",
  "properties": {
    "levelType": {
      "const": "height_above_ground",
      "title": "Leveltype",
      "type": "string"
    },
    "unit": {
      "const": "m",
      "title": "Unit",
      "type": "string"
    },
    "value": {
      "minimum": 0.0,
      "title": "Value",
      "type": "number"
    }
  },
  "required": [
    "levelType",
    "unit",
    "value"
  ],
  "title": "SensorLevel",
  "type": "object"
}

Fields:

  • level_type (Literal['height_above_ground'])
  • unit (Literal['m'])
  • value (float)
Source code in meteolux/models.py
class SensorLevel(BaseModel):
  """Sensor level definition."""

  level_type: Literal['height_above_ground'] = Field(..., alias='levelType')
  unit: Literal['m']
  value: float = Field(..., ge=0.0)

Temperature pydantic-model

Bases: BaseModel

Temperature model.

Show JSON schema:
{
  "description": "Temperature model.",
  "properties": {
    "temperature": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "items": {
            "type": "integer"
          },
          "type": "array"
        }
      ],
      "title": "Temperature"
    },
    "humidex": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Humidex"
    },
    "felt": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Felt"
    }
  },
  "required": [
    "temperature"
  ],
  "title": "Temperature",
  "type": "object"
}

Fields:

  • temperature (int | list[int])
  • humidex (str | None)
  • felt (int | None)
Source code in meteolux/models.py
class Temperature(BaseModel):
  """Temperature model."""

  temperature: int | list[int]
  humidex: str | None = None
  felt: int | None = None

Trend pydantic-model

Bases: BaseModel

Forecast part of data.

Show JSON schema:
{
  "description": "Forecast part of data.",
  "properties": {
    "date": {
      "format": "date",
      "title": "Date",
      "type": "string"
    },
    "minTemp": {
      "title": "Mintemp",
      "type": "number"
    },
    "maxTemp": {
      "title": "Maxtemp",
      "type": "number"
    },
    "precipitation": {
      "title": "Precipitation",
      "type": "number"
    }
  },
  "required": [
    "date",
    "minTemp",
    "maxTemp",
    "precipitation"
  ],
  "title": "Trend",
  "type": "object"
}

Fields:

  • date (date)
  • min_temp (float)
  • max_temp (float)
  • precipitation (float)
Source code in meteolux/models.py
class Trend(BaseModel):
  """Forecast part of data."""

  date: date
  min_temp: float = Field(..., alias='minTemp')
  max_temp: float = Field(..., alias='maxTemp')
  precipitation: float

User pydantic-model

Bases: BaseModel

User model.

Show JSON schema:
{
  "$defs": {
    "VigilanceSettings": {
      "description": "User settings for notifications.",
      "properties": {
        "level": {
          "enum": [
            2,
            3,
            4
          ],
          "title": "Level",
          "type": "integer"
        },
        "typeAir": {
          "default": false,
          "title": "Typeair",
          "type": "boolean"
        },
        "typeCold": {
          "default": false,
          "title": "Typecold",
          "type": "boolean"
        },
        "typeFlooding": {
          "default": false,
          "title": "Typeflooding",
          "type": "boolean"
        },
        "typeHeat": {
          "default": false,
          "title": "Typeheat",
          "type": "boolean"
        },
        "typeIce": {
          "default": false,
          "title": "Typeice",
          "type": "boolean"
        },
        "typeRain": {
          "default": false,
          "title": "Typerain",
          "type": "boolean"
        },
        "typeSnow": {
          "default": false,
          "title": "Typesnow",
          "type": "boolean"
        },
        "typeStorm": {
          "default": false,
          "title": "Typestorm",
          "type": "boolean"
        },
        "typeWind": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Typewind"
        },
        "zoneNorth": {
          "title": "Zonenorth",
          "type": "boolean"
        },
        "zoneSouth": {
          "title": "Zonesouth",
          "type": "boolean"
        }
      },
      "required": [
        "level",
        "zoneNorth",
        "zoneSouth"
      ],
      "title": "VigilanceSettings",
      "type": "object"
    }
  },
  "description": "User model.",
  "properties": {
    "language": {
      "enum": [
        "fr",
        "de",
        "en",
        "lb"
      ],
      "title": "Language",
      "type": "string"
    },
    "pushToken": {
      "maxLength": 50,
      "title": "Pushtoken",
      "type": "string"
    },
    "pushMorning": {
      "default": false,
      "title": "Pushmorning",
      "type": "boolean"
    },
    "pushEvening": {
      "default": false,
      "title": "Pushevening",
      "type": "boolean"
    },
    "device": {
      "title": "Device",
      "type": "string"
    },
    "version": {
      "title": "Version",
      "type": "string"
    },
    "buildversion": {
      "title": "Buildversion",
      "type": "string"
    },
    "vigilance": {
      "$ref": "#/$defs/VigilanceSettings"
    }
  },
  "required": [
    "language",
    "pushToken",
    "device",
    "version",
    "buildversion",
    "vigilance"
  ],
  "title": "User",
  "type": "object"
}

Fields:

  • language (Literal['fr', 'de', 'en', 'lb'])
  • push_token (str)
  • push_morning (bool)
  • push_evening (bool)
  • device (str)
  • version (str)
  • buildversion (str)
  • vigilance (VigilanceSettings)
Source code in meteolux/models.py
class User(BaseModel):
  """User model."""

  language: Literal['fr', 'de', 'en', 'lb']
  push_token: str = Field(..., alias='pushToken', max_length=50)
  push_morning: bool = Field(False, alias='pushMorning')
  push_evening: bool = Field(False, alias='pushEvening')
  device: str
  version: str
  buildversion: str
  vigilance: VigilanceSettings

Vigilance pydantic-model

Bases: BaseModel

Vigilance model.

Show JSON schema:
{
  "description": "Vigilance model.",
  "properties": {
    "datetimeStart": {
      "format": "date-time",
      "title": "Datetimestart",
      "type": "string"
    },
    "datetimeEnd": {
      "format": "date-time",
      "title": "Datetimeend",
      "type": "string"
    },
    "level": {
      "enum": [
        2,
        3,
        4
      ],
      "title": "Level",
      "type": "integer"
    },
    "type": {
      "title": "Type",
      "type": "integer"
    },
    "group": {
      "title": "Group",
      "type": "integer"
    },
    "region": {
      "enum": [
        "north",
        "south",
        "all"
      ],
      "title": "Region",
      "type": "string"
    },
    "description": {
      "title": "Description",
      "type": "string"
    }
  },
  "required": [
    "datetimeStart",
    "datetimeEnd",
    "level",
    "type",
    "group",
    "region",
    "description"
  ],
  "title": "Vigilance",
  "type": "object"
}

Fields:

  • datetime_start (datetime)
  • datetime_end (datetime)
  • level (Literal[2, 3, 4])
  • type (int)
  • group (int)
  • region (Literal['north', 'south', 'all'])
  • description (str)
Source code in meteolux/models.py
class Vigilance(BaseModel):
  """Vigilance model."""

  datetime_start: datetime = Field(..., alias='datetimeStart')
  datetime_end: datetime = Field(..., alias='datetimeEnd')
  level: Literal[2, 3, 4]
  type: int
  group: int
  region: Literal['north', 'south', 'all']
  description: str

VigilanceSettings pydantic-model

Bases: BaseModel

User settings for notifications.

Show JSON schema:
{
  "description": "User settings for notifications.",
  "properties": {
    "level": {
      "enum": [
        2,
        3,
        4
      ],
      "title": "Level",
      "type": "integer"
    },
    "typeAir": {
      "default": false,
      "title": "Typeair",
      "type": "boolean"
    },
    "typeCold": {
      "default": false,
      "title": "Typecold",
      "type": "boolean"
    },
    "typeFlooding": {
      "default": false,
      "title": "Typeflooding",
      "type": "boolean"
    },
    "typeHeat": {
      "default": false,
      "title": "Typeheat",
      "type": "boolean"
    },
    "typeIce": {
      "default": false,
      "title": "Typeice",
      "type": "boolean"
    },
    "typeRain": {
      "default": false,
      "title": "Typerain",
      "type": "boolean"
    },
    "typeSnow": {
      "default": false,
      "title": "Typesnow",
      "type": "boolean"
    },
    "typeStorm": {
      "default": false,
      "title": "Typestorm",
      "type": "boolean"
    },
    "typeWind": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Typewind"
    },
    "zoneNorth": {
      "title": "Zonenorth",
      "type": "boolean"
    },
    "zoneSouth": {
      "title": "Zonesouth",
      "type": "boolean"
    }
  },
  "required": [
    "level",
    "zoneNorth",
    "zoneSouth"
  ],
  "title": "VigilanceSettings",
  "type": "object"
}

Fields:

  • level (Literal[2, 3, 4])
  • type_air (bool)
  • type_cold (bool)
  • type_flooding (bool)
  • type_heat (bool)
  • type_ice (bool)
  • type_rain (bool)
  • type_snow (bool)
  • type_storm (bool)
  • type_wind (bool | None)
  • zone_north (bool)
  • zone_south (bool)
Source code in meteolux/models.py
class VigilanceSettings(BaseModel):
  """User settings for notifications."""

  level: Literal[2, 3, 4]
  type_air: bool = Field(False, alias='typeAir')
  type_cold: bool = Field(False, alias='typeCold')
  type_flooding: bool = Field(False, alias='typeFlooding')
  type_heat: bool = Field(False, alias='typeHeat')
  type_ice: bool = Field(False, alias='typeIce')
  type_rain: bool = Field(False, alias='typeRain')
  type_snow: bool = Field(False, alias='typeSnow')
  type_storm: bool = Field(False, alias='typeStorm')
  type_wind: bool | None = Field(None, alias='typeWind')
  zone_north: bool = Field(..., alias='zoneNorth')
  zone_south: bool = Field(..., alias='zoneSouth')

WeatherResponse pydantic-model

Bases: BaseModel

Final weather output from the backend.

Show JSON schema:
{
  "$defs": {
    "Climatology": {
      "description": "History part of data.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "minTemp": {
          "title": "Mintemp",
          "type": "number"
        },
        "maxTemp": {
          "title": "Maxtemp",
          "type": "number"
        },
        "precipitation": {
          "title": "Precipitation",
          "type": "number"
        },
        "meanTemp": {
          "title": "Meantemp",
          "type": "number"
        },
        "sunshine": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Sunshine"
        }
      },
      "required": [
        "date",
        "minTemp",
        "maxTemp",
        "precipitation",
        "meanTemp"
      ],
      "title": "Climatology",
      "type": "object"
    },
    "CurrentWeather": {
      "description": "Part of the global weather model.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "icon": {
          "$ref": "#/$defs/Icon"
        },
        "wind": {
          "$ref": "#/$defs/Wind"
        },
        "rain": {
          "title": "Rain",
          "type": "string"
        },
        "snow": {
          "title": "Snow",
          "type": "string"
        },
        "type": {
          "const": "current",
          "default": "current",
          "title": "Type",
          "type": "string"
        },
        "temperature": {
          "$ref": "#/$defs/Temperature"
        }
      },
      "required": [
        "date",
        "icon",
        "wind",
        "rain",
        "snow",
        "temperature"
      ],
      "title": "CurrentWeather",
      "type": "object"
    },
    "DailyWeather": {
      "description": "For the list of following days.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "icon": {
          "$ref": "#/$defs/Icon"
        },
        "wind": {
          "$ref": "#/$defs/Wind"
        },
        "rain": {
          "title": "Rain",
          "type": "string"
        },
        "snow": {
          "title": "Snow",
          "type": "string"
        },
        "type": {
          "const": "daily",
          "default": "daily",
          "title": "Type",
          "type": "string"
        },
        "temperatureMin": {
          "$ref": "#/$defs/Temperature"
        },
        "temperatureMax": {
          "$ref": "#/$defs/Temperature"
        },
        "sunshine": {
          "title": "Sunshine",
          "type": "integer"
        },
        "uvIndex": {
          "title": "Uvindex",
          "type": "integer"
        }
      },
      "required": [
        "date",
        "icon",
        "wind",
        "rain",
        "snow",
        "temperatureMin",
        "temperatureMax",
        "sunshine",
        "uvIndex"
      ],
      "title": "DailyWeather",
      "type": "object"
    },
    "Ephemeris": {
      "description": "Ephemeris model.",
      "properties": {
        "date": {
          "format": "date",
          "title": "Date",
          "type": "string"
        },
        "sunrise": {
          "title": "Sunrise",
          "type": "string"
        },
        "sunset": {
          "title": "Sunset",
          "type": "string"
        },
        "moonrise": {
          "title": "Moonrise",
          "type": "string"
        },
        "moonset": {
          "title": "Moonset",
          "type": "string"
        },
        "sunshine": {
          "maximum": 16.0,
          "minimum": 0.0,
          "title": "Sunshine",
          "type": "integer"
        },
        "moonIcon": {
          "$ref": "#/$defs/MoonIcon"
        },
        "uvIndex": {
          "maximum": 12.0,
          "minimum": 0.0,
          "title": "Uvindex",
          "type": "integer"
        }
      },
      "required": [
        "date",
        "sunrise",
        "sunset",
        "moonrise",
        "moonset",
        "sunshine",
        "moonIcon",
        "uvIndex"
      ],
      "title": "Ephemeris",
      "type": "object"
    },
    "GraphicalData": {
      "description": "Graphical group of data.",
      "properties": {
        "history": {
          "items": {
            "$ref": "#/$defs/Climatology"
          },
          "title": "History",
          "type": "array"
        },
        "forecast": {
          "items": {
            "$ref": "#/$defs/Trend"
          },
          "title": "Forecast",
          "type": "array"
        }
      },
      "required": [
        "history",
        "forecast"
      ],
      "title": "GraphicalData",
      "type": "object"
    },
    "HourlyWeather": {
      "description": "For the list of following hours.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "icon": {
          "$ref": "#/$defs/Icon"
        },
        "wind": {
          "$ref": "#/$defs/Wind"
        },
        "rain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            }
          ],
          "title": "Rain"
        },
        "snow": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            }
          ],
          "title": "Snow"
        },
        "type": {
          "const": "hourly",
          "default": "hourly",
          "title": "Type",
          "type": "string"
        },
        "temperature": {
          "$ref": "#/$defs/Temperature"
        }
      },
      "required": [
        "date",
        "icon",
        "wind",
        "rain",
        "snow",
        "temperature"
      ],
      "title": "HourlyWeather",
      "type": "object"
    },
    "Icon": {
      "description": "Base icon.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "Icon",
      "type": "object"
    },
    "ImageOut": {
      "description": "Image with url.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "provider": {
          "title": "Provider",
          "type": "string"
        },
        "url": {
          "maxLength": 2083,
          "minLength": 1,
          "title": "Url",
          "type": "string"
        }
      },
      "required": [
        "date",
        "provider",
        "url"
      ],
      "title": "ImageOut",
      "type": "object"
    },
    "MoonIcon": {
      "description": "As different id are used.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "MoonIcon",
      "type": "object"
    },
    "OutCity": {
      "description": "City with translated name.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "region": {
          "default": "S",
          "enum": [
            "N",
            "S"
          ],
          "title": "Region",
          "type": "string"
        },
        "canton": {
          "enum": [
            "Capellen",
            "Clervaux",
            "Diekirch",
            "Echternach",
            "Esch-sur-Alzette",
            "Grevenmacher",
            "Luxembourg",
            "Mersch",
            "Redange",
            "Remich",
            "Vianden",
            "Wiltz"
          ],
          "title": "Canton",
          "type": "string"
        },
        "domain": {
          "enum": [
            "villes",
            "lieu",
            "fluvial"
          ],
          "title": "Domain",
          "type": "string"
        },
        "lat": {
          "title": "Lat",
          "type": "number"
        },
        "long": {
          "title": "Long",
          "type": "number"
        }
      },
      "required": [
        "id",
        "name",
        "canton",
        "domain",
        "lat",
        "long"
      ],
      "title": "OutCity",
      "type": "object"
    },
    "Radar": {
      "description": "Radar image model.",
      "properties": {
        "realTime": {
          "items": {
            "$ref": "#/$defs/ImageOut"
          },
          "title": "Realtime",
          "type": "array"
        },
        "forecast": {
          "items": {
            "$ref": "#/$defs/ImageOut"
          },
          "title": "Forecast",
          "type": "array"
        }
      },
      "required": [
        "realTime",
        "forecast"
      ],
      "title": "Radar",
      "type": "object"
    },
    "RoadStatusItem": {
      "description": "Road status item model as per the spec.",
      "properties": {
        "date": {
          "anyOf": [
            {
              "format": "date",
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ],
          "title": "Date"
        },
        "description": {
          "title": "Description",
          "type": "string"
        }
      },
      "required": [
        "date",
        "description"
      ],
      "title": "RoadStatusItem",
      "type": "object"
    },
    "Satellite": {
      "description": "Satellite image model.",
      "properties": {
        "infrared": {
          "items": {
            "$ref": "#/$defs/ImageOut"
          },
          "title": "Infrared",
          "type": "array"
        },
        "visual": {
          "items": {
            "$ref": "#/$defs/ImageOut"
          },
          "title": "Visual",
          "type": "array"
        }
      },
      "required": [
        "infrared",
        "visual"
      ],
      "title": "Satellite",
      "type": "object"
    },
    "Temperature": {
      "description": "Temperature model.",
      "properties": {
        "temperature": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          ],
          "title": "Temperature"
        },
        "humidex": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Humidex"
        },
        "felt": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Felt"
        }
      },
      "required": [
        "temperature"
      ],
      "title": "Temperature",
      "type": "object"
    },
    "Trend": {
      "description": "Forecast part of data.",
      "properties": {
        "date": {
          "format": "date",
          "title": "Date",
          "type": "string"
        },
        "minTemp": {
          "title": "Mintemp",
          "type": "number"
        },
        "maxTemp": {
          "title": "Maxtemp",
          "type": "number"
        },
        "precipitation": {
          "title": "Precipitation",
          "type": "number"
        }
      },
      "required": [
        "date",
        "minTemp",
        "maxTemp",
        "precipitation"
      ],
      "title": "Trend",
      "type": "object"
    },
    "Vigilance": {
      "description": "Vigilance model.",
      "properties": {
        "datetimeStart": {
          "format": "date-time",
          "title": "Datetimestart",
          "type": "string"
        },
        "datetimeEnd": {
          "format": "date-time",
          "title": "Datetimeend",
          "type": "string"
        },
        "level": {
          "enum": [
            2,
            3,
            4
          ],
          "title": "Level",
          "type": "integer"
        },
        "type": {
          "title": "Type",
          "type": "integer"
        },
        "group": {
          "title": "Group",
          "type": "integer"
        },
        "region": {
          "enum": [
            "north",
            "south",
            "all"
          ],
          "title": "Region",
          "type": "string"
        },
        "description": {
          "title": "Description",
          "type": "string"
        }
      },
      "required": [
        "datetimeStart",
        "datetimeEnd",
        "level",
        "type",
        "group",
        "region",
        "description"
      ],
      "title": "Vigilance",
      "type": "object"
    },
    "WeatherResponseForecast": {
      "description": "Forecast model.",
      "properties": {
        "current": {
          "$ref": "#/$defs/CurrentWeather"
        },
        "hourly": {
          "items": {
            "$ref": "#/$defs/HourlyWeather"
          },
          "title": "Hourly",
          "type": "array"
        },
        "daily": {
          "items": {
            "$ref": "#/$defs/DailyWeather"
          },
          "title": "Daily",
          "type": "array"
        }
      },
      "required": [
        "current",
        "hourly",
        "daily"
      ],
      "title": "WeatherResponseForecast",
      "type": "object"
    },
    "Wind": {
      "description": "Wind model.",
      "properties": {
        "direction": {
          "title": "Direction",
          "type": "string"
        },
        "speed": {
          "title": "Speed",
          "type": "string"
        },
        "gusts": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gusts"
        }
      },
      "required": [
        "direction",
        "speed"
      ],
      "title": "Wind",
      "type": "object"
    }
  },
  "description": "Final weather output from the backend.",
  "properties": {
    "city": {
      "$ref": "#/$defs/OutCity"
    },
    "forecast": {
      "$ref": "#/$defs/WeatherResponseForecast"
    },
    "vigilances": {
      "items": {
        "$ref": "#/$defs/Vigilance"
      },
      "title": "Vigilances",
      "type": "array"
    },
    "roadStatus": {
      "items": {
        "$ref": "#/$defs/RoadStatusItem"
      },
      "title": "Roadstatus",
      "type": "array"
    },
    "ephemeris": {
      "$ref": "#/$defs/Ephemeris"
    },
    "radar": {
      "$ref": "#/$defs/Radar"
    },
    "satellite": {
      "$ref": "#/$defs/Satellite"
    },
    "data": {
      "$ref": "#/$defs/GraphicalData"
    }
  },
  "required": [
    "city",
    "forecast",
    "vigilances",
    "roadStatus",
    "ephemeris",
    "radar",
    "satellite",
    "data"
  ],
  "title": "WeatherResponse",
  "type": "object"
}

Fields:

Source code in meteolux/models.py
class WeatherResponse(BaseModel):
  """Final weather output from the backend."""

  city: OutCity
  forecast: WeatherResponseForecast
  vigilances: list[Vigilance]
  road_status: list[RoadStatusItem] = Field(..., alias='roadStatus')
  ephemeris: Ephemeris
  radar: Radar
  satellite: Satellite
  data: GraphicalData

WeatherResponseForecast pydantic-model

Bases: BaseModel

Forecast model.

Show JSON schema:
{
  "$defs": {
    "CurrentWeather": {
      "description": "Part of the global weather model.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "icon": {
          "$ref": "#/$defs/Icon"
        },
        "wind": {
          "$ref": "#/$defs/Wind"
        },
        "rain": {
          "title": "Rain",
          "type": "string"
        },
        "snow": {
          "title": "Snow",
          "type": "string"
        },
        "type": {
          "const": "current",
          "default": "current",
          "title": "Type",
          "type": "string"
        },
        "temperature": {
          "$ref": "#/$defs/Temperature"
        }
      },
      "required": [
        "date",
        "icon",
        "wind",
        "rain",
        "snow",
        "temperature"
      ],
      "title": "CurrentWeather",
      "type": "object"
    },
    "DailyWeather": {
      "description": "For the list of following days.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "icon": {
          "$ref": "#/$defs/Icon"
        },
        "wind": {
          "$ref": "#/$defs/Wind"
        },
        "rain": {
          "title": "Rain",
          "type": "string"
        },
        "snow": {
          "title": "Snow",
          "type": "string"
        },
        "type": {
          "const": "daily",
          "default": "daily",
          "title": "Type",
          "type": "string"
        },
        "temperatureMin": {
          "$ref": "#/$defs/Temperature"
        },
        "temperatureMax": {
          "$ref": "#/$defs/Temperature"
        },
        "sunshine": {
          "title": "Sunshine",
          "type": "integer"
        },
        "uvIndex": {
          "title": "Uvindex",
          "type": "integer"
        }
      },
      "required": [
        "date",
        "icon",
        "wind",
        "rain",
        "snow",
        "temperatureMin",
        "temperatureMax",
        "sunshine",
        "uvIndex"
      ],
      "title": "DailyWeather",
      "type": "object"
    },
    "HourlyWeather": {
      "description": "For the list of following hours.",
      "properties": {
        "date": {
          "format": "date-time",
          "title": "Date",
          "type": "string"
        },
        "icon": {
          "$ref": "#/$defs/Icon"
        },
        "wind": {
          "$ref": "#/$defs/Wind"
        },
        "rain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            }
          ],
          "title": "Rain"
        },
        "snow": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            }
          ],
          "title": "Snow"
        },
        "type": {
          "const": "hourly",
          "default": "hourly",
          "title": "Type",
          "type": "string"
        },
        "temperature": {
          "$ref": "#/$defs/Temperature"
        }
      },
      "required": [
        "date",
        "icon",
        "wind",
        "rain",
        "snow",
        "temperature"
      ],
      "title": "HourlyWeather",
      "type": "object"
    },
    "Icon": {
      "description": "Base icon.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "Icon",
      "type": "object"
    },
    "Temperature": {
      "description": "Temperature model.",
      "properties": {
        "temperature": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          ],
          "title": "Temperature"
        },
        "humidex": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Humidex"
        },
        "felt": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Felt"
        }
      },
      "required": [
        "temperature"
      ],
      "title": "Temperature",
      "type": "object"
    },
    "Wind": {
      "description": "Wind model.",
      "properties": {
        "direction": {
          "title": "Direction",
          "type": "string"
        },
        "speed": {
          "title": "Speed",
          "type": "string"
        },
        "gusts": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gusts"
        }
      },
      "required": [
        "direction",
        "speed"
      ],
      "title": "Wind",
      "type": "object"
    }
  },
  "description": "Forecast model.",
  "properties": {
    "current": {
      "$ref": "#/$defs/CurrentWeather"
    },
    "hourly": {
      "items": {
        "$ref": "#/$defs/HourlyWeather"
      },
      "title": "Hourly",
      "type": "array"
    },
    "daily": {
      "items": {
        "$ref": "#/$defs/DailyWeather"
      },
      "title": "Daily",
      "type": "array"
    }
  },
  "required": [
    "current",
    "hourly",
    "daily"
  ],
  "title": "WeatherResponseForecast",
  "type": "object"
}

Fields:

Source code in meteolux/models.py
class WeatherResponseForecast(BaseModel):
  """Forecast model."""

  current: CurrentWeather
  hourly: list[HourlyWeather]
  daily: list[DailyWeather]

Wind pydantic-model

Bases: BaseModel

Wind model.

Show JSON schema:
{
  "description": "Wind model.",
  "properties": {
    "direction": {
      "title": "Direction",
      "type": "string"
    },
    "speed": {
      "title": "Speed",
      "type": "string"
    },
    "gusts": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Gusts"
    }
  },
  "required": [
    "direction",
    "speed"
  ],
  "title": "Wind",
  "type": "object"
}

Fields:

  • direction (str)
  • speed (str)
  • gusts (str | None)
Source code in meteolux/models.py
class Wind(BaseModel):
  """Wind model."""

  direction: str
  speed: str
  gusts: str | None = None