air_sdk.client#
Classes#
A session client for managing the execution of API requests. |
Module Contents#
- class air_sdk.client.Client(api_url: str)[source]#
Bases:
requests.SessionA session client for managing the execution of API requests.
- api_url#
- connect_timeout#
- read_timeout#
- pagination_page_size = 200#
- static get_telemetry_headers() dict[str, str][source]#
Return telemetry-specific headers for all requests.
- get_http_adapter() requests.adapters.HTTPAdapter[source]#
Return an HTTP adapter for all requests.
- get_retry_strategy() urllib3.util.Retry[source]#
Return a retry strategy for all requests. The following retry strategy will attempt to retry the request only if the connection fails.
- ngc_sak_login() None[source]#
Log in with Scoped API Key (SAK)
No args. Client must have directory ~/.ngc/config
- ngc_device_login(email: str, ngc_org_name: str) None[source]#
Log in with device login - does not require a NGC API Key/SAK.
- request(*args: Any, **kwargs: Any) requests.Response[source]#
Override request method to pass the timeout