Metadata-Version: 2.4
Name: salad-cloud-imds-sdk
Version: 0.9.0a5
Summary: The SaladCloud Instance Metadata Service (IMDS). Please refer to the [SaladCloud API Documentation](https://docs.salad.com/reference) for more details.
License: MIT
Project-URL: Homepage, https://github.com/saladtechnologies/salad-cloud-imds-sdk-python
Project-URL: Documentation, https://docs.salad.com
Project-URL: Repository, https://github.com/SaladTechnologies/salad-cloud-imds-sdk-python.git
Project-URL: Issues, https://github.com/SaladTechnologies/salad-cloud-imds-sdk-python/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Dynamic: license-file

# SaladCloudImdsSdk Python SDK 0.9.0-alpha.5<a id="saladcloudimdssdk-python-sdk-090-alpha5"></a>

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](https://public-liblab-readme-assets.s3.us-east-1.amazonaws.com/built-by-liblab-icon.svg)](https://liblab.com/?utm_source=readme)

## Versions<a id="versions"></a>

- API version: `0.9.0-alpha.2`
- SDK version: `0.9.0-alpha.5`

## About the API<a id="about-the-api"></a>

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

## Table of Contents<a id="table-of-contents"></a>

- [Setup & Configuration](#setup--configuration)
  - [Supported Language Versions](#supported-language-versions)
  - [Installation](#installation)
- [Setting a Custom Timeout](#setting-a-custom-timeout)
- [Sample Usage](#sample-usage)
- [Services](#services)
- [Models](#models)
- [License](#license)

## Setup & Configuration<a id="setup--configuration"></a>

### Supported Language Versions<a id="supported-language-versions"></a>

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

### Installation<a id="installation"></a>

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

```bash
pip install salad-cloud-imds-sdk
```

## Setting a Custom Timeout<a id="setting-a-custom-timeout"></a>

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

```py
from salad_cloud_imds_sdk import SaladCloudImdsSdk

sdk = SaladCloudImdsSdk(timeout=10000)
```

# Sample Usage<a id="sample-usage"></a>

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

```py
from salad_cloud_imds_sdk import SaladCloudImdsSdk

sdk = SaladCloudImdsSdk(
    timeout=10000
)

result = sdk.metadata.get_deletion_cost()

print(result)

```

# Async Usage<a id="async-usage"></a>

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.

```py
import asyncio
from salad_cloud_imds_sdk import SaladCloudImdsSdkAsync

sdk = SaladCloudImdsSdkAsync(
    timeout=10000
)


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

asyncio.run(main())
```

## Services<a id="services"></a>

The SDK provides various services to interact with the API.

<details> 
<summary>Below is a list of all available services:</summary>

| Name     |
| :------- |
| metadata |

</details>

## Models<a id="models"></a>

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.

<details> 
<summary>Below is a list of all available models:</summary>

| Name                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| :------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| DeletionCost        | The deletion cost of the current container instance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 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](https://leaf.salad.com/l/saladcloud-imds-errors) 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. |

</details>

## License<a id="license"></a>

This SDK is licensed under the MIT License.

See the [LICENSE](LICENSE) file for more details.
