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.2.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.2-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: argus_ai_sdk-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 7b8700c3755b1f86193d32c0847f373365342d7433dfa873896d7fdf81338b58
MD5 fd2db3395537d71fd1e5f81696f94672
BLAKE2b-256 f37009a2d000bae4d3288f9b7d90b498ef6b5f0f4565c5ebad41ad718fd25d48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: argus_ai_sdk-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 22.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3cb160c96215ed8783fba7a4fb2272eb842784abbff456eaf1b91a5838a8a60f
MD5 c929d3126b0f4583018065f9d62f9632
BLAKE2b-256 c0968e774092bbfc286134dba77009bb34060bfeccae6960567f82c71a7e6f0a

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