Skip to main content

Argus Python SDK - Instrumentation for AI-native observability

Project description

argus-python

Argus Python SDK — instrumentation for AI-native observability, monitoring, and security.

Installation

pip install argus-ai-sdk

With framework extras:

pip install argus-ai-sdk[fastapi]
pip install argus-ai-sdk[flask]

Quick Start

Initialize the SDK

import argus

argus.init(
    server_url="https://argus.example.com",
    api_key="your-api-key",
    service_name="my-service",
)

Framework Middleware

FastAPI:

from fastapi import FastAPI
from argus.middleware.fastapi import ArgusMiddleware

app = FastAPI()
app.add_middleware(ArgusMiddleware)

Flask:

from flask import Flask
from argus.middleware.flask import ArgusFlask

app = Flask(__name__)
ArgusFlask(app)

Trace Functions

from argus.decorators import trace

@trace("fetch_user")
async def fetch_user(user_id: str):
    # Automatically creates a span with timing and error capture
    ...

Capture Exceptions

try:
    risky_operation()
except Exception:
    argus.capture_exception()

Breadcrumbs

argus.add_breadcrumb(
    category="http",
    message="GET /api/users",
    data={"status_code": 200}
)

Custom Events

argus.event("payment_processed", {"amount": 99.99, "currency": "USD"})

Features

  • Distributed Tracing — W3C Traceparent propagation across services
  • Framework Middleware — FastAPI and Flask integrations
  • Function Tracing@trace decorator for sync and async functions
  • Exception Capture — Automatic stack traces with breadcrumb context
  • Breadcrumbs — Trail of events leading up to errors
  • Custom Events — Send arbitrary telemetry data
  • HTTP Instrumentation — Auto-instrument outgoing httpx requests
  • Serverless Support — Auto-detects AWS Lambda, Vercel, GCP Functions, and more
  • Non-blocking — Events are batched and flushed asynchronously

License

MIT — see LICENSE for details.

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

argus_ai_sdk-0.2.0.tar.gz (53.5 kB view details)

Uploaded Source

Built Distribution

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

argus_ai_sdk-0.2.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file argus_ai_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: argus_ai_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 53.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for argus_ai_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f992ee6a31ab7c9361d3fd5f0e8d16873d57480d068428c5cce4286db0f83782
MD5 85cfd979904287970bb78a3f5cce905e
BLAKE2b-256 bebcd648b080071b3b8e51342bc69b726a21e07450cad1de43efe021c8888be1

See more details on using hashes here.

File details

Details for the file argus_ai_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: argus_ai_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for argus_ai_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbdb63cb34d6630637b232ff79e4a7ab2ffb55032ec8ebfe58250523957609d2
MD5 4365cf569f0131316372be132fe8424a
BLAKE2b-256 f8adcdf4218028ca7027cf974bbe7a7b4f1ad715e789e826c0c087d28b0a88cb

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