Airport Models¶
- pydantic model flight_radar.models.airport.Airport¶
Bases:
AirportLight
Show JSON schema
{ "title": "Airport", "type": "object", "properties": { "icao": { "description": "Airport ICAO code", "title": "Icao", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Airport name", "title": "Name" }, "iata": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Airport IATA code", "title": "Iata" }, "lon": { "description": "Longitude expressed in decimal degrees", "title": "Lon", "type": "number" }, "lat": { "description": "Latitude expressed in decimal degrees", "title": "Lat", "type": "number" }, "elevation": { "description": "Airport elevation in feet", "title": "Elevation", "type": "integer" }, "city": { "description": "City of airport", "title": "City", "type": "string" }, "country": { "$ref": "#/$defs/Country", "description": "Country" }, "timezone": { "$ref": "#/$defs/Timezone", "description": "Timezone" }, "state": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "State where the airport is located. Only available for US, Canada, Brazil and Australia.", "title": "State" }, "runways": { "description": "List of runways at the airport", "items": { "$ref": "#/$defs/Runway" }, "title": "Runways", "type": "array" } }, "$defs": { "Country": { "properties": { "code": { "description": "ISO 3166-1 alpha-2 code of the country", "title": "Code", "type": "string" }, "name": { "description": "Name of the country", "title": "Name", "type": "string" } }, "required": [ "code", "name" ], "title": "Country", "type": "object" }, "Runway": { "properties": { "designator": { "description": "Runway designator (e.g., 18R/36L).", "title": "Designator", "type": "string" }, "heading": { "description": "Runway heading in decimal degrees.", "title": "Heading", "type": "number" }, "length": { "description": "Runway length in feet.", "title": "Length", "type": "integer" }, "width": { "description": "Runway width in feet.", "title": "Width", "type": "integer" }, "elevation": { "description": "Runway elevation in feet.", "title": "Elevation", "type": "integer" }, "thr_coordinates": { "description": "Threshold coordinates (latitude, longitude) in decimal degrees.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "Thr Coordinates", "type": "array" }, "surface": { "$ref": "#/$defs/Surface", "description": "Surface type at the runway" } }, "required": [ "designator", "heading", "length", "width", "elevation", "thr_coordinates", "surface" ], "title": "Runway", "type": "object" }, "Surface": { "properties": { "type": { "description": "Surface type code (e.g., ASPHH for asphalt).", "examples": [ "ASPHH" ], "title": "Type", "type": "string" }, "description": { "description": "Human-readable surface description.", "examples": [ "Asphalt" ], "title": "Description", "type": "string" } }, "required": [ "type", "description" ], "title": "Surface", "type": "object" }, "Timezone": { "properties": { "name": { "description": "Name of the timezone", "title": "Name", "type": "string" }, "offset": { "description": "Offset from UTC in seconds", "title": "Offset", "type": "integer" } }, "required": [ "name", "offset" ], "title": "Timezone", "type": "object" } }, "required": [ "icao", "lon", "lat", "elevation", "city", "country", "timezone", "runways" ] }
- Fields:
-
field city:
str
[Required]¶ City of airport
-
field elevation:
int
[Required]¶ Airport elevation in feet
-
field lat:
float
[Required]¶ Latitude expressed in decimal degrees
-
field lon:
float
[Required]¶ Longitude expressed in decimal degrees
-
field state:
str
|None
= None¶ State where the airport is located. Only available for US, Canada, Brazil and Australia.
- pydantic model flight_radar.models.airport.AirportLight¶
Bases:
BaseModel
Show JSON schema
{ "title": "AirportLight", "type": "object", "properties": { "icao": { "description": "Airport ICAO code", "title": "Icao", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Airport name", "title": "Name" }, "iata": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Airport IATA code", "title": "Iata" } }, "required": [ "icao" ] }
-
field iata:
str
|None
= None¶ Airport IATA code
-
field icao:
str
[Required]¶ Airport ICAO code
-
field name:
str
|None
= None¶ Airport name
- static from_dto(dto)¶
- Return type:
- Parameters:
dto (GetAirportLightResponseDto)
-
field iata:
- pydantic model flight_radar.models.airport.Country¶
Bases:
BaseModel
Show JSON schema
{ "title": "Country", "type": "object", "properties": { "code": { "description": "ISO 3166-1 alpha-2 code of the country", "title": "Code", "type": "string" }, "name": { "description": "Name of the country", "title": "Name", "type": "string" } }, "required": [ "code", "name" ] }
- Fields:
-
field code:
str
[Required]¶ ISO 3166-1 alpha-2 code of the country
-
field name:
str
[Required]¶ Name of the country
- pydantic model flight_radar.models.airport.Runway¶
Bases:
BaseModel
Show JSON schema
{ "title": "Runway", "type": "object", "properties": { "designator": { "description": "Runway designator (e.g., 18R/36L).", "title": "Designator", "type": "string" }, "heading": { "description": "Runway heading in decimal degrees.", "title": "Heading", "type": "number" }, "length": { "description": "Runway length in feet.", "title": "Length", "type": "integer" }, "width": { "description": "Runway width in feet.", "title": "Width", "type": "integer" }, "elevation": { "description": "Runway elevation in feet.", "title": "Elevation", "type": "integer" }, "thr_coordinates": { "description": "Threshold coordinates (latitude, longitude) in decimal degrees.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "title": "Thr Coordinates", "type": "array" }, "surface": { "$ref": "#/$defs/Surface", "description": "Surface type at the runway" } }, "$defs": { "Surface": { "properties": { "type": { "description": "Surface type code (e.g., ASPHH for asphalt).", "examples": [ "ASPHH" ], "title": "Type", "type": "string" }, "description": { "description": "Human-readable surface description.", "examples": [ "Asphalt" ], "title": "Description", "type": "string" } }, "required": [ "type", "description" ], "title": "Surface", "type": "object" } }, "required": [ "designator", "heading", "length", "width", "elevation", "thr_coordinates", "surface" ] }
- Fields:
-
field designator:
str
[Required]¶ Runway designator (e.g., 18R/36L).
-
field elevation:
int
[Required]¶ Runway elevation in feet.
-
field heading:
float
[Required]¶ Runway heading in decimal degrees.
-
field length:
int
[Required]¶ Runway length in feet.
-
field thr_coordinates:
tuple
[float
,float
] [Required]¶ Threshold coordinates (latitude, longitude) in decimal degrees.
-
field width:
int
[Required]¶ Runway width in feet.
- pydantic model flight_radar.models.airport.Surface¶
Bases:
BaseModel
Show JSON schema
{ "title": "Surface", "type": "object", "properties": { "type": { "description": "Surface type code (e.g., ASPHH for asphalt).", "examples": [ "ASPHH" ], "title": "Type", "type": "string" }, "description": { "description": "Human-readable surface description.", "examples": [ "Asphalt" ], "title": "Description", "type": "string" } }, "required": [ "type", "description" ] }
- Fields:
-
field description:
str
[Required]¶ Human-readable surface description.
-
field type:
str
[Required]¶ Surface type code (e.g., ASPHH for asphalt).
- pydantic model flight_radar.models.airport.Timezone¶
Bases:
BaseModel
Show JSON schema
{ "title": "Timezone", "type": "object", "properties": { "name": { "description": "Name of the timezone", "title": "Name", "type": "string" }, "offset": { "description": "Offset from UTC in seconds", "title": "Offset", "type": "integer" } }, "required": [ "name", "offset" ] }
- Fields:
-
field name:
str
[Required]¶ Name of the timezone
-
field offset:
int
[Required]¶ Offset from UTC in seconds
- class flight_radar.models.airport.Country(**data)¶
- Parameters:
code (str)
name (str)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class flight_radar.models.airport.Timezone(**data)¶
- Parameters:
name (str)
offset (int)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class flight_radar.models.airport.Surface(**data)¶
- Parameters:
type (str)
description (str)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class flight_radar.models.airport.Runway(**data)¶
- Parameters:
designator (str)
heading (float)
length (int)
width (int)
elevation (int)
thr_coordinates (tuple[float, float])
surface (Surface)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class flight_radar.models.airport.AirportLight(**data)¶
- Parameters:
icao (str)
name (str | None)
iata (str | None)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].