Skip to main content

Python SDK for reporting TheSeeker status events.

Project description

theseeker-status

Python SDK for sending signed status events to TheSeeker ingest.

Install

pip install theseeker-status

Usage

import os

from theseeker_status import RESULT_OK, create_status_client

status = create_status_client(
    key_id=os.environ["THESEEKER_INGEST_KEY_ID"],
    secret=os.environ["THESEEKER_INGEST_SECRET"],
    endpoint="https://ingest.theseeker.io",
    slug="homepage",
)

status.report(
    RESULT_OK,
    latency_ms=123,
    message="homepage responded normally",
    metrics={"dnsMs": 12, "tlsMs": 30},
)

endpoint can be either the full events URL (https://ingest.theseeker.io/v1/events) or the base URL (https://ingest.theseeker.io). Base URLs are sent to /v1/events automatically.

If a client-level slug is not configured, pass it per report:

status = create_status_client(
    key_id=os.environ["THESEEKER_INGEST_KEY_ID"],
    secret=os.environ["THESEEKER_INGEST_SECRET"],
    endpoint="https://ingest.theseeker.io/v1/events",
)

status.report("degraded", latency_ms=950, slug="checkout-api")

Event shape

The SDK sends a single top-level event:

{"slug":"homepage","result":"ok","latencyMs":123,"message":"homepage responded normally","metrics":{"dnsMs":12}}

Valid results are ok, degraded, and down.

Signing

Requests include X-Ingest-Key-Id, X-Timestamp, X-Nonce, and X-Signature. The signed payload is:

METHOD.upper() + PATH + TIMESTAMP + NONCE + sha256_hex(body_bytes)

The same compact JSON bytes are used for signing and transmission.

Project details


Download files

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

Source Distribution

theseeker_status-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

theseeker_status-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: theseeker_status-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for theseeker_status-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5d61acb89341e85de141e2d22d1a31246ac9ff824570bf1ea355c09859332703
MD5 cd84e6a6a0e0760584e416f99e856c7e
BLAKE2b-256 59ac308052ed56905807189559c79a63096f98f97a8190976e74b33e31039c27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for theseeker_status-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae75a3bdf1a099a20fc881fb2654318e89cc801f7c04ae44063aeff506e46b0e
MD5 7cc08694591aaf054b8a6461d7cc21f2
BLAKE2b-256 fd3a6fc318c0e1b3eacbede2e46c77ba980cdd93013082f44b8fda7ad6c6a436

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page