mrapids 0.1.31

Your OpenAPI, but executable
Documentation
# {{title}} Python SDK

Version: {{version}}

{{#if description}}
{{description}}
{{/if}}

## Installation

```bash
pip install {{packageName}}
```

## Usage

```python
from {{snakeCase packageName}} import ApiClient, ApiConfig

# Create client
config = ApiConfig(
    base_url="{{baseUrl}}"{{#if includeAuth}},
    bearer_token="your-token",  # If using bearer auth
    api_key="your-api-key"  # If using API key auth{{/if}}
)

client = ApiClient(config)

# Make API calls
{{#each operations}}
{{#if @first}}
result = client.{{snakeCase operation_id}}()
{{/if}}
{{/each}}
```

## Using with async

```python
import httpx
from {{snakeCase packageName}} import ApiConfig

# The SDK uses httpx which supports both sync and async
async with httpx.AsyncClient(base_url="{{baseUrl}}") as client:
    response = await client.get("/endpoint")
```

## Available Operations

{{#each operations}}
- `{{snakeCase operation_id}}()` - {{#if summary}}{{summary}}{{else}}{{method}} {{path}}{{/if}}
{{/each}}

## Error Handling

```python
from {{snakeCase packageName}} import ApiError

try:
    result = client.{{#if operations.[0]}}{{snakeCase operations.[0].operation_id}}{{else}}some_operation{{/if}}()
except ApiError as e:
    print(f"API error: {e.message} (status: {e.status_code})")
```

## Configuration

The `ApiConfig` class supports the following options:

- `base_url` - API base URL (default: `{{baseUrl}}`)
{{#if includeAuth}}
- `bearer_token` - Bearer token for authentication
- `api_key` - API key for authentication
{{/if}}
{{#if includeResilience}}
- `timeout` - Request timeout in seconds (default: 30.0)
- `max_retries` - Maximum number of retries (default: 3)
- `retry_delay` - Delay between retries in seconds (default: 1.0)
{{/if}}
- `headers` - Additional headers to include in requests

---

Generated by [MicroRapid](https://github.com/yourusername/microrapid)