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.0.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.0.tar.gz.
File metadata
- Download URL: alertiqo-1.0.0.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 |
f262a59a2181025d4a21ee1d3e4b9d1397ea9f90828feae755505bada2cd775f
|
|
| MD5 |
3e9af643baed104eac15b3b8787cb751
|
|
| BLAKE2b-256 |
a832be92b61df6908775f7d20487bc25f5da60d0efa6475f1e37e1a91c0c8585
|
File details
Details for the file alertiqo-1.0.0-py3-none-any.whl.
File metadata
- Download URL: alertiqo-1.0.0-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 |
358566b866ca70f6831a91d12536dcd1c9ee65fadb360ae5aefd91892a8490e8
|
|
| MD5 |
eda25432fd86ed6544a1c562c1c839e2
|
|
| BLAKE2b-256 |
6c66f54978686cacfdfa2075ff044b1134df50ef78dd98d73bb24c593caf14e6
|