Skip to main content

parallax-fraud-sdk

Python client for the Parallax intent-inference fraud detection gateway. A fintech backend uses this package to stream session and transaction events to a running Parallax gateway and read back the intent-hypothesis decision — ALLOW, PROBE, VERIFY, BLOCK, or ESCALATE — in real time.

This is a thin client. It formats requests and parses responses; it does not run the detection model, compute features, or make policy decisions itself. Those live in the Go gateway (backend/) — see docs/detection_architecture.md for why that separation is deliberate.

Install

pip install -e sdk/python           # from the repo root, during development

Once published: pip install parallax-fraud-sdk (the import name stays parallax_sdk).

Usage

from parallax_sdk import ParallaxClient, EventType, Action

client = ParallaxClient("https://your-gateway.example.com")

client.send_event(session_id="s1", user_id="cust-42", type=EventType.LOGIN)
client.send_event(
    session_id="s1",
    user_id="cust-42",
    type=EventType.TRANSFER_STARTED,
    metadata={"amount": 350000, "beneficiary_id": "ben-9"},
)

decision = client.get_intent("s1")
print(decision.action, decision.dominant_intent, decision.hypotheses)

if decision.action == Action.PROBE.value and decision.probe:
    updated = client.submit_probe_response("s1", "Bank told me to move this.")

See examples/quickstart.py for a full walkthrough, including handling an intent probe.

API surface

Method Gateway endpoint Purpose
send_event(...) POST /v1/events Submit one observed session/transaction event
get_intent(session_id) GET /v1/sessions/{id}/intent Current intent distribution & policy decision
get_events(session_id) GET /v1/sessions/{id}/events Raw event trajectory for a session
submit_probe_response(session_id, text) POST /v1/sessions/{id}/probe Answer an active intent probe
list_sessions(limit=50) GET /v1/sessions Recent sessions with last-known decision
get_baseline(user_id) GET /v1/baselines/{id} A customer's behavioural baseline
list_scenarios() / run_scenario(id) GET/POST /v1/scenarios... Canned demo scenarios
stream_events(session_id=None) GET /v1/stream (SSE) Live event feed, blocking generator
health() / metrics() GET /healthz, GET /v1/metrics Gateway liveness & counters
reset() POST /v1/reset Clear demo state — not for production gateways

All methods raise ParallaxAPIError (non-2xx response) or ParallaxConnectionError (network failure) — both subclass ParallaxError.

Development

pip install -e ".[dev]"
pytest

Status

Built for the ICSC 2026 Universities Hackathon (Track A1). No authentication scheme is enforced by the reference gateway beyond an optional bearer token passed through ParallaxClient(..., api_key=...) — see docs/technical-writeup.md for what is and isn't production-hardened yet.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parallax_fraud_sdk-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parallax_fraud_sdk-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file parallax_fraud_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: parallax_fraud_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for parallax_fraud_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2e698ab6924d377828e842bb03d6cb04b4419f00cea2ba42565f2c1fa315dec2
MD5 e54095a37ffc1426a1063a92e4632d38
BLAKE2b-256 c8f566528d91c6d80b107ed6750de4033a78a7ed5d7800f472256cc73f51e3a2

See more details on using hashes here.

File details

Details for the file parallax_fraud_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for parallax_fraud_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f97acfdf8c83ab543480ecc78b9307f876ec1a9e926cb83e02ce05f3f9fb0c6c
MD5 b262844901bb1ae28846dad7caf721ee
BLAKE2b-256 f7019fbb625e1ffd5bc380dc61448cbdf53a7fc1de4cdadacd009a48c40b854f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page