Is there a ClearRun Python SDK?

No. ClearRun's SDK is for Node.js only. From Python, call the HTTP API directly with any HTTP client. It is a few lines.

Last updated

Python example

import os, requests

res = requests.post(
    "https://api.clearrun.net/api/score",
    headers={"Authorization": f"Bearer {os.environ['CLEARRUN_API_KEY']}"},
    json={"responseText": "The Eiffel Tower is definitely in Berlin."},
    timeout=30,
)
res.raise_for_status()
verdict = res.json()["verdict"]
print(verdict["score"], verdict["risk"])

More

See How to call the ClearRun API from Python.