Python wrapper for the API Alerts service
Project description
apialerts-python
Python client for the apialerts.com platform
Installation
Install the latest apialerts package from PyPI
pip install apialerts
Initialize the client
from apialerts import ApiAlerts
# Configure the client with a default workspace API Key
ApiAlerts.configure('your-api-key')
# Or, Configure the client with a default workspace API Key with logging enabled
ApiAlerts.configure('your-api-key', debug=True)
Note: The ApiAlerts class is implemented as a singleton.
Send Events
from apialerts import ApiAlerts, ApiAlertsEvent
# Construct your alert with additional channel, tags and a link
data = ApiAlertsEvent(
message='Payment Received', # required
channel='revenue', # optional, uses the default channel if not provided
tags=['Growth', 'Promotion'], # optional
link='https://stripe.com' # optional
)
# Send alert to your workspace using the default API Key
ApiAlerts.send(data)
# Or, Send alert to you project with an alternate API Key
ApiAlerts.send_with_api_key('your-api-key', data)
The send_async() and send_with_api_key_async() methods are also available if you need to wait for a successful execution. However, the send() functions are generally always preferred.
Feedback & Support
If you have any questions or feedback, please create an issue on our GitHub repository. We are always looking to improve our service and would love to hear from you. Thanks for using API Alerts!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 apialerts-1.1.3.tar.gz.
File metadata
- Download URL: apialerts-1.1.3.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80bc6fcdfe64a636a1678d941441925bf2f5f20fbac68bc960b4ce177e619826
|
|
| MD5 |
08564780c05224af6a29fc74da97f987
|
|
| BLAKE2b-256 |
85f61cf49dd92d91270e8075bc843a217a69a84f2ebdbe5357a34f581458a4ec
|
Provenance
The following attestation bundles were made for apialerts-1.1.3.tar.gz:
Publisher:
publish-pypi.yml on apialerts/apialerts-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apialerts-1.1.3.tar.gz -
Subject digest:
80bc6fcdfe64a636a1678d941441925bf2f5f20fbac68bc960b4ce177e619826 - Sigstore transparency entry: 163621196
- Sigstore integration time:
-
Permalink:
apialerts/apialerts-python@fa64b090becbdf1a3d368441cc0d0b3f8f015322 -
Branch / Tag:
refs/tags/1.1.3 - Owner: https://github.com/apialerts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@fa64b090becbdf1a3d368441cc0d0b3f8f015322 -
Trigger Event:
release
-
Statement type:
File details
Details for the file apialerts-1.1.3-py3-none-any.whl.
File metadata
- Download URL: apialerts-1.1.3-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e4de27b3620cf76d2c902d13bbb9ca5fc78c9b686f79f0b66e45a1770478825
|
|
| MD5 |
3d318ae1cc4bcd94c7a80c3a78558d8a
|
|
| BLAKE2b-256 |
ca654aad05469bc920c458f615f6412303b1bf0cbf487a9b3289435cc92f56c6
|
Provenance
The following attestation bundles were made for apialerts-1.1.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on apialerts/apialerts-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apialerts-1.1.3-py3-none-any.whl -
Subject digest:
1e4de27b3620cf76d2c902d13bbb9ca5fc78c9b686f79f0b66e45a1770478825 - Sigstore transparency entry: 163621198
- Sigstore integration time:
-
Permalink:
apialerts/apialerts-python@fa64b090becbdf1a3d368441cc0d0b3f8f015322 -
Branch / Tag:
refs/tags/1.1.3 - Owner: https://github.com/apialerts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@fa64b090becbdf1a3d368441cc0d0b3f8f015322 -
Trigger Event:
release
-
Statement type: