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==<latest-version>

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
from apialerts.models.event import ApiAlertsEvent

# Construct your alert with additional channel, tags and a link
data = ApiAlertsEvent(
    message='Payment Received',    # required
    channel='email',               # optional
    tags=['Growth', 'Promotion'],  # optional
    link='https://apialerts.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.0.tar.gz (5.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.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file apialerts-1.1.0.tar.gz.

File metadata

  • Download URL: apialerts-1.1.0.tar.gz
  • Upload date:
  • Size: 5.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.0.tar.gz
Algorithm Hash digest
SHA256 012e7b15eee4ffbbab654ad2511c14cae3e687510335404b9fc42bf1f6fea6c4
MD5 976f374d13649f9421ecb1afe411d5e1
BLAKE2b-256 7619f4f3d8adce85021a0afe8ffe8a0b5bc7193495fe9431174279c1872ada6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for apialerts-1.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: apialerts-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36f366bf94a2a60f7fb7ef16f7dd19d80c4088becd30df3360362da57d7e379a
MD5 4ff118cadce52662986e58d6a30a4ec0
BLAKE2b-256 31c2f3b1e10aebe56981e2f68b4fd348a6be044666d34840043f58f03fc315da

See more details on using hashes here.

Provenance

The following attestation bundles were made for apialerts-1.1.0-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