Skip to main content

Python wrapper for Pagerduty Events API

Project description

https://travis-ci.org/BlasiusVonSzerencsi/pagerduty-events-api.svg?branch=master Code Climate

PagerDuty Events API

Python wrapper for PagerDuty’s Events API.

Installation

pip install pagerduty_events_api

Examples

Triggering an alert:

import pagerduty_events_api

service = pagerduty_events_api.PagerdutyService('my_service_key_123')
incident = service.trigger('some_alert_description')

Please note, that the trigger method of a pagerduty_events_api.PagerdutyService object returns a pagerduty_events_api.PagerdutyIncident instance. Through this instance You can retrieve the identifyer of the triggered incident, acknowledge or resolve it later.

Acknowledging an incident:

import pagerduty_events_api

incident = pagerduty_events_api.PagerdutyIncident('my_service_key_123', 'my_incident_key456')
incident.acknowledge()

Resolving an incident:

import pagerduty_events_api

incident = pagerduty_events_api.PagerdutyIncident('my_service_key_123', 'my_incident_key456')
incident.resolve()

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

pagerduty_events_api-0.1.0.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

pagerduty_events_api-0.1.0-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

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