> ## Documentation Index
> Fetch the complete documentation index at: https://backdrift.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> Pre-built client libraries for your API.

Backdrift generates client SDKs so you can integrate with your backend from any language.

## Available SDKs

### Built-in SDKs (11 Languages)

All SDKs are generated server-side using OpenAPI Generator. Download from the **Artifacts** tab:

| Language     | Format | Generator        |
| ------------ | ------ | ---------------- |
| TypeScript   | `.zip` | typescript-fetch |
| Python       | `.zip` | python           |
| Go           | `.zip` | go               |
| Java         | `.zip` | java             |
| Kotlin       | `.zip` | kotlin           |
| Swift        | `.zip` | swift5           |
| C#           | `.zip` | csharp           |
| Ruby         | `.zip` | ruby             |
| Rust         | `.zip` | rust             |
| Dart/Flutter | `.zip` | dart             |
| PHP          | `.zip` | php              |

### How It Works

SDK generation runs on a serverless Lambda function with OpenAPI Generator CLI. Generation typically takes 1-3 seconds.

## Python SDK

### Download

From the **Artifacts** tab, click **Python SDK** to download.

### Installation

```bash theme={null}
unzip python-sdk.zip
cd task-manager-sdk
pip install -e .
```

### Usage

```python theme={null}
from task_manager import Client, Task

# Initialize with your API URL
client = Client(
    base_url="https://abc123.execute-api.us-east-2.amazonaws.com",
    access_token="your-jwt-token"
)

# List tasks
tasks = client.tasks.list()
for task in tasks:
    print(f"{task.title} - {task.priority}")

# Create a task
new_task = client.tasks.create(Task(
    title="Ship the feature",
    priority="high",
    project_id="proj-123"
))

# Update a task
client.tasks.update(new_task.id, status="done")

# Delete a task
client.tasks.delete(new_task.id)
```

### Type Hints

The Python SDK includes full type hints for IDE autocomplete:

```python theme={null}
from task_manager import Task

task: Task = client.tasks.get("task-123")
task.title  # IDE shows: str
task.priority  # IDE shows: Literal['low', 'medium', 'high']
```

## TypeScript SDK

### Download

From the **Artifacts** tab, click **TypeScript SDK** to download.

### Installation

```bash theme={null}
unzip typescript-sdk.zip
cd task-manager-sdk
npm install
npm run build
```

### Usage

```typescript theme={null}
import { Client, Task } from 'task-manager-sdk';

const client = new Client({
  baseUrl: 'https://abc123.execute-api.us-east-2.amazonaws.com',
  accessToken: 'your-jwt-token'
});

// List tasks
const tasks = await client.tasks.list();
tasks.forEach(task => console.log(task.title));

// Create a task
const newTask = await client.tasks.create({
  title: 'Ship the feature',
  priority: 'high',
  projectId: 'proj-123'
});

// Update a task
await client.tasks.update(newTask.id, { status: 'done' });

// Delete a task
await client.tasks.delete(newTask.id);
```

## Generating Custom SDKs

Need a language not listed above? Use [OpenAPI Generator](https://openapi-generator.tech) locally with your OpenAPI spec:

```bash theme={null}
# Install OpenAPI Generator
npm install -g @openapitools/openapi-generator-cli

# Download your OpenAPI spec
curl -o openapi.json https://backdrift.ai/api/projects/YOUR_PROJECT_ID/artifacts/openapi

# Generate SDK for any supported language
openapi-generator-cli generate -i openapi.json -g <generator> -o ./sdk-output
```

### All Supported Languages

Run `openapi-generator-cli list` to see all 50+ supported generators.

## Dynamic URLs

SDKs are generated with your **deployed API URL** pre-configured:

```python theme={null}
# The base URL is already set to your deployment
client = Client(access_token="your-token")
# No need to specify base_url!
```

## Keeping SDKs Updated

Regenerate SDKs whenever you:

* Add new entities
* Add new endpoints
* Change field types
* Deploy changes

The **Artifacts** tab always shows SDKs for your latest deployment.

<Card title="OpenAPI Spec" icon="file-code" href="/artifacts/openapi">
  Get the raw OpenAPI specification.
</Card>
