Thin wrappers around various notification systems
Project description
hns_notification
Thin wrapper around various notification systems.
Notifications available
- Opsgenie
Installation
pip install hns-notification
Opsgenie usage
Below code snippet shows how to create alert on opsgenie.
# Your API key
api_key = 'api_key'
# Configure the opsgenie api. This would return you an api client object
api_client = configure(api_key)
# Create the alert, pass the api client and the alert message body.
# Check https://docs.opsgenie.com/docs/python-sdk-alert#section-create-alert for details on accepted alert body fields.
alert = create_alert(api_client, {
'message': 'sample_msg',
'alias': 'some-alias',
'responders': [{
'name': 'SampleTeam',
'type': 'team'
}],
'visible_to': [
{'name': 'Sample',
'type': 'team'}],
'actions': ['Restart', 'AnExampleAction'],
'tags': ['OverwriteQuietHours'],
'details': {'key1': 'value1',
'key2': 'value2'},
'entity': 'An example entity',
'priority': 'P3',
'description': 'Sample of SDK v2'
})
# This returns the opsgenie response object containing the request_id and result of create alert.
print(alert)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hns-notification-19.12.tar.gz.
File metadata
- Download URL: hns-notification-19.12.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1380ad43d168f85133669ba8bcdb39c89f019ad77cffeee3e3b1494f5d6a688
|
|
| MD5 |
409a7b7b8459bb2793be8975b331241f
|
|
| BLAKE2b-256 |
6b5bad18b8ae8aa11184f1531b2d9d6673a343600a241e9eeb069681ae1c0582
|
File details
Details for the file hns_notification-19.12-py3-none-any.whl.
File metadata
- Download URL: hns_notification-19.12-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a9cc6f9907f7de14107aebb23300670dae854f2cd029c48bf72817b898d10eb
|
|
| MD5 |
e0bb8b9cf6ece89b99e6b2513c4ae209
|
|
| BLAKE2b-256 |
24e2d02330ace0f675403d248948239a57c8fa3c26528010e971db96d40ae5d6
|