Python connection
Connect Python sites to ErrorNotifier
Use environment variables and copy-paste samples to send backend Python exceptions into ErrorNotifier. No Python ZIP download is published from the site; install the local package from your approved source tree or use the raw HTTPS fallback.
1. Set environment variables
# PowerShell
$env:ERRORNOTIFIER_PROJECT_KEY = "enpk_your_public_project_key"
$env:ERRORNOTIFIER_ENDPOINT = "https://errornotifier.com/wp-json/errornotifier/v1/store"
$env:ERRORNOTIFIER_BASE_URL = "https://errornotifier.com"
$env:ERRORNOTIFIER_ENVIRONMENT = "production"
$env:ERRORNOTIFIER_SERVICE_NAME = "billing-worker"
$env:ERRORNOTIFIER_RELEASE = "billing-2026.06.09.1"
# Linux/macOS shell
export ERRORNOTIFIER_PROJECT_KEY="enpk_your_public_project_key"
export ERRORNOTIFIER_ENDPOINT="https://errornotifier.com/wp-json/errornotifier/v1/store"
export ERRORNOTIFIER_BASE_URL="https://errornotifier.com"
export ERRORNOTIFIER_ENVIRONMENT="production"
export ERRORNOTIFIER_SERVICE_NAME="billing-worker"
export ERRORNOTIFIER_RELEASE="billing-2026.06.09.1"2. Capture exceptions and messages
import errornotifier
try:
raise RuntimeError("Worker job failed")
except RuntimeError as exc:
errornotifier.capture_exception(
exc,
tags={"queue": "billing"},
request={"url": "/jobs/billing/reconcile"},
)
errornotifier.capture_message(
"Nightly billing job finished with retries",
severity="warning",
tags={"queue": "billing"},
)3. Attach Python logging
import logging
from errornotifier import ErrorNotifierLoggingHandler
logger = logging.getLogger("billing-worker")
logger.setLevel(logging.INFO)
logger.addHandler(ErrorNotifierLoggingHandler(level=logging.ERROR))
try:
1 / 0
except ZeroDivisionError:
logger.exception("billing reconciliation failed")4. Flask application sample
from flask import Flask, got_request_exception, request
import errornotifier
app = Flask(__name__)
def report_error(sender, exception, **extra):
errornotifier.capture_exception(
exception,
request={
"url": getattr(request, "url", ""),
"method": getattr(request, "method", ""),
},
tags={"framework": "flask"},
)
got_request_exception.connect(report_error, app)5. Raw requests.post fallback
import os
import requests
# Raw HTTPS fallback using the same ingest contract.
response = requests.post(
"https://errornotifier.com/wp-json/errornotifier/v1/store",
headers={
"X-ErrorNotifier-Key": os.environ["ERRORNOTIFIER_PROJECT_KEY"],
"Content-Type": "application/json",
},
json={
"platform": "python",
"severity": "error",
"message": "Worker job failed",
"release": os.getenv("ERRORNOTIFIER_RELEASE", ""),
"environment": os.getenv("ERRORNOTIFIER_ENVIRONMENT", "production"),
"tags": {"service": "worker"},
},
timeout=5,
)
response.raise_for_status()| Variable | Required for | Notes |
|---|---|---|
| ERRORNOTIFIER_PROJECT_KEY | Python error-event ingestion | Public project key sent as X-ErrorNotifier-Key. This is the normal key for Python site errors. |
| ERRORNOTIFIER_SERVER_KEY | Protected backend automation | Server secret sent as Authorization: Bearer for releases, deploys, artifacts, and CI records. |
| ERRORNOTIFIER_ENDPOINT | Custom ingest endpoint | Overrides the default hosted /wp-json/errornotifier/v1/store endpoint. |
| ERRORNOTIFIER_BASE_URL | Self-hosted ErrorNotifier receiver | Builds /wp-json/errornotifier/v1/store from a base URL when ERRORNOTIFIER_ENDPOINT is absent. |
| ERRORNOTIFIER_ENVIRONMENT | Environment tagging | Defaults to production. |
| ERRORNOTIFIER_RELEASE | Release correlation | Attach build or release version to the event. |
| ERRORNOTIFIER_SERVICE_NAME | Service tagging | Adds a stable service tag to events from this Python site. |
Cross-language setup
Use the same variable names for Python workers and .NET services when they report to the same ErrorNotifier project. The Python examples and the ErrorNotifier.Extensions.Logging package both understand ERRORNOTIFIER_PROJECT_KEY, ERRORNOTIFIER_SERVER_KEY, ERRORNOTIFIER_ENDPOINT, ERRORNOTIFIER_BASE_URL, ERRORNOTIFIER_ENVIRONMENT, ERRORNOTIFIER_RELEASE, and ERRORNOTIFIER_SERVICE_NAME.
.NET package guide
The .NET guide explains the same key model, including enpk_ project keys as X-ErrorNotifier-Key and server secrets as Authorization: Bearer.
NuGet package
The package README carries these Python parity examples so .NET developers see the same deployment vocabulary directly in NuGet clients.
Open NuGet package pagePublic demo
Review the real product screens with read-only mock data
Open the demo workspace to inspect monitors, incidents, domains, alert channels, status pages, projects, issues, automated test runs, releases, artifacts, audit history, and umbrella reports without creating an account.