Pylert Alert Manager
raw JSON → 0.1.1 verified Fri May 01 auth: no python
Library to ease interaction with Alert Manager API. Current version 0.1.1, early development stage with occasional releases.
pip install pylertalertmanager Common errors
error AttributeError: module 'pylertalertmanager' has no attribute 'AlertManager' ↓
cause Incorrect import path (e.g., import pylertalertmanager and using pylertalertmanager.AlertManager).
fix
Use: from pylertalertmanager import AlertManager
error ImportError: No module named 'pylertalertmanager' ↓
cause Library not installed or wrong Python environment.
fix
Run: pip install pylertalertmanager
Warnings
gotcha The API may be unstable due to early development (v0.1.1). Expect breaking changes in methods and parameters. ↓
fix Pin to exact version and test upgrades.
gotcha The library uses Python 3.4+ but may not support newer AlertManager API versions. ↓
fix Check compatibility with your AlertManager version.
deprecated No deprecation notices as library is very early.
Imports
- AlertManager
from pylertalertmanager import AlertManager
Quickstart
from pylertalertmanager import AlertManager
# Assuming AM_URL and API_KEY env vars are set
am = AlertManager(url='http://alertmanager:9093')
# Or with API key: AlertManager(url='...', api_key='...')
alerts = am.get_alerts()
print(alerts)