Metadata-Version: 2.4
Name: celitech-sdk
Version: 1.3.49
Summary: Welcome to the CELITECH API documentation!
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Dynamic: license-file

# Celitech Python SDK 1.3.49<a id="celitech-python-sdk-1349"></a>

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

[![This SDK was generated by liblab](https://raw.githubusercontent.com/liblaber/liblab-assets/main/assets/built-by-liblab-icon.svg)](https://liblab.com/?utm_source=readme)

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

- API version: `1.3.49`
- SDK version: `1.3.49`

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

Welcome to the CELITECH API documentation!

Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:support@celitech.com) | [Blog](https://www.celitech.com/blog/)

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

- [Setup & Configuration](#setup--configuration)
  - [Supported Language Versions](#supported-language-versions)
  - [Installation](#installation)
- [Authentication](#authentication)
  - [OAuth Authentication](#oauth-authentication)
  - [Environment Variables](#environment-variables)
- [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 celitech-sdk
```

## Authentication<a id="authentication"></a>

### OAuth Authentication<a id="oauth-authentication"></a>

The Celitech API uses OAuth for authentication.

You need to provide the OAuth parameters when initializing the SDK.

```py
sdk = Celitech(
    client_id="CLIENT_ID",
    client_secret="CLIENT_SECRET"
)
```

If you need to set or update the OAuth parameters after the SDK initialization, you can use:

```py
sdk.set_client_id("CLIENT_ID")
sdk.set_client_secret("CLIENT_SECRET")
```

## Environment Variables<a id="environment-variables"></a>

These are the environment variables for the SDK:

| Name          | Description             |
| :------------ | :---------------------- |
| CLIENT_ID     | Client ID parameter     |
| CLIENT_SECRET | Client Secret parameter |

Environment variables are a way to configure your application outside the code. You can set these environment variables on the command line or use your project's existing tooling for managing environment variables.

If you are using a `.env` file, a template with the variable names is provided in the `.env.example` file located in the same directory as this README.

## 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 celitech import Celitech

sdk = Celitech(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 celitech import Celitech

sdk = Celitech(
    client_id="CLIENT_ID",
    client_secret="CLIENT_SECRET"
)

result = sdk.destinations.list_destinations()

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 celitech import CelitechAsync

sdk = CelitechAsync(
    client_id="CLIENT_ID",
    client_secret="CLIENT_SECRET"
)


async def main():
  result = await sdk.destinations.list_destinations()
  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         |
| :----------- |
| o_auth       |
| destinations |
| packages     |
| purchases    |
| e_sim        |
| i_frame      |

</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 |
| :-------------------------------- | :---------- |
| GetAccessTokenRequest             |             |
| GetAccessTokenOkResponse          |             |
| ListDestinationsOkResponse        |             |
| ListPackagesOkResponse            |             |
| CreatePurchaseV2Request           |             |
| CreatePurchaseV2OkResponse        |             |
| ListPurchasesOkResponse           |             |
| CreatePurchaseRequest             |             |
| CreatePurchaseOkResponse          |             |
| TopUpEsimRequest                  |             |
| TopUpEsimOkResponse               |             |
| EditPurchaseRequest               |             |
| EditPurchaseOkResponse            |             |
| GetPurchaseConsumptionOkResponse  |             |
| GetEsimOkResponse                 |             |
| GetEsimDeviceOkResponse           |             |
| GetEsimHistoryOkResponse          |             |
| GetEsimMacOkResponse              |             |
| TokenOkResponse                   |             |
| ListDestinations400Response       |             |
| ListDestinations401Response       |             |
| ListPackages400Response           |             |
| ListPackages401Response           |             |
| CreatePurchaseV2_400Response      |             |
| CreatePurchaseV2_401Response      |             |
| ListPurchases400Response          |             |
| ListPurchases401Response          |             |
| CreatePurchase400Response         |             |
| CreatePurchase401Response         |             |
| TopUpEsim400Response              |             |
| TopUpEsim401Response              |             |
| EditPurchase400Response           |             |
| EditPurchase401Response           |             |
| GetPurchaseConsumption400Response |             |
| GetPurchaseConsumption401Response |             |
| GetEsim400Response                |             |
| GetEsim401Response                |             |
| GetEsimDevice400Response          |             |
| GetEsimDevice401Response          |             |
| GetEsimHistory400Response         |             |
| GetEsimHistory401Response         |             |
| GetEsimMac400Response             |             |
| GetEsimMac401Response             |             |
| Token400Response                  |             |
| Token401Response                  |             |

</details>

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

This SDK is licensed under the MIT License.

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