skytracker.models.api.opensky_network.OpenSkyNetworkResponse#

class skytracker.models.api.opensky_network.OpenSkyNetworkResponse(*, time: int, states: List[OpenSkyNetworkState])#

Bases: BaseModel, APIResponse

OpenSky Network API response data

Properties

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

time

response timestamp (Unix)

states

aircraft states

Methods

parse_states

Handle None states

to_states

Convert Aviation Edge API response to list of aircraft states

__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_states(states: Any) Any#

Handle None states

Parameters:

states (Any) – states list

Returns:

parsed states list

Return type:

Any

to_states() list[State]#

Convert Aviation Edge API response to list of aircraft states

Returns:

list of aircraft states

Return type:

list[State]

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

states: Annotated[List[OpenSkyNetworkState], FieldInfo(annotation=NoneType, required=True, description='Aircraft states')]#

aircraft states

Type:

List[OpenSkyNetworkState]

time: Annotated[int, FieldInfo(annotation=NoneType, required=True, description='response timestamp (Unix)')]#

response timestamp (Unix)

Type:

int