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 request header and variable 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 (default: "default")
env="PROD", # Deployment environment (default: "PROD")
enabled=True, # Set False to disable
)
| Option | Type | Default | Description |
|---|---|---|---|
api_key |
str |
- | Your Steadwing API key (required) |
service |
str |
"default" |
Service name for grouping errors |
env |
str |
"PROD" |
Deployment environment ("PROD", "DEV", etc.) |
enabled |
bool |
True |
Toggle SDK on/off |
Note: Only events sent with
env="PROD"are considered for auto-monitoring. Events from other environments are received but will not trigger automated RCA.
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)
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
Built-in redaction covers selected structured fields. For supported framework integrations (FastAPI, Django, Flask), the SDK replaces values whose exact field name matches the list below (case-insensitive) in captured request headers. Traceback-local variable names are also checked against this list.
password · passwd · secret · api_key · apikey · token · auth · authorization · cookie · csrf · session · credit_card · ssn
Redaction does not scan free-text logs, exception messages, stack traces, URLs or query strings, SQL, or values embedded inside strings. If your application may include sensitive data in these contexts, implement additional scrubbing at the application level before the data reaches Steadwing.
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.
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.4.tar.gz.
File metadata
- Download URL: steadwing-0.1.4.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b925ebd0e5532db068ecf58866cc0b85aaa3ac6472f184eddb518d0806654142
|
|
| MD5 |
3f52b77a4177cd8a52fc1be45508d6c1
|
|
| BLAKE2b-256 |
e43e138ef4f373edcb5cf332ac58e8989ef8146324b1412728d5d01f05ac32cc
|
Provenance
The following attestation bundles were made for steadwing-0.1.4.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.4.tar.gz -
Subject digest:
b925ebd0e5532db068ecf58866cc0b85aaa3ac6472f184eddb518d0806654142 - Sigstore transparency entry: 2236111415
- Sigstore integration time:
-
Permalink:
steadwing/steadwing-python@76f1d14dc77c3cc83e74696e7db80b038c00bcf8 -
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@76f1d14dc77c3cc83e74696e7db80b038c00bcf8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file steadwing-0.1.4-py3-none-any.whl.
File metadata
- Download URL: steadwing-0.1.4-py3-none-any.whl
- Upload date:
- Size: 26.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c7fbbf22d87916da8f59f76dc5a14bc428189ea72d24b375551e40d918f4597
|
|
| MD5 |
a05368350adec8969316f8488ef6ad36
|
|
| BLAKE2b-256 |
e0e172993c991ff2c44b388daa3dd33cb20b56b27821c0c088768a056546612a
|
Provenance
The following attestation bundles were made for steadwing-0.1.4-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.4-py3-none-any.whl -
Subject digest:
2c7fbbf22d87916da8f59f76dc5a14bc428189ea72d24b375551e40d918f4597 - Sigstore transparency entry: 2236111471
- Sigstore integration time:
-
Permalink:
steadwing/steadwing-python@76f1d14dc77c3cc83e74696e7db80b038c00bcf8 -
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@76f1d14dc77c3cc83e74696e7db80b038c00bcf8 -
Trigger Event:
push
-
Statement type: