air_sdk.endpoints.systems#

Stub file for systems endpoint type hints.

Classes#

System

System model representing a system in the AIR platform.

SystemEndpointAPI

API client for System endpoints.

Module Contents#

class air_sdk.endpoints.systems.System[source]#

Bases: air_sdk.air_model.AirModel

System model representing a system in the AIR platform.

id: str#
created: datetime.datetime#
modified: datetime.datetime#
name: str#
simulation: air_sdk.endpoints.simulations.Simulation | None#
image: air_sdk.endpoints.images.Image#
memory: int#
storage: int#
cpu: int#
category: str#
attributes: dict[str, Any]#
split_options: list[int] | None#
classmethod get_model_api() type[SystemEndpointAPI][source]#

Returns the respective AirModelAPI type for this model.

property model_api: SystemEndpointAPI#
class air_sdk.endpoints.systems.SystemEndpointAPI(
api: air_sdk.AirApi,
default_filters: dict[str, Any] | None = None,
)[source]#

Bases: air_sdk.air_model.BaseEndpointAPI[System]

API client for System endpoints.

API_PATH: str#
model: type[System]#
list(
*,
limit: int = ...,
offset: int = ...,
ordering: str = ...,
search: str = ...,
attributes__group: str = ...,
attributes__model: str = ...,
attributes__sku: str = ...,
category: str = ...,
id: str = ...,
image: air_sdk.endpoints.images.Image | air_sdk.air_model.PrimaryKey = ...,
name: str = ...,
simulation: air_sdk.endpoints.simulations.Simulation | air_sdk.air_model.PrimaryKey = ...,
) Iterator[System]#

List all systems with optional filtering.

Parameters:
  • limit – Maximum number of results to return per page

  • offset – The initial index from which to return the results

  • ordering – Order objects by field. Prefix with “-” for desc order

  • search – Search by name

  • attributes__group – Filter by group

  • attributes__model – Filter by model

  • attributes__sku – Filter by sku

  • category – Filter by category

  • id – Filter by ID

  • image – Filter by image

  • simulation – Filter by simulation

Returns:

Iterator of System instances

Example

>>> # List all systems
>>> for system in api.systems.list():
...     print(system.name)
>>> # Search by name
>>> for system in api.systems.list(search='my-system'):
...     print(system.name)
>>> # Order by name descending
>>> for system in api.systems.list(ordering='-name'):
...     print(system.name)
get(pk: air_sdk.air_model.PrimaryKey) System#

Get a specific system by ID.

Parameters:

pk – The system ID (string or UUID)

Returns:

The System instance

Example

>>> system = api.systems.get('system-id')
>>> print(system.name)