yellowdog-sdk API

yellowdog_client – Platform Client

yellowdog_client.PlatformClient is the main class, which is used to access all YellowDog services.

class yellowdog_client.PlatformClient(account_client, keyring_client, compute_client, images_client, namespaces_client, work_client, worker_pool_client, object_store_client, allowances_client, cloud_info_client)

Main class for accessing YellowDog services. Must be created with valid YellowDog Service Platform url and credentials.

To construct, use static create() method.

Parameters:
account_client: AccountClient

Account service client. Used for controlling accounts

allowances_client: AllowancesClient

Allowances client. Used to constrain how much compute can be used

close()

Closes all ongoing connections in PlatformClient

Note

Client also supports with keyword. When executing __exit__(), method close() is invoked

with PlatformClient.create(services_schema, api_key) as client:
    helper = client.compute_client.get_compute_requirement_helper(compute_requirement)
    # Stuff goes here...
Return type:

None

cloud_info_client: CloudInfoClient

Cloud Info client. Used to query Cloud Info data

compute_client: ComputeClient

Compute service client. Used for controlling compute requirements and instances

static create(services_schema, api_key)

Construct PlatformClient object.

Parameters:
  • services_schema (ServicesSchema) – configuration for platform client. Includes url for YellowDog platform service

  • api_key (ApiKey) – the api key to use for authenticating with the YellowDog platform

Return type:

PlatformClient

Returns:

created YellowDog Platform client

images_client: ImagesClient

Images client. Used for controlling machine images

keyring_client: KeyringClient

Account/Keyring client. Used for controlling users keyrings

namespaces_client: NamespacesClient

Namespaces client. Used for controlling namespaces

object_store_client: ObjectStoreClient

Object store client. Used for file upload and download

work_client: WorkClient

Work client. Used for controlling work requirements

worker_pool_client: WorkerPoolClient

Worker Pool client. Used for controlling worker pools

YellowDog services