typesafe-sdk 0.7.2


pip install typesafe-sdk

  Latest version

Released: Sep 26, 2026


Meta
Author: TypeSafe AI
Maintainer: Daniel Gafni
Requires Python: >=3.10

Classifiers

Typing
  • Typed

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

Operating System
  • OS Independent
  • POSIX
  • MacOS
  • POSIX :: Linux
  • Microsoft :: Windows

Programming Language
  • Python :: 3 :: Only
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

Topic
  • Scientific/Engineering :: Artificial Intelligence
  • Software Development :: Libraries :: Python Modules

License
  • OSI Approved :: MIT License

TypeSafe AI Python SDK

Python SDK for TypeSafe AI.

Quickstart

Install the SDK:

uv add typesafe-sdk

Add the http2 extra (typesafe-sdk[http2]) to enable HTTP/2 support.

Set TYPESAFE_API_KEY in your environment, then instantiate and use the client:

from typesafe_sdk import Choice, TypeSafeClient

with TypeSafeClient() as client:
    response = client.system_one(
        state={"document": "I was charged twice. Please fix this ASAP."},
        questions={
            "category": Choice(
                instructions="What is this ticket about?",
                criteria={"billing": None, "technical": None, "other": None},
            ),
        },
    )

print(response.choices["category"].choice)

learn what TypeSafe is, what it can do, and how to use it in TypeSafe docs.

Documentation

Learn more in SDK docs.

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
httpx2 (>=2.0.0)
pydantic (>=2.12.0)
pydantic-core (>=2.41.1)
tenacity (>=9.0.0)
typing-extensions (>=4.13.0)