Skip to main content

Requirements

  • Python 3.9 or newer
  • pip, uv, or poetry
If you have not made a live remember and recall call yet, start with the Quickstart.

Install

pip install tex-sdk
PyPI lists the package as tex-sdk. You import tex in Python:
from tex import Tex

Check version

python -c "import tex; print(tex.__version__)"
# 1.1.0

Pin versions

requirements.txt
tex-sdk>=1.1.0,<2
For PEP 621 pyproject.toml, add "tex-sdk>=1.1.0,<2" under [project].dependencies. For Poetry, use tex-sdk = "^1.1.0" under [tool.poetry.dependencies].

HTTP/2 and proxies

The SDK uses httpx[http2]. If your proxy strips HTTP/2, disable it when you construct the client:
tex = Tex(api_key=..., http2=False)

Types

Type stubs ship with the package (py.typed). Mypy and Pyright pick them up automatically. You do not need a separate types- package.
from tex import Tex, RecallResponse

tex: Tex = Tex(...)
hits: RecallResponse = tex.recall(q="...", session_id="...")
reveal_type(hits.confidence)   # float

Next: configure the client

Environment variables, timeouts, and lifecycle hooks.