Metadata-Version: 2.5
Name: teleexpert
Version: 0.1.0
Summary: Official Python SDK for the TeleExpert phone-task API
Project-URL: Documentation, https://github.com/calltalkie/TeleExpert/blob/feat/commercial-api-foundation/docs/api.md
Project-URL: Repository, https://github.com/calltalkie/TeleExpert
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Requires-Dist: websockets<17,>=14
Description-Content-Type: text/markdown

# TeleExpert Python SDK

Server-side Python client for creating and monitoring TeleExpert phone tasks. Never put a
TeleExpert API key in browser or mobile application code.

```bash
pip install teleexpert
```

```python
import os
from teleexpert import TeleExpert

with TeleExpert(
    api_key=os.environ["TELEEXPERT_API_KEY"],
    base_url=os.environ["TELEEXPERT_BASE_URL"],
) as client:
    call = client.create_and_wait(
        phone_number="+251911111111",
        task="Confirm tomorrow's delivery window and collect the preferred time.",
        idempotency_key="delivery-order-4821-v1",
        response_format="both",
        timeout=300,
    )
    print(call["status"], call.get("result"))
```

`create_call` returns immediately after the API accepts the task. `create_and_wait` is only a
convenience wrapper; stopping the local Python process does not cancel an accepted carrier call.
Persist the idempotency key and returned call ID in production workflows.

`AsyncTeleExpert` provides the same HTTP methods and an asynchronous `stream_call` iterator for
live status, transcripts, and role-tagged PCM audio.

## Releasing

The `Publish Python SDK` GitHub Actions workflow uses PyPI trusted publishing, so no long-lived
PyPI token is stored in GitHub. A manual workflow run publishes the current SDK version to
TestPyPI. Pushing a matching signed release tag publishes it to PyPI:

```bash
git tag -s sdk-v0.1.0 -m "TeleExpert Python SDK 0.1.0"
git push origin sdk-v0.1.0
```

Before the first release, register `calltalkie/TeleExpert` and workflow
`publish-python-sdk.yml` as a pending trusted publisher on both indexes. Use environment
`testpypi` on TestPyPI and `pypi` on PyPI. The repository restricts TestPyPI to the commercial
API branch and PyPI to `sdk-v*` tags. When the GitHub billing plan supports required reviewers,
also require manual approval for the `pypi` environment.
