Skip to main content

Steadwing Python SDK — auto-captures exceptions, error logs and HTTP breadcrumbs

Project description

Steadwing Python SDK

Error monitoring with AI-powered Root Cause Analysis for Python applications.

PyPI | Docs | Discord


Overview

The Steadwing Python SDK auto-instruments your application to capture exceptions, error logs, and HTTP breadcrumbs then sends them to Steadwing for automated Root Cause Analysis.

Key features:

  • Automatic exception capture (including threads and async)
  • logging.error() / logging.critical() forwarding
  • HTTP request breadcrumbs for debugging context
  • Built-in data scrubbing for sensitive fields
  • Framework integrations for FastAPI, Django, Flask, and more

Installation

pip install steadwing

Requires Python 3.10+

Quick Start

import steadwing

steadwing.init(api_key="st_your_api_key")

That's it. Steadwing is now capturing errors in your application.

Configuration

steadwing.init(
    api_key="st_...",           # Required: your API key
    service="my-service",       # Service name for grouping
    environment="production",   # Deployment environment
    enabled=True,               # Set False to disable
    backend_url="https://...",  # Override backend URL
)
Option Type Default Description
api_key str - Your Steadwing API key (required)
service str None Service name for grouping errors
environment str "production" Deployment environment label
enabled bool True Toggle SDK on/off
backend_url str None Override the default backend URL

The backend URL can also be set via the STEADWING_BACKEND_URL environment variable.

Usage

Automatic Capture

Once initialized, Steadwing automatically captures:

  • Unhandled exceptions: including in threads and async tasks
  • Error logs: logging.error() and logging.critical() calls
  • Breadcrumbs: outgoing HTTP requests, log messages (rolling buffer of last 100)

Manual Capture

import steadwing

# Capture a specific exception
try:
    risky_operation()
except Exception as e:
    steadwing.capture_exception(e)

# Capture the current exception (in an except block)
try:
    risky_operation()
except Exception:
    steadwing.capture_exception()

# Capture a message
steadwing.capture_message("Deployment completed", level="info")

Integrations

Steadwing provides first-class support for popular Python frameworks:

Framework Auto-instrumentation
FastAPI Route errors with request context
Django Middleware-based exception capture
Flask Error handler integration
SQLAlchemy Database query breadcrumbs
asyncio Async task exception capture

Integrations are automatically activated when the corresponding library is detected.

Data Scrubbing

Sensitive data is automatically scrubbed from captured events. Keys matching the following patterns (case-insensitive) have their values replaced with [REDACTED]:

password · passwd · secret · api_key · apikey · token · auth · authorization · cookie · csrf · session · credit_card · ssn

Contributing

We welcome contributions! Here's how to get started:

# Clone the repository
git clone https://github.com/steadwing/steadwing-python.git
cd steadwing-python

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

Community

  • Discord - Ask questions, share feedback, and connect with the team
  • GitHub Issues - Report bugs or request features

License

This project is licensed under the Apache License 2.0.

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

steadwing-0.1.2.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

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

steadwing-0.1.2-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file steadwing-0.1.2.tar.gz.

File metadata

  • Download URL: steadwing-0.1.2.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for steadwing-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c8c42b5f4089047c9f3a02333c2fa771603ead77f6ee6d303b886049a53e7f38
MD5 f9a4e2d154c7605bfcc74d7c95f54b5a
BLAKE2b-256 62e46f1f91b895eed148e9a798e09b33e4382a2e247e78e6d630750a45462844

See more details on using hashes here.

Provenance

The following attestation bundles were made for steadwing-0.1.2.tar.gz:

Publisher: publish.yml on steadwing/steadwing-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file steadwing-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: steadwing-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for steadwing-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e5c26813a71dd52d469ec17abdf89c72a55b2ec7d20f950042cbb94114c577de
MD5 c9323d9fc27a10b747c0895d164e5255
BLAKE2b-256 72da5ed2e46c1dae68cd9af22a4c4b3ba7fe12a73a6ed4f72ebaa3985ba74090

See more details on using hashes here.

Provenance

The following attestation bundles were made for steadwing-0.1.2-py3-none-any.whl:

Publisher: publish.yml on steadwing/steadwing-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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