skytracker.models.aircraft.AircraftModel#
- class skytracker.models.aircraft.AircraftModel(*, type_iata: str | None, type_iata_code_short: str, type_iata_code_long: str, engine_count: int | None, engine_type: AircraftEngineType, model_code: str | None, line_number: str | None, serial_number: str | None, family: str | None, sub_family: str | None, series: str | None, classification: AircraftClassification)#
Bases:
BaseModelAircraft model data
Properties
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
aircraft type IATA designation
aircraft type IATA code (short)
aircraft type IATA code (long)
number of engines on aircraft
type of engines on aircraft
aircraft model code (manufacturer)
aircraft line number (manufacturer)
aircraft serial number (manufacturer)
aircraft family (manufacturer)
aircraft sub-family (manufacturer)
aircraft series/variant (manufacturer)
aircraft classification
Methods
Parse classification value
Parse engine type value
Serialize classification
Serialize engine type
- __init__(**data: Any) None#
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- classmethod parse_classification(value: Any) AircraftClassification#
Parse classification value
- Parameters:
value (Any) – classification value
- Returns:
parsed classification
- Return type:
- classmethod parse_engine_type(value: Any) AircraftEngineType#
Parse engine type value
- Parameters:
value (Any) – engine type value
- Returns:
parsed engine type
- Return type:
- classmethod serialize_classification(classification: AircraftClassification) str#
Serialize classification
- Parameters:
classification (AircraftClassification) – classification
- Returns:
classification name
- Return type:
str
- classmethod serialize_engine_type(engine_type: AircraftEngineType) str#
Serialize engine type
- Parameters:
engine_type (AircraftEngineType) – engine type
- Returns:
engine type name
- Return type:
str
- classification: Annotated[AircraftClassification, FieldInfo(annotation=NoneType, required=True, description='Aircraft classification')]#
aircraft classification
- Type:
- engine_count: Annotated[int | None, FieldInfo(annotation=NoneType, required=True, description='Number of engines on aircraft')]#
number of engines on aircraft
- Type:
int | None
- engine_type: Annotated[AircraftEngineType, FieldInfo(annotation=NoneType, required=True, description='Type of engines on aircraft')]#
type of engines on aircraft
- Type:
- family: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Aircraft family (manufacturer)')]#
aircraft family (manufacturer)
- Type:
str | None
- line_number: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Aircraft line number (manufacturer)')]#
aircraft line number (manufacturer)
- Type:
str | None
- model_code: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Aircraft model code (manufacturer)')]#
aircraft model code (manufacturer)
- Type:
str | None
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- serial_number: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Aircraft serial number (manufacturer)')]#
aircraft serial number (manufacturer)
- Type:
str | None
- series: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Aircraft series/variant (manufacturer)')]#
aircraft series/variant (manufacturer)
- Type:
str | None
- sub_family: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Aircraft sub-family (manufacturer)')]#
aircraft sub-family (manufacturer)
- Type:
str | None
- type_iata: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Aircraft type IATA designation')]#
aircraft type IATA designation
- Type:
str | None
- type_iata_code_long: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Aircraft type IATA code (long)')]#
aircraft type IATA code (long)
- Type:
str
- type_iata_code_short: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Aircraft type IATA code (short)')]#
aircraft type IATA code (short)
- Type:
str