Backwork plug-in for HTTP notifications.
Project description
backwork-notifier-http
Support for HTTP notifications on backwork.
Installing
You can use pip
to install this plug-in directly:
$ pip install backwork-notifier-http
Using
After installing the plug-in you will be able to use the -n http
argument on backwork
commands.
$ backwork --help
usage: backwork [-h] [-n NOTIFIERS] [--http-notifier-url HTTP_NOTIFIER_URL]
[--http-notifier-bearer HTTP_NOTIFIER_BEARER]
[--http-notifier-basic-user HTTP_NOTIFIER_BASIC_USER]
[--http-notifier-basic-pass HTTP_NOTIFIER_BASIC_PASS]
[--http-notifier-method HTTP_NOTIFIER_METHOD]
[--http-notifier-data HTTP_NOTIFIER_DATA]
[--http-notifier-params HTTP_NOTIFIER_PARAMS]
[--http-notifier-add-headers HTTP_NOTIFIER_ADD_HEADERS]
[--http-notifier-key HTTP_NOTIFIER_KEY]
{backup,restore,upload,show,download} ...
positional arguments:
{backup,restore,upload,show,download}
optional arguments:
-h, --help show this help message and exit
-n NOTIFIERS, --notify NOTIFIERS
enable a notifier, it can be used multiple times
--http-notifier-url HTTP_NOTIFIER_URL
The URL to be targeted as the HTTP request endpoint
--http-notifier-bearer HTTP_NOTIFIER_BEARER
If set, this value will be used as an Authorization Bearer
token and sent with the HTTP request.
--http-notifier-basic-user HTTP_NOTIFIER_BASIC_USER
If set, this value (along with --http-notifier-basic-pass)
will be used for basic auth and sent with the HTTP request.
--http-notifier-basic-pass HTTP_NOTIFIER_BASIC_PASS
If set, this value (along with --http-notifier-basic-user)
will be used for basic auth and sent with the HTTP request.
--http-notifier-method HTTP_NOTIFIER_METHOD
The method to be used for the HTTP request. Choose from
'post' or 'get'. Default is 'post'.
--http-notifier-data HTTP_NOTIFIER_DATA
JSON string sent as the 'data' object with the HTTP
request. Format as the following: '{"key": "value"}'
--http-notifier-params HTTP_NOTIFIER_PARAMS
JSON string with params to be sent with the HTTP request.
--http-notifier-add-headers HTTP_NOTIFIER_ADD_HEADERS
JSON string with headers to be sent with the HTTP request.
For authorization, use --http-notifier-bearer or --http-
notifier-basic-user & --http-notifier-basic-pass.
--http-notifier-key HTTP_NOTIFIER_KEY
The key name for the error message (from backwork) that is
appended to the 'data' (--http-notifier-data) object. Use
'.' to traverse the JSON tree (up to 6 levels deep). For
example, --http-notifier-key="data.error.message" is 3
levels deep. By default, if no key is specified the error
message will not be appended.
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
Close
Hashes for backwork-notifier-http-new-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55468482073b1d6f4b7473b2a03411bf759308357d1a9cce11ee4a18d45b28d3 |
|
MD5 | 8cd6bb7c31e4c0da17e9b8fcb9351c1d |
|
BLAKE2b-256 | d38ceb83e5d50d9f39fbae17a616fcb704b27b3fd55d279ccac441009d814e5b |
Close
Hashes for backwork_notifier_http_new-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86a3ba16aa47fa9951cd84e06fc750a10cd30772a954459aae652dfab92077c9 |
|
MD5 | 3173f77e8066cc89a775184483a84675 |
|
BLAKE2b-256 | 5f2d89ba3e0d1c0834ee91c60d8884486952e7da46ad6218a5deef1ad196c8a9 |