Skip to content

Python SDK

Verify brands, check ops feeds, and scan MCP servers from Python.

Installation

bluefox-edge 0.0.4 is on PyPI as the offline receipt checker only — the API client this page documents arrives at 0.6+. Until then, the REST API works with zero dependencies: the quickstart curl examples cover the same calls this SDK wraps.

Initialization

python
from bluefox_edge import BlueFoxClient

client = BlueFoxClient(api_key="YOUR_KEY")

Brand Verification

python
result = client.check_brand("nike", ["Free returns for Nike Members"])

print(result.verdict)     # first claim's verdict, e.g. "accurate"
print(result.confidence)  # first claim's confidence, e.g. 0.95
for claim in result.results:
    print(claim.verdict, claim.confidence, claim.evidence)

Ops Feeds & MCP Scanner

The ops feeds and MCP scanner endpoints are not yet wrapped by the Python SDK — call them over REST with the same key:

bash
curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.bluefoxedge.ai/v1/ops/security_ops?limit=5"

Error Handling

python
from bluefox_edge import BlueFoxClient, BlueFoxError, BlueFoxAPIError

client = BlueFoxClient(api_key="YOUR_KEY")

try:
    result = client.check_brand("nike", ["Free returns for Nike Members"])
except BlueFoxAPIError as e:
    # e.status_code / e.code / e.message — 429 means a rate limit was hit
    print(f"API error: {e.status_code} — {e.message}")
except BlueFoxError as e:
    print(f"Client error: {e}")
Next: JavaScript SDK →