Steadwing Python SDK — auto-captures exceptions, error logs and HTTP breadcrumbs
Project description
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_URLenvironment variable.
Usage
Automatic Capture
Once initialized, Steadwing automatically captures:
- Unhandled exceptions: including in threads and async tasks
- Error logs:
logging.error()andlogging.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file steadwing-0.1.1.tar.gz.
File metadata
- Download URL: steadwing-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
595d5606928c3892ffa76a36e21e0c304ee558dfe717aa06c7b2cd14262053e6
|
|
| MD5 |
07d96ead311d489e538af084fded74fb
|
|
| BLAKE2b-256 |
64f8feba9b9774c0708d73e9baaaaad1484c93be1014e4cc88fa82e3886481c9
|
Provenance
The following attestation bundles were made for steadwing-0.1.1.tar.gz:
Publisher:
publish.yml on steadwing/steadwing-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
steadwing-0.1.1.tar.gz -
Subject digest:
595d5606928c3892ffa76a36e21e0c304ee558dfe717aa06c7b2cd14262053e6 - Sigstore transparency entry: 1908406531
- Sigstore integration time:
-
Permalink:
steadwing/steadwing-python@45cc9c35fdfc2832f95829e5d7df997c9b5ac6ae -
Branch / Tag:
refs/heads/main - Owner: https://github.com/steadwing
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@45cc9c35fdfc2832f95829e5d7df997c9b5ac6ae -
Trigger Event:
push
-
Statement type:
File details
Details for the file steadwing-0.1.1-py3-none-any.whl.
File metadata
- Download URL: steadwing-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
548f28cccd40778cd3266219ac0e1fea514fc72e26ca758d0de6bd5b66dc0ba1
|
|
| MD5 |
3f910032f1bc776c6bc9bf15846c3903
|
|
| BLAKE2b-256 |
956e87f2d8af87d98c29756d8a1ecf12aa763c05f541e9b0235da538f151c1b3
|
Provenance
The following attestation bundles were made for steadwing-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on steadwing/steadwing-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
steadwing-0.1.1-py3-none-any.whl -
Subject digest:
548f28cccd40778cd3266219ac0e1fea514fc72e26ca758d0de6bd5b66dc0ba1 - Sigstore transparency entry: 1908406778
- Sigstore integration time:
-
Permalink:
steadwing/steadwing-python@45cc9c35fdfc2832f95829e5d7df997c9b5ac6ae -
Branch / Tag:
refs/heads/main - Owner: https://github.com/steadwing
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@45cc9c35fdfc2832f95829e5d7df997c9b5ac6ae -
Trigger Event:
push
-
Statement type: