learn / python

Use Jev with Python

A minimal server-side pattern for scripts, notebooks, batch jobs, and small evaluation harnesses.

Start where inputs are already structured

Batch classification, support routing, lead scoring, and evaluation scripts are good first Python tasks because the input record and downstream action are already visible.

Keep schemas beside the code

Store instructions and criteria in source control, review changes like code, and pin the model used for a benchmark. A small fixture file is more useful than relying on memory after a provider update.

Validate network and decision failures separately

Timeouts, authentication errors, and malformed responses are transport failures. Low confidence or an unwanted answer is a decision failure. They need different logs and often different retry policies.

python / requests
import requests

response = requests.post(
    "https://your-app.example/api/jev/evaluate",
    json={"state": ticket, "questions": questions},
    timeout=20,
)
response.raise_for_status()
decision = response.json()

Continue the Python integration