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.1.tar.gz (53.9 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.1-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: argus_ai_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 53.9 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.1.tar.gz
Algorithm Hash digest
SHA256 28503375441ca22e9bd9b21c5469d890fcfa774552cf8d9dd54b2b172a6ab420
MD5 fe6fcbe9bd36a96ac2fa7d65cd0eede1
BLAKE2b-256 af63f9d15d47d75e9ad18ab8a5fd0f9f56a27c875d5f78b7bb33915bee6a4ba0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: argus_ai_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 22.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f23e3b8b830b26438fae4a9b80d6d7271a3dca14c0b8071765a5abc71ff21792
MD5 9281450458e225736fde5e45a8f1a2c6
BLAKE2b-256 3a7c0f769071c067dca6b578b5d0b96a72483b5966a24a4dd88c4647e132f387

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