This is a personal proof-of-concept project. It is not intended for production use. Please refrain from using it.
Skip to content

Python SDK

A thin, dependency-free client for the /analyze endpoint. One call tests an app and returns root-caused bugs — each failing case resolved to its backend cause via trace_id.

bash
pip install upliftr        # stdlib only, no runtime deps

Source: sdk/python in the repo. Point it at any Upliftr deployment — your own self-hosted engine, or an OEM's.

Usage

python
from upliftr import Upliftr

up = Upliftr("https://YOUR-UPLIFTR", token="tw_...")

result = up.analyze("https://staging.myapp.com")

if result.passed:
    print("all good")
else:
    for bug in result.bugs():
        print(f"❌ {bug.title} ({bug.status})")
        print(f"   why:            {bug.why}")
        print(f"   backend cause:  {bug.backend_cause}   [{bug.confidence}]")
        print(f"   suggested fix:  {bug.suggested_fix}")
        print(f"   trace_id:       {bug.trace_id}")

Reference

Upliftr(base_url, token, timeout=900)

Point at any Upliftr deployment (no /api/v1 suffix). token is a tw_… org-scoped API token. timeout is in seconds (a sync analyze can run minutes).

up.analyze(app_url, *, ...) -> AnalyzeResult

ArgMeaning
app_urlthe app to test
auth{username, password, login_path} to log in first
exhaustivedeeper coverage (default True)
file_issues"github" | "gitlab" | "jira" | "native"
log_backendper-request server-log config (see server logs)
anthropic_keyper-request BYOK key
mode"sync" (wait) or "async" (returns a run_id)
timeout_ssync wait budget

AnalyzeResult

.run_id, .status, .summary, .passed, .raw (full JSON), and:

  • .bugs() → a list of Bug, one per failing/broken case, each with: .title, .status, .why, .category, .backend_cause, .suggested_fix, .confidence, .trace_id, .evidence.

Errors

Any non-2xx or transport failure raises UpliftrError with the status + detail.

python
from upliftr import Upliftr, UpliftrError
try:
    up.analyze("https://x")
except UpliftrError as e:
    print("analyze failed:", e)

Upliftr · AI-native, self-healing E2E testing. Terms · Privacy · Legal Notice