Skip to main content

OpenSentinel Python SDK

Official Python SDK for OpenSentinel, engineered by Azanian Eagle to provide server-side validation and client-telemetry verification for non-invasive, privacy-preserving CAPTCHA-free bot detection.

About OpenSentinel & Azanian Eagle

Engineered by Azanian Eagle, OpenSentinel is built on the core principle of digital sovereignty and user privacy. Legacy CAPTCHA tools require users to decode image puzzles, exploiting human attention and harvesting personal tracking data to train third-party artificial intelligence models.

OpenSentinel replaces intrusive visual puzzles with frictionless telemetry analysis. By evaluating abstract human interaction parameters—such as mouse trajectory curvature, speed variance, and keystroke flight dynamics—OpenSentinel detects automated software bots without collecting personally identifiable information (PII).

Key Features

  • Zero Visual Friction: Eliminates image selection puzzles and visual challenges for end-users.
  • Lightweight Standard Library Dependencies: Built using Python standard libraries (urllib, json), requiring zero external pip dependencies.
  • Privacy-First Architecture: Zero tracking cookies, zero fingerprinting, and full compliance with South Africa's Protection of Personal Information Act (POPIA), GDPR, and CCPA.
  • Server-Side Payload Validation: Securely transmits client telemetry payloads to your sovereign OpenSentinel server for verification.
  • Framework Agnostic: Easily integrates into Django, FastAPI, Flask, Pyramid, and Tornado backend applications.

Installation

Install the official package from PyPI using pip:

pip install azanian-eagle-opensentinel

Or using poetry or pipenv:

poetry add azanian-eagle-opensentinel
# or
pipenv install azanian-eagle-opensentinel

Implementation & Usage Guide

1. Basic Client Usage

Initialize OpenSentinelClient with your self-hosted or managed OpenSentinel endpoint, then verify the payload received from your frontend client:

from opensentinel import OpenSentinelClient

# Initialize client with OpenSentinel server endpoint URL
client = OpenSentinelClient(endpoint="https://api.yourdomain.com")

# Payload received from frontend sensor (contains encrypted telemetry and IV)
incoming_payload = {
    "data": "A1b2C3d4E5f6...",  # AES-256-GCM ciphertext
    "iv": "X1y2Z3a4b5c6=="     # Base64 IV
}

try:
    # Submit payload for verification
    result = client.verify(incoming_payload)

    if result.get("passed"):
        print(f"Humanity verified! Score: {result.get('score')}")
        # Process user request (e.g., allow login, comment submission)
    else:
        print(f"Bot detected or verification failed: {result.get('message')}")
        # Block request or trigger secondary security challenge

except Exception as e:
    print(f"Verification error: {str(e)}")

Web Framework Integration Examples

FastAPI Integration

from fastapi import FastAPI, HTTPException, Request
from opensentinel import OpenSentinelClient

app = FastAPI()
sentinel = OpenSentinelClient(endpoint="http://localhost:8080")

@app.post("/api/login")
async def login(request: Request):
    data = await request.json()
    payload = data.get("sentinel_payload")

    if not payload:
        raise HTTPException(status_code=400, detail="Missing OpenSentinel telemetry payload")

    try:
        verification = sentinel.verify(payload)
        if not verification.get("passed"):
            raise HTTPException(status_code=403, detail="Security check failed: Bot activity detected")
    except Exception as err:
        raise HTTPException(status_code=500, detail=f"Sentinel service error: {str(err)}")

    return {"status": "authenticated"}

Flask Integration

from flask import Flask, request, jsonify
from opensentinel import OpenSentinelClient

app = Flask(__name__)
sentinel = OpenSentinelClient(endpoint="http://localhost:8080")

@app.route("/submit-form", methods=["POST"])
def submit_form():
    payload = request.json.get("opensentinel")

    if not payload:
        return jsonify({"error": "Missing verification payload"}), 400

    result = sentinel.verify(payload)
    if not result.get("passed"):
        return jsonify({"error": "Human verification failed"}), 403

    return jsonify({"success": True, "message": "Form submitted successfully"})

Class Reference & Methods

OpenSentinelClient(endpoint: str)

  • endpoint (str): Base URL of your OpenSentinel server instance (e.g. 'https://api.yourdomain.com').

Method: verify(payload: dict) -> dict

Submits client telemetry payload dictionary ({'data': str, 'iv': str}) to the backend /verify endpoint.

  • Parameters:
    • payload (dict): Payload dictionary containing 'data' (ciphertext base64) and 'iv' (initialization vector base64).
  • Returns:
    • dict: Response dictionary containing:
      • passed (bool): True if verification passed humanity threshold, False otherwise.
      • score (float): Calculated probability score (0.0 to 1.0).
      • message (str): Verification status description or error details.

Regulatory Compliance & Privacy

OpenSentinel is engineered by Azanian Eagle to respect digital sovereignty and global privacy standards:

  • POPIA (South Africa): Fully compliant as no personal identifiable information (PII) is captured or stored.
  • GDPR & CCPA: Compliant due to complete absence of tracking cookies, device fingerprinting, and third-party data selling.

Licence

Distributed under the MIT Licence. Engineered with pride by Azanian Eagle.

Release files for azanian-eagle-opensentinel 1.0.4279

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for azanian-eagle-opensentinel 1.0.4279
File Size Uploaded
azanian_eagle_opensentinel-1.0.4279.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for azanian-eagle-opensentinel 1.0.4279
File Interpreter ABI Platform
azanian_eagle_opensentinel-1.0.4279-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / azanian_eagle_opensentinel-1.0.4279.tar.gz

Download URL azanian_eagle_opensentinel-1.0.4279.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6ba6b6d58548cbca96f525551d5bd97293e36c1128aa11c2deb2d1835acbab53
BLAKE2b-256 checksum
How to use checksums
3df9f19a3ab340943953f6962e661e826f4053c3eb40a17a7fa84693b7c48130
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / azanian_eagle_opensentinel-1.0.4279-py3-none-any.whl

Download URL azanian_eagle_opensentinel-1.0.4279-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e04ae14533eea2fffa9b1c050d166280aa3102b03b0da031b8ca0f0e4221678a
BLAKE2b-256 checksum
How to use checksums
5604d513cbe1a7c7ddc28364233b847f51d236462243b6a6d02a6c9774cef978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.0.4279 This release

2 release files

1.0.5

2 release 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