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.2.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.2.tar.gz.
File metadata
- Download URL: alertiqo-1.0.2.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 |
aa6610da809375757e93af6fddc2eee30a73637697731030fb5be9c94483acb0
|
|
| MD5 |
53caeaee1263ee91e988bd94259b15d2
|
|
| BLAKE2b-256 |
3aff2075ece36b028e72a775cf816dc4e3918a3ff595f68d0b753fc233b1b46f
|
File details
Details for the file alertiqo-1.0.2-py3-none-any.whl.
File metadata
- Download URL: alertiqo-1.0.2-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 |
cdcf1777d1aa39162288521c47197bb289a7f0b67352f0de5160246704d41a89
|
|
| MD5 |
5ccc4a8615dce59a92495ba688e93894
|
|
| BLAKE2b-256 |
5ef292ab3b674e327f9317c26be941cea0db63a2514e0794f458e0d4b7308cd7
|