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

Uploaded Python 3

File details

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

File metadata

  • Download URL: argus_ai_sdk-0.2.3.tar.gz
  • Upload date:
  • Size: 54.0 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.3.tar.gz
Algorithm Hash digest
SHA256 57f6571e2c6524f3a2c859abce7da92821c9828be6a596f5409d8a8d30a3f414
MD5 b0931dc23c0016158a33a736fdff67f4
BLAKE2b-256 907e72f7814fca0c6f48ed9f161e7a8c73a086316a23a7034816ff2b5f39cd83

See more details on using hashes here.

File details

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

File metadata

  • Download URL: argus_ai_sdk-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b8199fe854407a6e9011fa4c4ee961994e23df7f5128fe2aab27ef8909ac0384
MD5 178d7e7fbfa711e16d91e2a8b90422b9
BLAKE2b-256 9b5c923a8ea5655efb7ae2021aa96f8e20dc28420e2f33b35e32d1b9c7fc149b

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