Historic Flight Event Models¶
- pydantic model flight_radar.models.historic_flight_event.HistoricFlightEvent¶
Bases:
BaseModel
Show JSON schema
{ "title": "HistoricFlightEvent", "type": "object", "properties": { "type": { "$ref": "#/$defs/HistoricFlightEventTypes", "description": "Type of the event (e.g., gate_departure, takeoff, cruising)." }, "timestamp": { "description": "Time of the event in UTC.", "format": "date-time", "title": "Timestamp", "type": "string" }, "lat": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Latitude at the time of the event.", "title": "Lat" }, "lon": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Longitude at the time of the event.", "title": "Lon" }, "alt": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Altitude at the time of the event.", "title": "Alt" }, "gspeed": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Ground speed at the time of the event.", "title": "Gspeed" }, "details": { "anyOf": [ { "$ref": "#/$defs/HistoricFlightEventDetails" }, { "type": "null" } ], "default": null, "description": "Additional context depending on the event type." } }, "$defs": { "HistoricFlightEventDetails": { "properties": { "gate_ident": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Gate identifier.", "title": "Gate Ident" }, "gate_lat": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Latitude of the gate.", "title": "Gate Lat" }, "gate_lon": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Longitude of the gate.", "title": "Gate Lon" }, "takeoff_runway": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Runway used during takeoff.", "title": "Takeoff Runway" }, "landed_icao": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ICAO code of the destination airport.", "title": "Landed Icao" }, "landed_runway": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Runway used during landing.", "title": "Landed Runway" }, "exited_airspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the airspace exited.", "title": "Exited Airspace" }, "exited_airspace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ID of the airspace exited.", "title": "Exited Airspace Id" }, "entered_airspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the airspace entered.", "title": "Entered Airspace" }, "entered_airspace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ID of the airspace entered.", "title": "Entered Airspace Id" } }, "title": "HistoricFlightEventDetails", "type": "object" }, "HistoricFlightEventTypes": { "enum": [ "all", "gate_departure", "takeoff", "cruising", "airspace_transition", "descent", "landed", "gate_arrival" ], "title": "HistoricFlightEventTypes", "type": "string" } }, "required": [ "type", "timestamp" ] }
- Fields:
-
field alt:
int
|None
= None¶ Altitude at the time of the event.
-
field details:
HistoricFlightEventDetails
|None
= None¶ Additional context depending on the event type.
-
field gspeed:
int
|None
= None¶ Ground speed at the time of the event.
-
field lat:
float
|None
= None¶ Latitude at the time of the event.
-
field lon:
float
|None
= None¶ Longitude at the time of the event.
-
field timestamp:
datetime
[Required]¶ Time of the event in UTC.
-
field type:
HistoricFlightEventTypes
[Required]¶ Type of the event (e.g., gate_departure, takeoff, cruising).
- static from_dto(dto)¶
- Return type:
- Parameters:
dto (HistoricFlightEventDto)
- pydantic model flight_radar.models.historic_flight_event.HistoricFlightEventDetails¶
Bases:
BaseModel
Show JSON schema
{ "title": "HistoricFlightEventDetails", "type": "object", "properties": { "gate_ident": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Gate identifier.", "title": "Gate Ident" }, "gate_lat": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Latitude of the gate.", "title": "Gate Lat" }, "gate_lon": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Longitude of the gate.", "title": "Gate Lon" }, "takeoff_runway": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Runway used during takeoff.", "title": "Takeoff Runway" }, "landed_icao": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ICAO code of the destination airport.", "title": "Landed Icao" }, "landed_runway": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Runway used during landing.", "title": "Landed Runway" }, "exited_airspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the airspace exited.", "title": "Exited Airspace" }, "exited_airspace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ID of the airspace exited.", "title": "Exited Airspace Id" }, "entered_airspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the airspace entered.", "title": "Entered Airspace" }, "entered_airspace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ID of the airspace entered.", "title": "Entered Airspace Id" } } }
- Fields:
-
field entered_airspace:
str
|None
= None¶ Name of the airspace entered.
-
field entered_airspace_id:
str
|None
= None¶ ID of the airspace entered.
-
field exited_airspace:
str
|None
= None¶ Name of the airspace exited.
-
field exited_airspace_id:
str
|None
= None¶ ID of the airspace exited.
-
field gate_ident:
str
|None
= None¶ Gate identifier.
-
field gate_lat:
float
|None
= None¶ Latitude of the gate.
-
field gate_lon:
float
|None
= None¶ Longitude of the gate.
-
field landed_icao:
str
|None
= None¶ ICAO code of the destination airport.
-
field landed_runway:
str
|None
= None¶ Runway used during landing.
-
field takeoff_runway:
str
|None
= None¶ Runway used during takeoff.
- static from_dto(dto)¶
- Return type:
- Parameters:
dto (HistoricFlightEventDetailsDto)
- pydantic model flight_radar.models.historic_flight_event.HistoricFlightEventLightResponseEntry¶
Bases:
BaseModel
Show JSON schema
{ "title": "HistoricFlightEventLightResponseEntry", "type": "object", "properties": { "fr24_id": { "description": "Unique identifier for the flight.", "title": "Fr24 Id", "type": "string" }, "callsign": { "description": "Flight number or callsign.", "title": "Callsign", "type": "string" }, "hex": { "description": "Aircraft hex code.", "title": "Hex", "type": "string" }, "events": { "description": "List of events associated with the flight.", "items": { "$ref": "#/$defs/HistoricFlightEvent" }, "title": "Events", "type": "array" } }, "$defs": { "HistoricFlightEvent": { "properties": { "type": { "$ref": "#/$defs/HistoricFlightEventTypes", "description": "Type of the event (e.g., gate_departure, takeoff, cruising)." }, "timestamp": { "description": "Time of the event in UTC.", "format": "date-time", "title": "Timestamp", "type": "string" }, "lat": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Latitude at the time of the event.", "title": "Lat" }, "lon": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Longitude at the time of the event.", "title": "Lon" }, "alt": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Altitude at the time of the event.", "title": "Alt" }, "gspeed": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Ground speed at the time of the event.", "title": "Gspeed" }, "details": { "anyOf": [ { "$ref": "#/$defs/HistoricFlightEventDetails" }, { "type": "null" } ], "default": null, "description": "Additional context depending on the event type." } }, "required": [ "type", "timestamp" ], "title": "HistoricFlightEvent", "type": "object" }, "HistoricFlightEventDetails": { "properties": { "gate_ident": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Gate identifier.", "title": "Gate Ident" }, "gate_lat": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Latitude of the gate.", "title": "Gate Lat" }, "gate_lon": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Longitude of the gate.", "title": "Gate Lon" }, "takeoff_runway": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Runway used during takeoff.", "title": "Takeoff Runway" }, "landed_icao": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ICAO code of the destination airport.", "title": "Landed Icao" }, "landed_runway": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Runway used during landing.", "title": "Landed Runway" }, "exited_airspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the airspace exited.", "title": "Exited Airspace" }, "exited_airspace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ID of the airspace exited.", "title": "Exited Airspace Id" }, "entered_airspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the airspace entered.", "title": "Entered Airspace" }, "entered_airspace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ID of the airspace entered.", "title": "Entered Airspace Id" } }, "title": "HistoricFlightEventDetails", "type": "object" }, "HistoricFlightEventTypes": { "enum": [ "all", "gate_departure", "takeoff", "cruising", "airspace_transition", "descent", "landed", "gate_arrival" ], "title": "HistoricFlightEventTypes", "type": "string" } }, "required": [ "fr24_id", "callsign", "hex", "events" ] }
- Fields:
-
field callsign:
str
[Required]¶ Flight number or callsign.
-
field events:
list
[HistoricFlightEvent
] [Required]¶ List of events associated with the flight.
-
field fr24_id:
str
[Required]¶ Unique identifier for the flight.
-
field hex:
str
[Required]¶ Aircraft hex code.
- static from_dto(dto)¶
- Return type:
- Parameters:
dto (HistoricFlightEventBaseResponseDto)
- pydantic model flight_radar.models.historic_flight_event.HistoricFlightEventRequest¶
Bases:
BaseModel
Show JSON schema
{ "title": "HistoricFlightEventRequest", "type": "object", "properties": { "flight_ids": { "description": "List of fr24_ids (maximum 15 IDs). Cannot be combined with event_datetime.", "items": { "type": "string" }, "maxItems": 15, "title": "Flight Ids", "type": "array" }, "event_types": { "anyOf": [ { "items": { "$ref": "#/$defs/HistoricFlightEventTypes" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Event types to filter by", "title": "Event Types" } }, "$defs": { "HistoricFlightEventTypes": { "enum": [ "all", "gate_departure", "takeoff", "cruising", "airspace_transition", "descent", "landed", "gate_arrival" ], "title": "HistoricFlightEventTypes", "type": "string" } }, "required": [ "flight_ids" ] }
- Fields:
-
field event_types:
Optional
[List
[HistoricFlightEventTypes
]] = None¶ Event types to filter by
-
field flight_ids:
Annotated
[List
[str
]] [Required]¶ List of fr24_ids (maximum 15 IDs). Cannot be combined with event_datetime.
- Constraints:
max_length = 15
- to_dto()¶
- Return type:
HistoricFlightEventRequestDto
- pydantic model flight_radar.models.historic_flight_event.HistoricFlightEventResponseEntry¶
Bases:
HistoricFlightEventLightResponseEntry
Show JSON schema
{ "title": "HistoricFlightEventResponseEntry", "type": "object", "properties": { "fr24_id": { "description": "Unique identifier for the flight.", "title": "Fr24 Id", "type": "string" }, "callsign": { "description": "Flight number or callsign.", "title": "Callsign", "type": "string" }, "hex": { "description": "Aircraft hex code.", "title": "Hex", "type": "string" }, "events": { "description": "List of events associated with the flight.", "items": { "$ref": "#/$defs/HistoricFlightEvent" }, "title": "Events", "type": "array" }, "painted_as": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The airline or operator the flight is painted as.", "title": "Painted As" }, "operating_as": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The airline or operator actually operating the flight.", "title": "Operating As" }, "orig_icao": { "description": "ICAO code for the origin airport.", "title": "Orig Icao", "type": "string" }, "orig_iata": { "description": "IATA code for the origin airport.", "title": "Orig Iata", "type": "string" }, "dest_iata": { "description": "IATA code for the destination airport.", "title": "Dest Iata", "type": "string" }, "dest_icao": { "description": "ICAO code for the destination airport.", "title": "Dest Icao", "type": "string" } }, "$defs": { "HistoricFlightEvent": { "properties": { "type": { "$ref": "#/$defs/HistoricFlightEventTypes", "description": "Type of the event (e.g., gate_departure, takeoff, cruising)." }, "timestamp": { "description": "Time of the event in UTC.", "format": "date-time", "title": "Timestamp", "type": "string" }, "lat": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Latitude at the time of the event.", "title": "Lat" }, "lon": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Longitude at the time of the event.", "title": "Lon" }, "alt": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Altitude at the time of the event.", "title": "Alt" }, "gspeed": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Ground speed at the time of the event.", "title": "Gspeed" }, "details": { "anyOf": [ { "$ref": "#/$defs/HistoricFlightEventDetails" }, { "type": "null" } ], "default": null, "description": "Additional context depending on the event type." } }, "required": [ "type", "timestamp" ], "title": "HistoricFlightEvent", "type": "object" }, "HistoricFlightEventDetails": { "properties": { "gate_ident": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Gate identifier.", "title": "Gate Ident" }, "gate_lat": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Latitude of the gate.", "title": "Gate Lat" }, "gate_lon": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Longitude of the gate.", "title": "Gate Lon" }, "takeoff_runway": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Runway used during takeoff.", "title": "Takeoff Runway" }, "landed_icao": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ICAO code of the destination airport.", "title": "Landed Icao" }, "landed_runway": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Runway used during landing.", "title": "Landed Runway" }, "exited_airspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the airspace exited.", "title": "Exited Airspace" }, "exited_airspace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ID of the airspace exited.", "title": "Exited Airspace Id" }, "entered_airspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the airspace entered.", "title": "Entered Airspace" }, "entered_airspace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ID of the airspace entered.", "title": "Entered Airspace Id" } }, "title": "HistoricFlightEventDetails", "type": "object" }, "HistoricFlightEventTypes": { "enum": [ "all", "gate_departure", "takeoff", "cruising", "airspace_transition", "descent", "landed", "gate_arrival" ], "title": "HistoricFlightEventTypes", "type": "string" } }, "required": [ "fr24_id", "callsign", "hex", "events", "orig_icao", "orig_iata", "dest_iata", "dest_icao" ] }
- Fields:
-
field dest_iata:
str
[Required]¶ IATA code for the destination airport.
-
field dest_icao:
str
[Required]¶ ICAO code for the destination airport.
-
field operating_as:
str
|None
= None¶ The airline or operator actually operating the flight.
-
field orig_iata:
str
[Required]¶ IATA code for the origin airport.
-
field orig_icao:
str
[Required]¶ ICAO code for the origin airport.
-
field painted_as:
str
|None
= None¶ The airline or operator the flight is painted as.
- static from_dto(dto)¶
- Return type:
- Parameters:
dto (HistoricFlightEventResponseEntryDto)
- class flight_radar.models.historic_flight_event.HistoricFlightEventRequest(**data)¶
- Parameters:
flight_ids (Annotated[List[str], MaxLen(max_length=15)])
event_types (List[HistoricFlightEventTypes] | None)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class flight_radar.models.historic_flight_event.HistoricFlightEventDetails(**data)¶
- Parameters:
gate_ident (str | None)
gate_lat (float | None)
gate_lon (float | None)
takeoff_runway (str | None)
landed_icao (str | None)
landed_runway (str | None)
exited_airspace (str | None)
exited_airspace_id (str | None)
entered_airspace (str | None)
entered_airspace_id (str | None)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class flight_radar.models.historic_flight_event.HistoricFlightEvent(**data)¶
- Parameters:
type (HistoricFlightEventTypes)
timestamp (datetime)
lat (float | None)
lon (float | None)
alt (int | None)
gspeed (int | None)
details (HistoricFlightEventDetails | None)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class flight_radar.models.historic_flight_event.HistoricFlightEventLightResponseEntry(**data)¶
- Parameters:
fr24_id (str)
callsign (str)
hex (str)
events (list[HistoricFlightEvent])
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class flight_radar.models.historic_flight_event.HistoricFlightEventResponseEntry(**data)¶
- Parameters:
fr24_id (str)
callsign (str)
hex (str)
events (list[HistoricFlightEvent])
painted_as (str | None)
operating_as (str | None)
orig_icao (str)
orig_iata (str)
dest_iata (str)
dest_icao (str)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].