This release is a pre-release and may not be stable for production use.
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.
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.
Metadata
Release files for salad-cloud-imds-sdk 0.9.0a6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| salad_cloud_imds_sdk-0.9.0a6.tar.gz | 27.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| salad_cloud_imds_sdk-0.9.0a6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 66.0 kB
Release files / salad_cloud_imds_sdk-0.9.0a6.tar.gz
| Download URL | salad_cloud_imds_sdk-0.9.0a6.tar.gz |
|---|---|
| Size | 27.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a12ec16df7d807f19b3369847a86a5dd7f03dbf096986c3403f2de980068349
|
|
BLAKE2b-256 checksum How to use checksums |
1de6689757cb278531536023a52b80c998e39d580c4ca903e3bc67267c7ddf8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / salad_cloud_imds_sdk-0.9.0a6-py3-none-any.whl
| Download URL | salad_cloud_imds_sdk-0.9.0a6-py3-none-any.whl |
|---|---|
| Size | 38.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7572b08292a4494b0f19ba04b0307efebb86c9832053b6e40d6c468716f23c75
|
|
BLAKE2b-256 checksum How to use checksums |
782ea8326e53d36a5ac6167ce530f9bc4e85f95a5794e62c1f700847d9269ca9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|