Metadata-Version: 2.4
Name: sdk_gen_sdk
Version: 1.0.0
Summary: REST API for Postman SDK generation: builds, artifacts, SDK downloads, GitHub connections, snippets, and documentation.
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Requires-Dist: pydantic<3.0.0,>=2.0.0

# SdkGenSdk Python SDK 1.0.0<a id="sdkgensdk-python-sdk-100"></a>

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

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

- SDK version: `1.0.0`

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

REST API for Postman SDK generation: builds, artifacts, SDK downloads, GitHub connections, snippets, and documentation.

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

- [Setup & Configuration](#setup--configuration)
  - [Supported Language Versions](#supported-language-versions)
  - [Installation](#installation)
- [Authentication](#authentication)
  - [Basic Authentication](#basic-authentication)
  - [API Key Authentication](#api-key-authentication)
- [Setting a Custom Timeout](#setting-a-custom-timeout)
- [Sample Usage](#sample-usage)
- [Services](#services)
- [Models](#models)

# 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 sdk_gen_sdk
```

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

```bash
pip3 install sdk_gen_sdk
```

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

### Basic Authentication<a id="basic-authentication"></a>

The SdkGenSdk API uses Basic Authentication.

You need to provide your username and password when initializing the SDK.

#### Setting the Username and Password<a id="setting-the-username-and-password"></a>

When you initialize the SDK, you can set the username and password as follows:

```py
SdkGenSdk(
    username="YOUR_USERNAME",
    password="YOUR_PASSWORD",
    timeout=10000
)
```

If you need to set or update the username and password after initializing the SDK, you can use:

```py
sdk.set_basic_auth("YOUR_USERNAME", "YOUR_PASSWORD")
```

### API Key Authentication<a id="api-key-authentication"></a>

The SdkGenSdk API uses API keys as a form of authentication. An API key is a unique identifier used to authenticate a user, developer, or a program that is calling the API.

#### Setting the API key<a id="setting-the-api-key"></a>

When you initialize the SDK, you can set the API key as follows:

```py
SdkGenSdk(
    username="YOUR_USERNAME",
    password="YOUR_PASSWORD",
    timeout=10000
)
```

If you need to set or update the API key after initializing the SDK, you can use:

```py
sdk.set_api_key("YOUR_API_KEY", "YOUR_API_KEY_HEADER")
```

## 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 sdk_gen_sdk import SdkGenSdk

sdk = SdkGenSdk(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 sdk_gen_sdk import SdkGenSdk

sdk = SdkGenSdk(
    api_key="YOUR_API_KEY",
    api_key_header="YOUR_API_KEY_HEADER",
    timeout=10000
)

result = sdk.build.get_build_summary(
    collection_id="1401852-88d69471-e9ea-47d2-b342-1f9d221812b2",
    build_id=1,
    specification_id="4575688a-8370-42a7-b35e-9bac2571dcc7"
)

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 sdk_gen_sdk import SdkGenSdkAsync

sdk = SdkGenSdkAsync(
    api_key="YOUR_API_KEY",
    api_key_header="YOUR_API_KEY_HEADER",
    timeout=10000
)


async def main():
  result = await sdk.build.get_build_summary(
    collection_id="1401852-88d69471-e9ea-47d2-b342-1f9d221812b2",
    build_id=1,
    specification_id="4575688a-8370-42a7-b35e-9bac2571dcc7"
)
  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         |
| :----------- |
| build        |
| artifact     |
| users        |
| sdk          |
| github       |
| snippets     |
| health_check |
| ping         |
| doc          |

</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 |
| :------------------------------- | :---------- |
| BuildSummaryResponseDto          |             |
| BatchBuildSummariesResponseDto   |             |
| BuildDto                         |             |
| BuildListItemResponseDto         |             |
| CreateBuildRequest               |             |
| BuildJobAcceptedResponseDto      |             |
| WebhookResponseDto               |             |
| CreateOneOffBuildRequest         |             |
| CustomCodeUploadFormSchema       |             |
| CustomCodeUploadResponseDto      |             |
| UploadBuildRequest               |             |
| UploadBuildSuccessResponseDto    |             |
| BackfillResultResponseDto        |             |
| SdkLanguageSchema                |             |
| CurrentUserResponse              |             |
| SdkExistsResponse                |             |
| PublishedSdkResponse             |             |
| SdkDownloadResponseDto           |             |
| GithubConnectionsListResponseDto |             |
| CreateConnectionDto              |             |
| GithubRepoConnectionResponseDto  |             |
| SnippetResponse                  |             |
| HealthResponse                   |             |
| PingResponse                     |             |
| AuthenticatedPingResponseDto     |             |
| BuildMetadataDto                 |             |
| BuildSummaryDetailsDto           |             |
| BuildSummaryDownloadDto          |             |
| BuildSummaryLogDto               |             |
| BuildSummariesItemDto            |             |
| ArtifactResponse                 |             |
| SdkResponse                      |             |
| BucketLocationDto                |             |
| FillWorkspaceIdsResultDto        |             |
| RegisterSdksResultDto            |             |
| BackfillFailureItemDto           |             |
| RegistrationFailureItemDto       |             |
| TeamResponse                     |             |
| PingUserSummaryDto               |             |
| ErrorResponse                    |             |

</details>
