Skip to main content

The SaladCloud Instance Metadata Service (IMDS). Please refer to the [SaladCloud API Documentation](https://docs.salad.com/reference) for more details.

Project description

SaladCloudImdsSdk Python SDK 0.9.0a6

Welcome to the SaladCloudImdsSdk SDK documentation. This guide will help you get started with integrating and using the SaladCloudImdsSdk SDK in your project.

This SDK was generated by liblab

Versions

  • API version: 0.9.0-alpha.3
  • SDK version: 0.9.0a6

About the API

The SaladCloud Instance Metadata Service (IMDS). Please refer to the SaladCloud API Documentation for more details.

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: Python >= 3.7

Installation

To get started with the SDK, we recommend installing using pip:

pip install salad-cloud-imds-sdk

If you are using Python 3, you can use pip3 instead:

pip3 install salad-cloud-imds-sdk

Setting a Custom Timeout

You can set a custom timeout for the SDK's HTTP requests as follows:

from salad_cloud_imds_sdk import SaladCloudImdsSdk

sdk = SaladCloudImdsSdk(timeout=10000)

Sample Usage

Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:

from salad_cloud_imds_sdk import SaladCloudImdsSdk
from salad_cloud_imds_sdk.models import Metadata

sdk = SaladCloudImdsSdk(
    timeout=10000
)

result = sdk.metadata.get_deletion_cost(metadata="true")

print(result)

Async Usage

The SDK includes an Async Client for making asynchronous API requests. This is useful for applications that need non-blocking operations, like web servers or apps with a graphical user interface.

import asyncio
from salad_cloud_imds_sdk import SaladCloudImdsSdkAsync
from salad_cloud_imds_sdk.models import Metadata

sdk = SaladCloudImdsSdkAsync(
    timeout=10000
)


async def main():
  result = await sdk.metadata.get_deletion_cost(metadata="true")
  print(result)

asyncio.run(main())

Services

The SDK provides various services to interact with the API.

Below is a list of all available services:
Name
metadata

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

Below is a list of all available models:
Name Description
DeletionCost The deletion cost of the current container instance.
Metadata
ReallocatePrototype Represents a request to reallocate the current container instance to another SaladCloud node.
Status The health statuses of the current container instance.
Token The identity token of the current container instance.
SaladCloudImdsError An API error. The code and type uniquely identify the type of the error. The code is a short value that may be used for programmatic error handling. The type is an absolute URL that may be resolved for more detailed information. Refer to the SaladCloud IMDS reference for a list of the expected code and type values. Also, note that all properties are optional. Clients should implement robust error handling to account for unexpected errors.

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

salad_cloud_imds_sdk-0.9.0a6.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

salad_cloud_imds_sdk-0.9.0a6-py3-none-any.whl (38.8 kB view details)

Uploaded Python 3

File details

Details for the file salad_cloud_imds_sdk-0.9.0a6.tar.gz.

File metadata

  • Download URL: salad_cloud_imds_sdk-0.9.0a6.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for salad_cloud_imds_sdk-0.9.0a6.tar.gz
Algorithm Hash digest
SHA256 4a12ec16df7d807f19b3369847a86a5dd7f03dbf096986c3403f2de980068349
MD5 75e87f4d2156d75c5e3a4afbdefaea96
BLAKE2b-256 1de6689757cb278531536023a52b80c998e39d580c4ca903e3bc67267c7ddf8d

See more details on using hashes here.

File details

Details for the file salad_cloud_imds_sdk-0.9.0a6-py3-none-any.whl.

File metadata

File hashes

Hashes for salad_cloud_imds_sdk-0.9.0a6-py3-none-any.whl
Algorithm Hash digest
SHA256 7572b08292a4494b0f19ba04b0307efebb86c9832053b6e40d6c468716f23c75
MD5 2d29aae2a53af31d32297d6e676da624
BLAKE2b-256 782ea8326e53d36a5ac6167ce530f9bc4e85f95a5794e62c1f700847d9269ca9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page