Metadata-Version: 2.4
Name: intuned-client
Version: 1.1.0
Summary: Owned Python SDK for the Intuned public APIs
Author-email: Intuned Developers <engineering@intunedhq.com>
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.28.1
Requires-Dist: pydantic<3,>=2.11.0
Description-Content-Type: text/markdown

# intuned-client

Python SDK for the Intuned public APIs.

## Install

```bash
pip install intuned-client
```

## Quickstart

```python
from intuned_client import IntunedClient
from intuned_client import models

with IntunedClient(
    api_key="your-intuned-api-key",
    workspace_id="123e4567-e89b-12d3-a456-426614174000",
) as client:
    response = client.projects.runs.start(
        project_name="my-project",
        body=models.RunStartRequestBody(
            api="my-awesome-api",
            parameters={"hello": "world"},
        ),
    )
    print(response.run_id)
```

## Authentication

Pass your Intuned API key when creating the client:

```python
from intuned_client import IntunedClient

client = IntunedClient(
    api_key="your-intuned-api-key",
    workspace_id="123e4567-e89b-12d3-a456-426614174000",
)
```

## API shape

The client follows the API tag hierarchy:

- `client.projects.runs`
- `client.projects.runs.start`
- `client.projects.runs.result`
- `client.projects.jobs`
- `client.projects.jobs.runs`
- `client.projects.auth_sessions`
- `client.projects.auth_sessions.validate`
- `client.projects.auth_sessions.create`
- `client.projects.auth_sessions.update`
- `client.web_tasks.start`
- `client.web_tasks.result`
- `client.web_tasks.run` — convenience: starts a Web Task and polls `result` until terminal (status `completed` or `canceled`).

Example:

```python
job_runs = client.projects.jobs.runs.list(
    project_name="my-project",
    job_id="job-123",
)
```

## Async usage

```python
from intuned_client import AsyncIntunedClient

async def main() -> None:
    async with AsyncIntunedClient(
        api_key="your-intuned-api-key",
        workspace_id="123e4567-e89b-12d3-a456-426614174000",
    ) as client:
        result = await client.projects.runs.result(
            project_name="my-project",
            run_id="run-123",
        )
        print(result)
```

## Error handling

The SDK raises typed exceptions from `intuned_client.exceptions`, including:

- `AuthenticationError`
- `NotFoundError`
- `ValidationError`
- `ServerError`
- `ApiError`

## Notes

- The SDK uses `httpx` for transport.
- Request and response models are built with `pydantic`.
- Both sync and async clients support custom `httpx` client injection.
