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 & Siteverify Drop-In: Verify raw telemetry or drop-in tokens via
/compat/siteverify. - Framework Middleware Helpers: Pre-built decorators and dependencies for FastAPI and Flask (
OpenSentinelMiddleware).
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.
Method: siteverify(response_token: str, secret: str = None) -> dict
Drop-in verification call against /compat/siteverify for Turnstile/reCAPTCHA migration. Returns {'success': bool, 'challenge_ts': str, 'hostname': str}.
Method: get_challenge() -> dict
Fetches a short-lived challenge token and public key from GET /challenge.
Middleware & Decorator Usage (OpenSentinelMiddleware)
from opensentinel import OpenSentinelClient, OpenSentinelMiddleware
client = OpenSentinelClient("http://localhost:8080")
middleware = OpenSentinelMiddleware(client)
# Flask view decorator
@app.route("/protected", methods=["POST"])
@middleware.flask_verify()
def protected_route():
return {"status": "ok"}
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.
Metadata
Release files for azanian-eagle-opensentinel 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| azanian_eagle_opensentinel-1.1.0.tar.gz | 6.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| azanian_eagle_opensentinel-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.5 kB
Release files / azanian_eagle_opensentinel-1.1.0.tar.gz
| Download URL | azanian_eagle_opensentinel-1.1.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
912ee063728d23aaf09200de6289ceac2eca79564147ef6ca33a7ba979539065
|
|
BLAKE2b-256 checksum How to use checksums |
5bcc6cfbcc908d3de416a7e25b9ff6e81df2444bd03fe82addc92c45e594525a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / azanian_eagle_opensentinel-1.1.0-py3-none-any.whl
| Download URL | azanian_eagle_opensentinel-1.1.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d83850329d01ea622d83e9e9c0467a0611147106d61b9f10c6ef360f0a804cb
|
|
BLAKE2b-256 checksum How to use checksums |
3f84688df65445015c734175afca8d9b166bdb8e63203e7d893289a35d803050
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logSecurity for azanian-eagle-opensentinel 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for azanian_eagle_opensentinel-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.