Types
types
¤
Modules:
Name | Description |
---|---|
airport_list |
|
authentication |
|
cache |
|
common |
|
find |
|
flight_list |
|
fr24 |
|
playback |
|
static |
|
Functions:
Name | Description |
---|---|
overwrite_args_signature_from |
Override the argument signature of some target callable with that of an |
Attributes:
Name | Type | Description |
---|---|---|
T |
origin return type |
|
P |
origin parameter type |
|
S |
Extra |
|
R |
Actual return type |
overwrite_args_signature_from
¤
overwrite_args_signature_from(
_origin: Callable[P, T],
) -> Callable[
[Callable[Concatenate[S, ...], R]],
Callable[Concatenate[S, P], R],
]
Override the argument signature of some target callable with that of an
origin
callable. Keeps the target return type intact.
Examples¤
>>> from typing import Any
>>> from fr24.types import overwrite_args_signature_from
>>> def foo(a: int, b: int) -> float:
... ...
>>> @overwrite_args_signature_from(foo)
... def bar(args: Any, kwargs: Any) -> str:
... return str(foo(*args, **kwargs))
>>> # IDEs will now show `bar` as having signature
>>> # `Callable[[int, int], str]`
airport_list
¤
Classes:
Name | Description |
---|---|
Schedule |
|
PluginSetting |
|
AirportSchedule |
|
AirportPluginData |
|
AirportListData |
|
AirportResponse |
|
AirportResult |
|
AirportList |
|
Attributes:
Name | Type | Description |
---|---|---|
Plugin |
|
|
AirportRequest |
|
Plugin
module-attribute
¤
Plugin = Literal[
"details",
"runways",
"schedule",
"satelliteImage",
"scheduledRoutesStatistics",
"weather",
]
AirportRequest
module-attribute
¤
AirportRequest = TypedDict(
"AirportRequest",
{
"callback": None,
"code": str,
"device": Optional[str],
"fleet": Optional[str],
"format": Literal["json"],
"limit": int,
"page": int,
"pk": None,
"plugin": list[Plugin],
"plugin[]": list[Plugin],
"plugin-setting": PluginSetting,
"plugin-setting[schedule][mode]": str,
"plugin-setting[schedule][timestamp]": int,
"token": Optional[str],
},
total=False,
)
Schedule
¤
PluginSetting
¤
AirportSchedule
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
arrivals |
FlightListResponse
|
|
departures |
FlightListResponse
|
|
AirportPluginData
¤
AirportListData
¤
AirportResponse
¤
AirportResult
¤
AirportList
¤
authentication
¤
Classes:
Name | Description |
---|---|
User |
|
Features |
|
UserData |
|
Authentication |
|
UsernamePassword |
|
TokenSubscriptionKey |
|
User
¤
Features
¤
Bases: TypedDict
UserData
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
accessToken |
None | str
|
|
accountType |
str
|
|
countryCode |
None | str
|
|
dateExpires |
int
|
|
dateLastLogin |
str
|
|
features |
Features
|
|
hasConsented |
bool
|
|
hasPassword |
bool
|
|
idUser |
int
|
|
identity |
str
|
|
isActive |
bool
|
|
isAnonymousAccount |
bool
|
|
isLoggedIn |
bool
|
|
localeCode |
str
|
|
name |
None
|
|
oAuth |
None
|
|
oAuthType |
None
|
|
publicKey |
None
|
|
subscriptionKey |
None | str
|
|
tokenLogin |
str
|
|
typeSource |
str
|
|
Authentication
¤
UsernamePassword
¤
cache
¤
Classes:
Name | Description |
---|---|
DType |
A newtype for annotating types in TypedDicts. |
FlightListRecord |
|
PlaybackTrackEMSRecord |
|
PlaybackTrackRecord |
|
RecentPositionRecord |
|
FlightRecord |
|
NearbyFlightRecord |
|
LiveFlightStatusRecord |
|
TopFlightRecord |
|
EMSRecord |
|
TrailPointRecord |
|
FlightDetailsRecord |
|
PlaybackFlightRecord |
|
Functions:
Name | Description |
---|---|
to_schema |
Generate a polars schema from a TypedDict. |
Attributes:
playback_track_ems_schema
module-attribute
¤
playback_track_ems_schema = to_schema(
PlaybackTrackEMSRecord
)
position_buffer_struct_schema
module-attribute
¤
position_buffer_struct_schema = to_schema(
RecentPositionRecord
)
live_flights_status_schema
module-attribute
¤
live_flights_status_schema = to_schema(
LiveFlightStatusRecord
)
DType
dataclass
¤
DType(type_: DataType)
A newtype for annotating types in TypedDicts.
Methods:
Name | Description |
---|---|
__post_init__ |
|
Attributes:
Name | Type | Description |
---|---|---|
type_ |
DataType
|
|
FlightListRecord
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
flight_id |
Annotated[int | None, DType(UInt64())]
|
|
number |
Annotated[str | None, DType(String())]
|
|
callsign |
Annotated[str | None, DType(String())]
|
|
icao24 |
Annotated[int | None, DType(UInt32())]
|
|
registration |
Annotated[str | None, DType(String())]
|
|
typecode |
Annotated[str, DType(String())]
|
|
origin |
Annotated[str | None, DType(String())]
|
|
destination |
Annotated[str | None, DType(String())]
|
|
status |
Annotated[str | None, DType(String())]
|
|
STOD |
Annotated[int | None, DType(Datetime('ms', time_zone='UTC'))]
|
|
ETOD |
Annotated[int | None, DType(Datetime('ms', time_zone='UTC'))]
|
|
ATOD |
Annotated[int | None, DType(Datetime('ms', time_zone='UTC'))]
|
|
STOA |
Annotated[int | None, DType(Datetime('ms', time_zone='UTC'))]
|
|
ETOA |
Annotated[int | None, DType(Datetime('ms', time_zone='UTC'))]
|
|
ATOA |
Annotated[int | None, DType(Datetime('ms', time_zone='UTC'))]
|
|
PlaybackTrackEMSRecord
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
timestamp |
Annotated[int, DType(UInt32())]
|
|
ias |
Annotated[int | None, DType(Int16())]
|
|
tas |
Annotated[int | None, DType(Int16())]
|
|
mach |
Annotated[int | None, DType(Int16())]
|
|
mcp |
Annotated[int | None, DType(Int32())]
|
|
fms |
Annotated[int | None, DType(Int32())]
|
|
autopilot |
Annotated[int | None, DType(Int8())]
|
|
oat |
Annotated[int | None, DType(Int8())]
|
|
track |
Annotated[float | None, DType(Float32())]
|
|
roll |
Annotated[float | None, DType(Float32())]
|
|
qnh |
Annotated[int | None, DType(UInt16())]
|
|
wind_dir |
Annotated[int | None, DType(Int16())]
|
|
wind_speed |
Annotated[int | None, DType(Int16())]
|
|
precision |
Annotated[int | None, DType(UInt8())]
|
|
altitude_gps |
Annotated[int | None, DType(Int32())]
|
|
emergency |
Annotated[int | None, DType(UInt8())]
|
|
tcas_acas |
Annotated[int | None, DType(UInt8())]
|
|
heading |
Annotated[int | None, DType(UInt16())]
|
|
PlaybackTrackRecord
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
timestamp |
Annotated[int, DType(UInt32())]
|
|
latitude |
Annotated[float, DType(Float32())]
|
|
longitude |
Annotated[float, DType(Float32())]
|
|
altitude |
Annotated[int, DType(Int32())]
|
|
ground_speed |
Annotated[int, DType(Int16())]
|
|
vertical_speed |
Annotated[int | None, DType(Int16())]
|
|
track |
Annotated[int, DType(Int16())]
|
|
squawk |
Annotated[int, DType(UInt16())]
|
|
ems |
Annotated[None | PlaybackTrackEMSRecord, DType(Struct(playback_track_ems_schema))]
|
|
ems
instance-attribute
¤
ems: Annotated[
None | PlaybackTrackEMSRecord,
DType(Struct(playback_track_ems_schema)),
]
RecentPositionRecord
¤
FlightRecord
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
timestamp |
Annotated[int, DType(UInt32())]
|
|
flightid |
Annotated[int, DType(UInt32())]
|
|
latitude |
Annotated[float, DType(Float32())]
|
|
longitude |
Annotated[float, DType(Float32())]
|
|
track |
Annotated[int, DType(UInt16())]
|
|
altitude |
Annotated[int, DType(Int32())]
|
|
ground_speed |
Annotated[int, DType(Int16())]
|
|
on_ground |
Annotated[bool, DType(Boolean())]
|
|
callsign |
Annotated[str, DType(String())]
|
|
source |
Annotated[int, DType(UInt8())]
|
|
registration |
Annotated[str, DType(String())]
|
|
origin |
Annotated[str, DType(String())]
|
|
destination |
Annotated[str, DType(String())]
|
|
typecode |
Annotated[str, DType(String())]
|
|
eta |
Annotated[int, DType(UInt32())]
|
|
squawk |
Annotated[int, DType(UInt16())]
|
|
vertical_speed |
Annotated[int | None, DType(Int16())]
|
|
position_buffer |
Annotated[list[RecentPositionRecord], DType(List(Struct(position_buffer_struct_schema)))]
|
|
position_buffer
instance-attribute
¤
position_buffer: Annotated[
list[RecentPositionRecord],
DType(List(Struct(position_buffer_struct_schema))),
]
NearbyFlightRecord
¤
Bases: FlightRecord
Attributes:
Name | Type | Description |
---|---|---|
distance |
Annotated[int, DType(UInt32())]
|
|
timestamp |
Annotated[int, DType(UInt32())]
|
|
flightid |
Annotated[int, DType(UInt32())]
|
|
latitude |
Annotated[float, DType(Float32())]
|
|
longitude |
Annotated[float, DType(Float32())]
|
|
track |
Annotated[int, DType(UInt16())]
|
|
altitude |
Annotated[int, DType(Int32())]
|
|
ground_speed |
Annotated[int, DType(Int16())]
|
|
on_ground |
Annotated[bool, DType(Boolean())]
|
|
callsign |
Annotated[str, DType(String())]
|
|
source |
Annotated[int, DType(UInt8())]
|
|
registration |
Annotated[str, DType(String())]
|
|
origin |
Annotated[str, DType(String())]
|
|
destination |
Annotated[str, DType(String())]
|
|
typecode |
Annotated[str, DType(String())]
|
|
eta |
Annotated[int, DType(UInt32())]
|
|
squawk |
Annotated[int, DType(UInt16())]
|
|
vertical_speed |
Annotated[int | None, DType(Int16())]
|
|
position_buffer |
Annotated[list[RecentPositionRecord], DType(List(Struct(position_buffer_struct_schema)))]
|
|
position_buffer
instance-attribute
¤
position_buffer: Annotated[
list[RecentPositionRecord],
DType(List(Struct(position_buffer_struct_schema))),
]
LiveFlightStatusRecord
¤
TopFlightRecord
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
flight_id |
Annotated[int, DType(UInt32())]
|
|
live_clicks |
Annotated[int, DType(UInt32())]
|
|
total_clicks |
Annotated[int, DType(UInt32())]
|
|
flight_number |
Annotated[str, DType(String())]
|
|
callsign |
Annotated[str, DType(String())]
|
|
squawk |
Annotated[int, DType(UInt16())]
|
|
from_iata |
Annotated[str, DType(String())]
|
|
from_city |
Annotated[str, DType(String())]
|
|
to_iata |
Annotated[str, DType(String())]
|
|
to_city |
Annotated[str, DType(String())]
|
|
type |
Annotated[str, DType(String())]
|
|
full_description |
Annotated[str, DType(String())]
|
|
EMSRecord
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
ias |
Annotated[int | None, DType(Int16())]
|
|
tas |
Annotated[int | None, DType(Int16())]
|
|
mach |
Annotated[int | None, DType(Int16())]
|
|
mcp |
Annotated[int | None, DType(Int32())]
|
|
fms |
Annotated[int | None, DType(Int32())]
|
|
oat |
Annotated[int | None, DType(Int8())]
|
|
qnh |
Annotated[int | None, DType(UInt16())]
|
|
wind_dir |
Annotated[int | None, DType(Int16())]
|
|
wind_speed |
Annotated[int | None, DType(Int16())]
|
|
altitude_gps |
Annotated[int | None, DType(Int32())]
|
|
agpsdiff |
Annotated[int | None, DType(Int32())]
|
|
apflags |
Annotated[int | None, DType(Int32())]
|
|
rs |
Annotated[int | None, DType(Int32())]
|
|
TrailPointRecord
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
timestamp |
Annotated[int, DType(UInt32())]
|
|
latitude |
Annotated[float, DType(Float32())]
|
|
longitude |
Annotated[float, DType(Float32())]
|
|
altitude |
Annotated[int | None, DType(Int32())]
|
|
ground_speed |
Annotated[int | None, DType(Int16())]
|
|
track |
Annotated[int | None, DType(UInt16())]
|
|
vertical_speed |
Annotated[int | None, DType(Int16())]
|
|
FlightDetailsRecord
¤
Bases: TypedDict
, _AircraftRecord
, _ScheduleRecord
, _FlightProgressRecord
, _FlightInfoRecord
, _FlightTrailRecord
Attributes:
flight_trail_list
instance-attribute
¤
flight_trail_list: Annotated[
None | list[TrailPointRecord],
DType(List(Struct(trail_point_schema))),
]
PlaybackFlightRecord
¤
Bases: TypedDict
, _AircraftRecord
, _ScheduleRecord
, _FlightInfoRecord
, _FlightTrailRecord
Attributes:
flight_trail_list
instance-attribute
¤
flight_trail_list: Annotated[
None | list[TrailPointRecord],
DType(List(Struct(trail_point_schema))),
]
common
¤
Classes:
Name | Description |
---|---|
APIResult |
|
FlightNumber |
|
AircraftModel |
|
AircraftAge |
|
AircraftAvailability |
|
StatusData |
|
OwnerData |
|
AirlineData |
|
Airport |
|
AirportPairData |
|
ImageCollection |
|
APIResult
¤
FlightNumber
¤
AircraftModel
¤
AircraftAge
¤
AircraftAvailability
¤
StatusData
¤
OwnerData
¤
AirlineData
¤
Airport
¤
find
¤
Classes:
Name | Description |
---|---|
Live |
|
Airport |
|
Operator |
|
Schedule |
|
Aircraft |
|
EntryBase |
|
AirportEntry |
|
OperatorEntry |
|
LiveEntry |
|
ScheduleEntry |
|
AircraftEntry |
|
StatsEntry |
|
Stats |
|
Find |
|
Functions:
Name | Description |
---|---|
is_airport |
|
is_operator |
|
is_live |
|
is_schedule |
|
is_aircraft |
|
Attributes:
Name | Type | Description |
---|---|---|
Iata |
|
|
Icao |
|
|
Entry |
|
Entry
module-attribute
¤
Entry = Union[
AirportEntry,
OperatorEntry,
LiveEntry,
ScheduleEntry,
AircraftEntry,
]
Live
¤
Airport
¤
Operator
¤
Schedule
¤
Aircraft
¤
EntryBase
¤
AirportEntry
¤
OperatorEntry
¤
LiveEntry
¤
ScheduleEntry
¤
AircraftEntry
¤
StatsEntry
¤
Stats
¤
Find
¤
flight_list
¤
Classes:
Attributes:
Name | Type | Description |
---|---|---|
FLIGHT_LIST_EMPTY |
FlightList
|
An object with no flight list data, for use as a default value. |
FLIGHT_LIST_EMPTY
module-attribute
¤
FLIGHT_LIST_EMPTY: FlightList = {
"result": {
"request": {
"fetchBy": "flight",
"format": "json",
"limit": 0,
"page": 0,
"query": "",
"timestamp": 0,
},
"response": {
"item": {
"current": 0,
"total": None,
"limit": 0,
},
"page": {
"current": 0,
"more": False,
"total": None,
},
"timestamp": 0,
"data": None,
"aircraftInfo": {
"model": {"code": "", "text": ""},
"registration": None,
"country": None,
"hex": None,
"restricted": False,
"serialNo": None,
"age": {"availability": False},
"availability": {
"serialNo": False,
"age": False,
},
},
"aircraftImages": [],
},
},
"_api": {"copyright": "", "legalNotice": ""},
}
An object with no flight list data, for use as a default value.
FlightListRequest
¤
Item
¤
Page
¤
Identification
¤
FlightListCountry
¤
AircraftInfo
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
model |
AircraftModel
|
|
registration |
None | str
|
|
owner |
NotRequired[OwnerData]
|
|
airline |
NotRequired[AirlineData]
|
|
country |
None | FlightListCountry
|
|
hex |
None | str
|
|
restricted |
bool
|
|
serialNo |
None | str
|
|
age |
AircraftAge
|
|
availability |
AircraftAvailability
|
|
Interval
¤
TimeOther
¤
FlightListTime
¤
FlightListItem
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
identification |
Identification
|
|
status |
StatusData
|
|
aircraft |
AircraftInfo
|
|
owner |
OwnerData
|
|
airline |
AirlineData
|
|
airport |
AirportPairData
|
|
time |
FlightListTime
|
|
AircraftImage
¤
FlightListResponse
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
item |
Item
|
|
page |
Page
|
|
timestamp |
int
|
|
data |
list[FlightListItem] | None
|
|
aircraftInfo |
AircraftInfo
|
|
aircraftImages |
list[AircraftImage]
|
|
FlightListResult
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
request |
FlightListRequest
|
|
response |
FlightListResponse
|
|
FlightList
¤
fr24
¤
Attributes:
Name | Type | Description |
---|---|---|
LiveFeedFieldAuthenticated |
|
|
LiveFeedField |
|
LiveFeedFieldAuthenticated
module-attribute
¤
LiveFeedFieldAuthenticated = Literal[
"squawk", "vspeed", "airspace", "logo_id", "age"
]
LiveFeedField
module-attribute
¤
LiveFeedField = Literal[
"flight",
"reg",
"route",
"type",
LiveFeedFieldAuthenticated,
]
playback
¤
Classes:
PlaybackRequest
¤
FlightIdentification
¤
AircraftIdentification
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
modes |
str
|
|
registration |
str
|
|
serialNo |
None | str
|
|
age |
NotRequired[AircraftAge]
|
|
availability |
NotRequired[AircraftAvailability]
|
|
AircraftData
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
model |
AircraftModel
|
|
identification |
AircraftIdentification
|
|
availability |
AircraftAvailability
|
|
Median
¤
Altitude
¤
Speed
¤
VerticalSpeed
¤
EMS
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
ts |
int
|
|
ias |
int | None
|
|
tas |
int | None
|
|
mach |
int | None
|
|
mcp |
int | None
|
|
fms |
int | None
|
|
autopilot |
None
|
|
oat |
int | None
|
|
trueTrack |
float | None
|
|
rollAngle |
float | None
|
|
qnh |
None
|
|
windDir |
int | None
|
|
windSpd |
int | None
|
|
precision |
int | None
|
|
altGPS |
int | None
|
|
emergencyStatus |
int | None
|
|
tcasAcasDtatus |
int | None
|
|
heading |
int | None
|
|
TrackData
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
latitude |
float
|
|
longitude |
float
|
|
altitude |
Altitude
|
|
speed |
Speed
|
|
verticalSpeed |
VerticalSpeed
|
|
heading |
int
|
Warning |
squawk |
str
|
|
timestamp |
int
|
|
ems |
None | EMS
|
|
heading
instance-attribute
¤
heading: int
Warning
The JSON response claims that heading
is available, but ADS-B only
transmits the ground track.
Heading
is only available in EMS data.
This field is renamed to track
to avoid confusion in
fr24.json.playback_track_dict.
FlightDataAvailability
¤
FlightData
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
identification |
FlightIdentification
|
|
status |
StatusData
|
|
aircraft |
AircraftData | None
|
|
owner |
OwnerData | None
|
|
airline |
AirlineData | None
|
|
airport |
AirportPairData
|
|
median |
Median
|
|
track |
list[TrackData]
|
|
aircraftImages |
ImageCollection
|
|
availability |
FlightDataAvailability
|
|
PlaybackData
¤
PlaybackResponse
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
timestamp |
int
|
|
altitudeFiltered |
bool
|
|
data |
PlaybackData
|
|
PlaybackResult
¤
Bases: TypedDict
Attributes:
Name | Type | Description |
---|---|---|
request |
PlaybackRequest
|
|
response |
PlaybackResponse
|
|
Playback
¤
static
¤
Classes:
Name | Description |
---|---|
Model |
|
AircraftFamilyRow |
|
AircraftFamily |
|
Airline |
|
Airlines |
|
Timezone |
|
Airport |
|
Airports |
|
CountryName |
|
CountryCode |
|
Country |
|
Metadata |
|
Countries |
|
Attributes:
Name | Type | Description |
---|---|---|
StaticData |
|