Skip to navigation

air_sdk

View as Markdown

Subpackages

Submodules

Classes

NameDescription
AirApiNone

Module Contents

class air_sdk.AirApi(
api_url: str = const.AIR_API_URL,
authenticate: bool = True,
api_key: str | None = None,
username: str | None = None,
password: str | None = None,
bearer_token: str | None = None
)

Initialization:

Initialize AirApi and optionally authenticate with a local NGC config.

For cleaner initialization, consider using one of the factory methods:

  • AirApi.with_api_key()
  • AirApi.with_device_login()
  • AirApi.with_ngc_config()
with_api_key(
api_key: str,
api_url: str = const.AIR_API_URL
) -> AirApi

Initialize API with an explicit NGC API Key.

The api_key is also known as a Starfleet API Key, or ‘SAK’.

with_device_login(
email: str,
org_num: str,
api_url: str = const.AIR_API_URL
) -> AirApi

Initialize API with device login authentication.

with_ngc_config(api_url: str = const.AIR_API_URL) -> AirApi

Initialize API using NGC config for authentication.

auth_with_ngc_config() -> None

Authenticate with a local NGC config.

This method is called by the AirApi constructor if authenticate is True.

histories: HistoryEndpointAPI
images: ImageEndpointAPI
image_shares: ImageShareEndpointAPI
simulations: SimulationEndpointAPI
systems: SystemEndpointAPI
nodes: NodeEndpointAPI
interfaces: InterfaceEndpointAPI
services: ServiceEndpointAPI
simulation_interfaces: InterfaceEndpointAPI
node_instructions: NodeInstructionEndpointAPI
simulation_nodes: NodeEndpointAPI
ztp_scripts: ZTPScriptEndpointAPI
workers: WorkerEndpointAPI
worker_client_certificates: WorkerClientCertificateEndpointAPI
fleets: FleetEndpointAPI
marketplace_demos: MarketplaceDemoEndpointAPI
marketplace_demo_tags: MarketplaceDemoTagEndpointAPI
ssh_keys: SSHKeyEndpointAPI
manifests: ManifestEndpointAPI
cloud_inits: CloudInitEndpointAPI

Cloud-init endpoint for V2 backwards compatibility.

user_configs: UserConfigEndpointAPI
organizations: OrganizationEndpointAPI

Organization / Resource Budget endpoint.

resource_budgets: OrganizationEndpointAPI

Resource Budget endpoint (alias for organizations).

simulation: SimulationEndpointAPI

Deprecated alias for simulations (v1 backward compatibility).

service: ServiceEndpointAPI

Deprecated alias for services (v1 backward compatibility).

set_connect_timeout(t_delta: datetime.timedelta) -> None
set_read_timeout(t_delta: datetime.timedelta) -> None
set_page_size(n: int) -> None

Set the page size of paginated responses.