Metadata-Version: 2.5
Name: insightfactory-sdk
Version: 8.0.6.1
Summary: Insight Factory REST API client
Author-email: "insightfactory.ai Support" <support@insightfactory.ai>
Keywords: insightfactory.ai,openapi,sdk
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.11
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: typing-extensions>=4.7.1
Description-Content-Type: text/markdown

# insightfactory-sdk

Async Python client for the Insight Factory REST API.

```python
from insightfactory_sdk import ApiClient, Configuration
from insightfactory_sdk.api.tasks_api import TasksApi

config = Configuration(
    host="https://your-factory.insightfactory.ai", access_token=token
)

async with ApiClient(config) as client:
    tasks = await TasksApi(client).tasks_get()
```

Every operation is `async` and non-blocking, over a pooled `httpx.AsyncClient`.
Each also has a `_sync` twin for scripts and notebooks — note this builds its own
client, outside any `async with` block:

```python
sync_client = ApiClient(config)
tasks = TasksApi(sync_client).tasks_get_sync()
```

`_sync` runs the coroutine on a dedicated background event loop, so it must **not**
be called from inside `async` code — `await` the async method there instead.

Don't mix the two on one `ApiClient`. The connection pool is created on the first
request and bound to whichever loop issued it, so a client used both ways binds its
pool to one loop and fails on the other — usually as an `Event loop is closed` far
from the call that caused it. Use a separate client for each style.
