Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from schematics import Model
- from schematics.types import (
- DateTimeType,
- FloatType,
- IntType,
- ListType,
- ModelType,
- StringType,
- BooleanType
- )
- class Wind(Model):
- direction = StringType()
- direction_degrees = FloatType()
- direction_to = StringType()
- direction_to_degrees = FloatType()
- direction_from = StringType()
- direction_from_degrees = FloatType()
- gust = FloatType()
- unit = StringType()
- value = FloatType()
- class Visibility(Model):
- unit = StringType()
- value = FloatType()
- direction = StringType()
- direction_degrees = FloatType()
- class RunwayVisibility(Model):
- high = FloatType()
- low = FloatType()
- name = StringType()
- unit = StringType()
- class Temperature(Model):
- dew_point = FloatType()
- temperature = FloatType()
- unit = StringType()
- class Pressure(Model):
- unit = StringType()
- value = FloatType()
- class Report(Model):
- cycle = IntType()
- modifier = StringType()
- type = StringType()
- class Altitude(Model):
- unit = StringType()
- value = FloatType()
- class Sky(Model):
- altitude = ModelType(Altitude)
- cloud_coverage = StringType()
- class WeatherObservation(Model):
- metar = StringType()
- station_id_icao = StringType()
- station_id = StringType()
- version = IntType()
- datetime = DateTimeType()
- timestamp = IntType()
- report = ModelType(Report)
- wind = ModelType(Wind)
- visibility = ModelType(Visibility)
- weather = ListType(StringType, default=[])
- sky = ListType(ModelType(Sky))
- temperature = ModelType(Temperature)
- pressure = ModelType(Pressure)
- runway_visibility = ListType(ModelType(RunwayVisibility))
- remarks = ListType(StringType)
- unsafe_to_operate = BooleanType()
- class AirportWeatherResponse(Model):
- observations = ListType(ModelType(WeatherObservation))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement