talqing is the Python client for the whole /v1 API, generated from the same OpenAPI document as the TypeScript SDK. Python 3.10+, httpx as the only runtime dependency, typed with a py.typed marker.
Creating a client
Talqing.from_env(**overrides) reads TALQING_API_KEY and TALQING_BASE_URL; anything passed wins. AsyncTalqing has the same shape with every operation a coroutine:
talqing.close() (await talqing.close() on the async client) when done.
The call shape
Path parameters are positional; body fields and query parameters are keyword arguments. Responses are plain decodeddicts described by TypedDicts, so read fields with response["field"].
An argument you do not pass is not sent
Optional arguments default to the sentinelOMIT and are left out of the request. That lets a PATCH distinguish “clear this field” from “leave it alone”:
OMIT is exported from talqing for building arguments dynamically. The one renamed method is telephony.phone_numbers.import_().
Errors
Every non-2xx raisesTalqingAPIError with str(error) (the message), .status_code, .errors (always a list), .detail and .response. A non-JSON error body, such as a proxy’s 502 page, still raises it with the raw text as the message; connection errors and timeouts raise httpx’s own exceptions. See errors.
Pagination
paginate(method, *, limit=200, **filters) takes the bound list method itself and yields items across pages. paginate_async is the async for form.
Streams
conversations.events and copilot.agents.stream / tools.stream / tasks.stream return a Stream (an AsyncStream on the async client): an iterator of decoded frames that is also a context manager. Opening one is not a coroutine on either client.
TalqingAPIError immediately. A finished stream cannot be reopened (RuntimeError). Frame shapes are in streaming.
Escape hatches
Every request and response shape is importable by its API name (
from talqing import AgentConfig, AgentResponse, Page).
Next
SDK overview
Every resource namespace.
Streaming
Every frame the event streams emit.