Cache
cache
¤
A simple file-based cache.
Classes:
Name | Description |
---|---|
FR24Cache |
|
FlightListBy |
|
Collection |
A directory containing scannable files. |
File |
|
Attributes:
Name | Type | Description |
---|---|---|
PATH_CACHE |
|
|
Ident |
TypeAlias
|
The identifier for the cached file. |
FR24Cache
¤
flight_list/{kind}/{ident}
playback/{flight_id}
feed/{timestamp}
nearest_flights/{lon}_{lat}_{timestamp}
live_flights_status/{timestamp}
top_flights/{timestamp}
flight_details/{flight_id}_{timestamp}
playback_flight/{flight_id}_{timestamp}
Methods:
Name | Description |
---|---|
default |
Create a cache in the default directory. |
Attributes:
Name | Type | Description |
---|---|---|
path |
|
|
flight_list |
|
|
playback |
|
|
live_feed |
|
|
nearest_flights |
|
|
live_flights_status |
|
|
top_flights |
|
|
flight_details |
|
|
playback_flight |
|
flight_list
instance-attribute
¤
flight_list = FlightListBy(
reg=Collection(flight_list_dir / "reg"),
flight=Collection(flight_list_dir / "flight"),
)
live_flights_status
instance-attribute
¤
live_flights_status = Collection(
path / "live_flights_status"
)
FlightListBy
dataclass
¤
FlightListBy(reg: Collection, flight: Collection)
Methods:
Name | Description |
---|---|
__call__ |
|
Attributes:
Name | Type | Description |
---|---|---|
reg |
Collection
|
Collection of flight lists by registration number. |
flight |
Collection
|
Collection of flight lists by flight number. |
Collection
dataclass
¤
Collection(path: Path)
A directory containing scannable files.
Methods:
Name | Description |
---|---|
glob |
Iterate over this collection and yield all scannable files matching |
scan_table |
Lazily load a file from this collection. |
new_bare_path |
Returns the bare path (without the file extension) to the file in this |
Attributes:
Name | Type | Description |
---|---|---|
path |
Path
|
|
glob
¤
Iterate over this collection and yield all scannable files matching the given relative pattern.
scan_table
¤
scan_table(
ident: File | Path | Ident,
*,
format: SupportedFormats = "parquet",
) -> LazyFrame
Lazily load a file from this collection.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ident
|
File | Path | Ident
|
The path to the file to scan, or the identifier of the record in the collection: - |
required |
File
¤
Bases: Path
Methods:
Name | Description |
---|---|
scan |
Lazily load this file. |
Attributes:
Name | Type | Description |
---|---|---|
format |
SupportedFormats
|
|