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.
# Import Opsgenie Class
from hns_notification.opsgenie import Opsgenie
# Your API key
api_key = 'api_key'
# Instantiate Opsgenie class
ops_genie = Opsgenie(api_key)
# Create the alert, pass the alert message body.
# This always add a `_alert_timestamp` field to the details options in alert body
# Check https://docs.opsgenie.com/docs/python-sdk-alert#section-create-alert for details on accepted alert body fields.
ops_genie.create_alert({
'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'
})
Metadata
Release files for hns-notification 20.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hns-notification-20.3.tar.gz | 2.3 kB | Without provenance | Details for hns-notification-20.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hns_notification-20.3-py3-none-any.whl | Python 3 | none | any | Details for hns_notification-20.3-py3-none-any.whl |
Total release size: 6.0 kB
Release files / hns-notification-20.3.tar.gz
| Download URL | hns-notification-20.3.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ceff3b1c6fabbdc6512171e114488435508f505aa242877ca18df5a008ad04b0
|
|
BLAKE2b-256 checksum How to use checksums |
b35188bbece0a162d53513155b97109dcbcc6edff0c95506be1f34b9553217d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7
|
Release files / hns_notification-20.3-py3-none-any.whl
| Download URL | hns_notification-20.3-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e166e81b174d32ec60bc8292c53d175a9c27158997c10cb51b0556e6ba120f3b
|
|
BLAKE2b-256 checksum How to use checksums |
ca2c8db6b3e2323f0238398dfdc83a2abee01ff7d45aee23427465efc767cc41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7
|
Security for hns-notification 20.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.