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
    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.2.tar.gz (7.7 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.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apialerts-1.1.2.tar.gz
  • Upload date:
  • Size: 7.7 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.2.tar.gz
Algorithm Hash digest
SHA256 d819c4e53f392a9e7e90e2306eb8b6381bb60c8337335b5e1823af09346ece55
MD5 38c9f8a42805a3101b3f9d41db1b871a
BLAKE2b-256 542c114da058e37b1f278d2e18efd1cfdf3336c3d64a958f5efa12df7ecbd14e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: apialerts-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 783596d780987172ebb6ded62731cad3ec5ac9c8e34c27088bbba32e3cc30b45
MD5 304d8bc2f07b1e0770971e5121b0e67c
BLAKE2b-256 9c7430c696159a1e890e0a13bd52e054df9195c24fd039f11b12a24eb23a4035

See more details on using hashes here.

Provenance

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