Skip to main content

Command-line utility for interfacing with OpsDuty.

Project description

opsduty-python

Command-line utility for interfacing with OpsDuty.

Heartbeats

Send periodic heartbeats to OpsDuty using opsduty-python. The heartbeat needs to be configured in OpsDuty before check-ins can be observed. Head over to https://opsduty.io to configure your heartbeats.

Alternative 1: Decorator

from opsduty_python.heartbeats.heartbeats import (
    heartbeat_checkin,
)

@heartbeat_checkin(heartbeat="HBXXXX", environment="prod", enabled=True)
def periodic_job():
    pass

Alternative 2: Send heartbeat manually.

from opsduty_python.heartbeats.heartbeats import (
    send_heartbeat_checkin,
)

def periodic_job():
    try:
        pass
    except Exception:
        print("Job failed.")
    else:
        send_heartbeat_checkin(heartbeat="HBXXXX", environment="prod")

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

opsduty_python-0.2.0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

opsduty_python-0.2.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file opsduty_python-0.2.0.tar.gz.

File metadata

  • Download URL: opsduty_python-0.2.0.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for opsduty_python-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f2094ee7f14cba51a0e773afd4fe98620eb124fd6b01082e4a81f8f63c137e45
MD5 51933e269f1465ffb6c2613f6561722f
BLAKE2b-256 2bea930d358dfe2bd785a0d140c37ae464d2b69bd22f4f311ac21cf2547e6727

See more details on using hashes here.

File details

Details for the file opsduty_python-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: opsduty_python-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for opsduty_python-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2110f4b2716809f9983a5474ca5fb289507c58ae48b5229132bd2d8f9d9d03a5
MD5 360b369f0efd04d7348afccc43c5e177
BLAKE2b-256 72b88f2a613ae763f2b9c4452a637133ae45f9ebf92e061bfbca81f42d15a365

See more details on using hashes here.

Supported by

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