Recipes 34 hands-on 18 min Updated Nov 10, 2026

How to Get Started With Jev in Python (Real Python)

External Real Python tutorial by Philipp Acsany (updated 2026-09-24): connect a Python script to hosted TypeSafe Jev through the TypeSafe SDK and OpenRouter, replace a rigid Y/N check with Noul, then ask Choice, Score, and Noul together in one request.

What this guide points to

Philipp Acsany published How to Get Started With Jev in Python on Real Python (updated 2026-09-24; Real Python also shared it on X on 2026-11-09). It is an intermediate, about-18-minute walkthrough that starts with a train-station script that only accepts uppercase Y or N, then hands the visitor’s reply to hosted TypeSafe Jev.

Worked steps in the article:

  1. Project setup — Python 3.10+, uv, typesafe-sdk==0.7.1, and an OpenRouter key in .env as OPENROUTER_API_KEY. The SDK default is jev-latest; you can pin a version such as jev-1.13.
  2. One Noul question — TypeSafeClient with base_url="https://openrouter.ai/api"; put only the visitor’s answer in state; use cutoffs such as above 0.8 / below 0.2, and ask again in the middle band.
  3. Instruction wording — the article shows why “Is the answer affirmative?” works on a bare “yes”, while “Did the user lose something?” can leave a short yes in the mid band, because the original prompt never reaches Jev.
  4. Choice, Score, and Noul in one call — route a visitor to a desk, score urgency, and test whether they need assistance; then print typed answers (choice, score, noul) instead of prose.
  5. Troubleshooting — missing typesafe_sdk, unset OPENROUTER_API_KEY, TypeSafeAuthenticationError when the key or base_url is wrong, empty credits, and rate limits.

This page is an unofficial handbook pointer — verify against the article and TypeSafe docs. Do not paste long tutorial snippets here; open the source and follow it live.

Takeaways

  1. Jev returns typed numbers and option keys; your Python code turns them into the next action.
  2. Put the visitor’s words in state and the judgment in the question; keep the original prompt out of the way unless you also pass it in state.
  3. One system_one request can carry Noul, Choice, and Score together.

Sources