Skip to main content

This is a client to interact with the Sensu API

Project description

This is a client to interact with the Sensu API


  • Includes methods for some entrypoints (clients, events, checks, stashes) of the Sensu API (0.24) IMPORTANT: from 0.6.0 release we are supporting Sensu API 0.24+ .. backward compatibility with previous versions of Sensu API might be broken.
  • Includes methods for handle subscriptions info (nodes subscribed to a specific channel)

Trivial Example

from pysensu.api import SensuAPI

url = 'http://localhost:4567'
my_sensu = SensuAPI(url, username=username, password=password)


To enable debug import logging module and set the debug level

import logging


You can handle an exception using a code like this. Note: Sensu API give you a 404 code if a client does not exists.

import pysensu.api

url = 'http://localhost:4567'
my_sensu = pysensu.api.SensuAPI(url)
client = "testclient"

except pysensu.api.SensuAPIException as e:
    if "404" in str(e):
        print("{} does not exists on sensu api".format(client))
        raise e


The full documentation is at


0.13.0 (2019-07-23)

0.10.0 (2017-05-17)

  • Add support for results API

0.9.0 (2017-03-13)

  • Add support for silenced API

0.8.0 (2016-11-28)

  • Added operations for Aggregates and Status (Health/Info)
  • Added support for optional limit/offset parameters to get_clients
  • Modified post_check_request to work properly with subscribers.

0.7.0 (2016-08-17)

  • Fix adding stashes

0.6.0 (2016-08-02)

  • Fix calls to Sensu API entrypoints in order to make them compatible with lastest version of Sensu API (0.24) previous versions of Sensu API might not behave as expected.

0.1.0 (2015-12-15)

  • First release on PyPI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pysensu-ng, version 0.13.0
Filename, size File type Python version Upload date Hashes
Filename, size pysensu_ng-0.13.0-py2.py3-none-any.whl (6.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pysensu-ng-0.13.0.tar.gz (7.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page