Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opsduty-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opsduty-python

Command-line utility for interfacing with OpsDuty.

  • 0.2.0
  • PyPI
  • Socket score

Maintainers
1

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")

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc