Snarl python lib, Send SNP/3.1 messages. (Snarl)
Project description
snarl
PySnarl python lib, Send SNP/3.1 messages. (Snarl)
Installing
Install and update using pip:
$ pip install pysnarl
pysnarl supports Python 3 and newer
Example
use as module/lib
from pysnarl import Snarl
Snarl.send("REGISTER", 'test_app', 'TEST', icon = 'snarl.png', '127.0.0.1', 9899, verbose = True)
Snarl.send("NOTIFY", 'test_app', 'TEST', 'TEST MESSAGE', 'snarl.png', '127.0.0.1', 9899, priority = 1, verbose = True)
outputs:
[SNP/3.1 REGISTER
app-id: test_app
title: TEST
icon: snarl.png
END]
request xxx: SNP/3.1 REGISTER
app-id: test_app
title: TEST
icon: snarl.png
END
result: [SNP/3.1 SUCCESS
END]
[SNP/3.1 NOTIFY
app-id: test_app
title: TEST
text: TEST MESSAGE
icon: snarl.png
priority: 1
END]
request xxx: SNP/3.1 NOTIFY
app-id: test
title: TEST
text: TEST MESSAGE
icon: snarl.png
priority: 1
END
result: [SNP/3.1 SUCCESS
END]
or run on terminal/cmd
> snarl 127.0.0.1 9889 -a test_app -i "snarl.png" -t TEST -v -R
> snarl 127.0.0.1 9889 -a test_app -b "TEST MESSAGE" -i "snarl.png" -p 1 -t TEST -v -N
> pysnarl 127.0.0.1 9889 -a test_app -i "snarl.png" -t TEST -v -R
> pysnarl 127.0.0.1 9889 -a test_app -b "TEST MESSAGE" -i "snarl.png" -p 1 -t TEST -v -N
[SNP/3.1 NOTIFY
app-id: test_app
title: TEST
text: TEST MESSAGE
icon: snarl.png
priority: 1
END]
request xxx: SNP/3.1 NOTIFY
app-id: test_app
title: TEST
text: TEST MESSAGE
icon: snarl.png
priority: 1
END
result: [SNP/3.1 SUCCESS
END]
Tips
always register (-R) before send message
Links
- License: GPL
- Code: https://github.com/cumulus13/snarl
- Issue tracker: https://github.com/cumulus13/snarl/issues
Author
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
pysnarl-0.32.tar.gz
(7.9 kB
view details)
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 pysnarl-0.32.tar.gz.
File metadata
- Download URL: pysnarl-0.32.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f5485404bbed1fe99c58bf789d37ee70ec57c25f69cb28ade8ba567178a1d31
|
|
| MD5 |
c6b3274b51a64b00b7b6c8aa7b621c17
|
|
| BLAKE2b-256 |
a2124c665952d2d887df571f5b7ec81d5379bd05a4cb5e9c1b8a87e0164f3c63
|
File details
Details for the file pysnarl-0.32-py3-none-any.whl.
File metadata
- Download URL: pysnarl-0.32-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7af9505c9292dc9f4b2c3771469af1dd81fa953960df165f32195aef5c6a66c1
|
|
| MD5 |
5f83f9fc4b04493ceffbed4d0fde7828
|
|
| BLAKE2b-256 |
a169ba6cd604a0f8be8ff5316b615fa9b8959f41edeba96e882fa07da846e565
|