Robot Framework keywords for the 'Apprise' push messaging library
Project description
robotframework-apprise
robotframework-apprise
is a Robot Framework keyword collection for the Apprise push message library. It enables Robot Framework users to send push/email messages to every message service supported by Apprise.
Installation
The easiest way is to install this package is from pypi:
pip install robotframework-apprise
Robot Framework Library Example
In order to run the example code, you need to provide at least one valid target messenger. Have a look at Apprise's list of supported messenger platforms
Library usage and supported keywords
Keyword | Description |
---|---|
Send Apprise Message |
Sends a push message through Apprise |
Set Clients and Set Attachments |
Sets a new value list and replace the previous values |
Add Client and Add Attachment |
Adds a value to an existing list |
Remove Client and Remove Attachment |
Removes a value from an existing list (if present). Trying to remove a non-existing entry will NOT result in an error |
Clear All Clients and Clear All Attachments |
Completely removes the current values from the respective list |
Set Attachment Delimiter |
Optional delimiter reconfiguration - see details below |
Set Notify Type |
Sets one of Apprise's supported notify types. Valid values are info ,success ,warning , and failure . Default notify type is info |
Set Body Format |
Sets one of Apprise's supported body formats. Valid values are html ,text , and markdown . Default body format is html |
Set Config File |
Allows you to specify a single Apprise config file in YAML or Text format |
Both clients
and attachments
options can be passed as a List
type variable or as a string
. If you use a string
, the default delimiter is a comma ,
. Use the Set Attachment Delimiter
keyword in case you need to use a different delimiter for your attachments.
All Set ...
keywords provide corresponding Get ...
keywords.
Attachments
are purely optional. Providing at least one Client
is mandatory, though.
Examples:
# Send a message with one client and a List which contains our images
@{IMAGE_LIST}= Create List http://www.mysite.com/image1.jpg http://www.mysite.com/image2.jpg
Send Apprise Message title=Robot Framework Apprise Demo body=Connect to Apprise with your Robot Framework Tests! clients=<apprise_client> attachments=${IMAGE_LIST}
# Send a message with one client. Our attachments use a comma-separated string (default)
Send Apprise Message title=Robot Framework Apprise Demo body=Connect to Apprise with your Robot Framework Tests! clients=<apprise_client> attachments=http://www.mysite.com/image1.jpg,http://www.mysite.com/image2.jpg
# Send a message with one client. Our attachments use a custom delimiter ^
Set Attachment Delimiter ^
Send Apprise Message title=Robot Framework Apprise Demo body=Connect to Apprise with your Robot Framework Tests! clients=<apprise_client> attachments=http://www.mysite.com/image1.jpg^http://www.mysite.com/image2.jpg
# Send a message with one client and a List which contains our images
@{IMAGE_LIST}= Create List http://www.mysite.com/image1.jpg http://www.mysite.com/image2.jpg
Set Test Variable ${CONFIG_FILE} config.yaml
Send Apprise Message title=Robot Framework Apprise Demo body=Connect to Apprise with your Robot Framework Tests! config_file=${CONFIG_FILE} attachments=${IMAGE_LIST}
Known issues
- The current version of this library does not support Apprise's whole feature set. Options such as tagging are not implemented (but may work if you use a config file-based setting)
- Unlike the original Apprise API, only one YAML config file is currently supported with this Robot Framework keyword library.
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
Hashes for robotframework-apprise-0.2.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 980f8ce30bc6102bf143cb882dba69e335d215066f6cfa2c923b1d574a2c4fdb |
|
MD5 | 3b37e3b49ce52f1f4efc97ad7512ac78 |
|
BLAKE2b-256 | c13856eff5a439673a74c1cde0b73a7340eef8a02c63af906db6fe0aece63731 |
Hashes for robotframework_apprise-0.2.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3db0c526f76d81f1dbaa9a329faad21a81be3e1ba0bdd8376ee3b6eea7921b59 |
|
MD5 | 268fc4650a1b6b1ae78636e74dc9c217 |
|
BLAKE2b-256 | 855620f1dab1646a6ba713968b8a0f7b41a2e61ff24507923f539844438bb76c |