> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emtelligent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emtelligent.com/_mcp/server.

# engine

## Module Contents

### Classes

| Name                                                             | Description                                                                                                                                                                                   |
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`DeferredResult`](#emtellisplit_sdk_pythonenginedeferredresult) | A class that mimics asyncio.Future but it not awaitable. The caller is responsible for polling until done.                                                                                    |
| [`ResultFuture`](#emtellisplit_sdk_pythonengineresultfuture)     | A class that mimics asyncio.Future                                                                                                                                                            |
| [`Emtellisplit`](#emtellisplit_sdk_pythonengineemtellisplit)     | This is the primary way of interacting with an emtelliSplit server. It handles all the details for submitting documents, checking on the processing status, waiting for processing to finish. |

### Functions

| Name | Description |
| ---- | ----------- |

### Data

`logger`

### API

#### `emtellisplit_sdk_python.engine.logger`

```python
emtellisplit_sdk_python.engine.logger
```

**Value**: `getLogger(...)`

#### `emtellisplit_sdk_python.engine.DeferredResult`

```python
class emtellisplit_sdk_python.engine.DeferredResult(job_id, api, output_bucket_prefix)
```

A class that mimics asyncio.Future but it not awaitable. The caller is responsible
for polling until done.

##### `DeferredResult.cancel`

```python
cancel()
```

Cancel the processing job being represented by this ResultFuture.

##### `DeferredResult.status`

```python
status()
```

Gets the status of the processing job represented by this ResultFuture, updates the status of this ResultFuture.

##### `DeferredResult.done`

```python
done()
```

##### `DeferredResult.result`

```python
result() -> Result
```

#### `emtellisplit_sdk_python.engine.ResultFuture`

```python
class emtellisplit_sdk_python.engine.ResultFuture(job_id, api, output_bucket_prefix, interval=10)
```

**Bases**: `emtellisplit_sdk_python.engine.DeferredResult`

A class that mimics asyncio.Future

##### `ResultFuture.cancel`

```python
cancel()
```

Cancel the task being represented by this ResultFuture. Cancels the polling
thread if it has been started.

##### `ResultFuture.__await__`

```python
__await__() -> Result
```

Allows this object to be awaited.
e.g. result = await result_future

##### `ResultFuture.result`

```python
result() -> Result
```

Another method that can be used to await for the result.
e.g. result = await result_future.result()

#### `emtellisplit_sdk_python.engine.Emtellisplit`

```python
class emtellisplit_sdk_python.engine.Emtellisplit(server_url, auth_session: emtellisplit_sdk_python.auth.AuthSession)
```

This is the primary way of interacting with an emtelliSplit server.
It handles all the details for submitting documents, checking on the processing status,
waiting for processing to finish.

##### `Emtellisplit.submit`

```python
submit(input_document) -> emtellisplit_sdk_python.engine.DeferredResult
```

Submits a document for processing. Returns a DeferredResult object which can
be interacted with to get the status of processing, or the result after
processing has succeeded or failed.

##### `Emtellisplit.process`

```python
process(input_document) -> emtellisplit_sdk_python.engine.ResultFuture
```

Submits a document for processing. Returns an awaitable ResultFuture object
which can be awaited to get the result after processing has suceeded or failed.

##### `Emtellisplit.status`

```python
status(job_id)
```

Gets the status of a submitted job.

##### `Emtellisplit.cancel`

```python
cancel(job_id)
```

Cancels a submitted job.