Skip to main content

Python wrapper for the API Alerts service

Project description

apialerts-python

Python client for the apialerts.com platform

DocsGitHubPyPI

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apialerts-1.1.3.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apialerts-1.1.3-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

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

Hashes for apialerts-1.1.3.tar.gz
Algorithm Hash digest
SHA256 80bc6fcdfe64a636a1678d941441925bf2f5f20fbac68bc960b4ce177e619826
MD5 08564780c05224af6a29fc74da97f987
BLAKE2b-256 85f61cf49dd92d91270e8075bc843a217a69a84f2ebdbe5357a34f581458a4ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for apialerts-1.1.3.tar.gz:

Publisher: publish-pypi.yml on apialerts/apialerts-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for apialerts-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1e4de27b3620cf76d2c902d13bbb9ca5fc78c9b686f79f0b66e45a1770478825
MD5 3d318ae1cc4bcd94c7a80c3a78558d8a
BLAKE2b-256 ca654aad05469bc920c458f615f6412303b1bf0cbf487a9b3289435cc92f56c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for apialerts-1.1.3-py3-none-any.whl:

Publisher: publish-pypi.yml on apialerts/apialerts-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page