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
)
try:
client.send_alert(audience=["admin"], alert="Alert")
except NotifoxAuthenticationError:
pass
except NotifoxRateLimitError:
pass
except NotifoxAPIError as e:
print(f"{e.status_code}: {e.response_text}")
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.0.tar.gz
(4.1 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.0.tar.gz.
File metadata
- Download URL: notifox-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
605579da2d65c1e261577a307a694c36581b882e06b270d2f23cd5a50f97a43f
|
|
| MD5 |
86553de2ed7723968e5e04ac20eebb7a
|
|
| BLAKE2b-256 |
b96a386619356477ae76daa134603025f7b431a4a1e4c3761b02f8d99b52d92f
|
File details
Details for the file notifox-0.1.0-py3-none-any.whl.
File metadata
- Download URL: notifox-0.1.0-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 |
27cd24b68e8d1436f56ea461b6e8c4f36d84d4098966c4fc59b3e6da3cc27458
|
|
| MD5 |
53e5c44111322b1e2c46b51bf0da7ba0
|
|
| BLAKE2b-256 |
023e1de02b9fc2b05371b81b6be623c207cff07167401695beb0165fb3abd6a2
|