Official Python SDK for Notifox alerting API
Project description
notifox-py
Python SDK for Notifox.
Installation
pip install notifox
Usage
from notifox import NotifoxClient
client = NotifoxClient(api_key="your_api_key_here")
client.send_alert(audience="mike", alert="Database server is down!")
Or use the environment variable:
export NOTIFOX_API_KEY="your_api_key_here"
client = NotifoxClient() # Reads from NOTIFOX_API_KEY
client.send_alert(audience="mike", alert="High CPU usage!")
Configuration
client = NotifoxClient(
api_key="your_api_key",
base_url="https://api.notifox.com",
timeout=30.0,
max_retries=3
)
Error Handling
from notifox import (
NotifoxClient,
NotifoxAuthenticationError,
NotifoxRateLimitError,
NotifoxAPIError,
NotifoxConnectionError
)
client = NotifoxClient(api_key="your_api_key")
try:
client.send_alert(audience="admin", alert="System is running low on memory")
except NotifoxAuthenticationError:
print("Authentication failed. Check your API key.")
except NotifoxRateLimitError:
print("Rate limit exceeded. Please wait before sending more alerts.")
except NotifoxAPIError as e:
print(f"API error ({e.status_code}): {e.response_text}")
except NotifoxConnectionError as e:
print(f"Connection failed: {e}")
Available exceptions:
NotifoxError- Base exceptionNotifoxAuthenticationError- Authentication failed (401/403)NotifoxRateLimitError- Rate limit exceeded (429)NotifoxAPIError- General API errorsNotifoxConnectionError- Network errors
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
notifox-0.1.1.tar.gz
(4.2 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 notifox-0.1.1.tar.gz.
File metadata
- Download URL: notifox-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5335afdb7b12c860fb6b80130a409c735c6e821423fcb5794bc5c36148df2a7
|
|
| MD5 |
ff6ae9a69a57897d8cafcde4c5b73408
|
|
| BLAKE2b-256 |
69a2d41315763ef94cf43ad6893c2ead6d4ccd21547d257b0375c3d75500a201
|
File details
Details for the file notifox-0.1.1-py3-none-any.whl.
File metadata
- Download URL: notifox-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d956f6aa4bf7eab915862b5f536e33a62fa97f7b9e328ba9849245a8e182fbb
|
|
| MD5 |
ef581856f4b80412e858e05b8b4b2cab
|
|
| BLAKE2b-256 |
98b5082a9c23f3a2a78bee7513d18f4736f3a8deb5c1cbf0132e63b563e95640
|