Alertiqo SDK for Python error tracking
Project description
Alertiqo Python SDK
Error tracking SDK for Python applications.
Installation
pip install alertiqo
Usage
Basic Setup
from alertiqo import Alertiqo
alertiqo = Alertiqo(
api_key="your-api-key",
endpoint="https://alertiqo.hamizi.net",
environment="production",
release="1.0.0",
)
alertiqo.init()
Capture Exceptions
try:
raise ValueError("Something went wrong")
except Exception as e:
alertiqo.capture_exception(e)
Capture Messages
alertiqo.capture_message("User completed checkout", level="info")
Add Breadcrumbs
alertiqo.add_breadcrumb(
message="User clicked button",
category="user-action",
level="info",
data={"button_id": "submit-btn"}
)
Set User Context
alertiqo.set_user(
user_id="12345",
email="user@example.com",
username="johndoe"
)
Set Tags
alertiqo.set_tag("page", "checkout")
alertiqo.set_tags({
"feature": "payments",
"version": "2.1.0"
})
Flask Integration
from flask import Flask
from alertiqo import Alertiqo, alertiqo_middleware
app = Flask(__name__)
alertiqo = Alertiqo(
api_key="your-api-key",
endpoint="https://alertiqo.hamizi.net",
)
alertiqo.init()
# Add middleware
app.wsgi_app = alertiqo_middleware(alertiqo)(app.wsgi_app)
Django Integration
# settings.py
ALERTIQO_API_KEY = "your-api-key"
ALERTIQO_ENDPOINT = "https://alertiqo.hamizi.net"
# In your app's apps.py or __init__.py
from alertiqo import Alertiqo
alertiqo = Alertiqo(
api_key=settings.ALERTIQO_API_KEY,
endpoint=settings.ALERTIQO_ENDPOINT,
)
alertiqo.init()
API
Alertiqo(config)
Creates a new Alertiqo instance.
Config Options:
api_key(required): Your API keyendpoint(required): Backend endpoint URLenvironment: Environment name (default:PYTHON_ENVor 'production')release: Release versiontags: Default tags for all errorscapture_unhandled: Auto-capture uncaught exceptions (default: True)before_send: Callback to modify/filter errors before sending
Methods
init(): Initialize error handlerscapture_exception(error, additional_data=None): Capture an exceptioncapture_message(message, level="info"): Capture a messageadd_breadcrumb(message, category, level, data): Add a breadcrumbset_user(user_id, email, username): Set user contextset_tag(key, value): Set a single tagset_tags(tags): Set multiple tags
License
MIT
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
alertiqo-1.0.1.tar.gz
(5.7 kB
view details)
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 alertiqo-1.0.1.tar.gz.
File metadata
- Download URL: alertiqo-1.0.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95d3df07f349d28a336458a3660e5fb6de38c34fcf0651899049c48705f597db
|
|
| MD5 |
b0533246f2371570d07bd6f5c3756f0e
|
|
| BLAKE2b-256 |
bed71a3d9b93ffbe1be336c61f1629cd3bcfb42196b128d62ae4aefbdda70c89
|
File details
Details for the file alertiqo-1.0.1-py3-none-any.whl.
File metadata
- Download URL: alertiqo-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9993d1588e90a31be11134684aa6579b458b47483ebb0b58f06d301d7af49568
|
|
| MD5 |
cb94a7b7de9e1e5ae06f8303f772dce1
|
|
| BLAKE2b-256 |
3a8820897db4354a73d5ee6df5bcdbecd0d095a8acb56195f556aca0b149f272
|