air_sdk.endpoints.systems

View as Markdown

Stub file for systems endpoint type hints.

Classes

NameDescription
SystemSystem model representing a system in the AIR platform.
SystemEndpointAPIAPI client for System endpoints.

Module Contents

class air_sdk.endpoints.systems.System

Bases: air_sdk.air_model.AirModel

System model representing a system in the AIR platform.

id: str
name: str
simulation: Simulation | None
image: Image
memory: int
storage: int
cpu: int
category: str
attributes: dict[str, Any]
split_options: list[int] | None
get_model_api() -> type[SystemEndpointAPI]
model_api: SystemEndpointAPI
class air_sdk.endpoints.systems.SystemEndpointAPI

Bases: air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.systems.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: Image | PrimaryKey = ...,
name: str = ...,
simulation: Simulation | PrimaryKey = ...

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: 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)