Skip to content

Python SDK

Official TypeSafe Python SDK with sync and async clients for Jev System One and typed Choice, Score and Noul questions.

LibraryproductionMIT

Overview

This is TypeSafe's official Python SDK, published on PyPI as typesafe-sdk. It provides synchronous and asynchronous clients for the System One endpoint plus the question and answer types used to build requests: Choice, Score and Noul. An optional http2 extra enables HTTP/2.

The quickstart shows the core pattern: open a TypeSafeClient (which reads TYPESAFE_API_KEY), call system_one with a state such as a support message and a dictionary of typed questions, and read the chosen label from response.choices. It is the base layer most Python projects in the Jev ecosystem build on. The list notes that a community package named typesafe-ai is only a redirect shim, and you should install typesafe-sdk directly.

What the decision model decides

TypeQuestionAnswers
ChoiceWhat is this ticket about?billing · technical · other

How it works

  1. Install typesafe-sdk and set TYPESAFE_API_KEY
  2. Build a state and a dict of Choice/Score/Noul questions
  3. Call client.system_one (sync or async)
  4. Branch on response.choices or other answer probabilities

Strengths

  • Official, typed request and response objects
  • Sync and async clients
  • Optional HTTP/2 support

Caveats

  • Requires a TypeSafe account and key
  • README is brief; most detail lives in the external docs

Getting started

uv add typesafe-sdk (or pip install typesafe-sdk), set TYPESAFE_API_KEY, then call TypeSafeClient().system_one(state=..., questions=...).

At a glance

Type
Library
Status
production
Language
Python
Runtime
Python library
Has code
yes
License
MIT
Stars
289

Use cases and integrations

How curated lists describe it

Frequently asked questions

Which package do I install?

typesafe-sdk; the typesafe-ai package is a redirect shim per the list summary.

Does it support async?

Yes, it includes synchronous and asynchronous clients.

Where is the full documentation?

At docs.typesafe.ai/sdk/python.

Related projects

  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript
  • Ax, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.

    PluginproductionTypeScript
  • Effect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.

    ProjectproductionTypeScript
  • PHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.

    ProjectproductionPHP
  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython