Skip to main content

PySnarl

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

Author

Hadi Cahyadi

Buy Me a Coffee Donate via Ko-fi Support me on Patreon

Metadata

Release files for pysnarl 0.33

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysnarl 0.33
File Size Uploaded
pysnarl-0.33.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysnarl 0.33
File Interpreter ABI Platform
pysnarl-0.33-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / pysnarl-0.33.tar.gz

Download URL pysnarl-0.33.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dbb93a0f0531f9779255f85da75919f6128460fe3b5f498fcfbcfe51627860f0
BLAKE2b-256 checksum
How to use checksums
98267906e2ca79836b6a47af58e485067cb5cbef07fa1447bf192b977d1c08d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / pysnarl-0.33-py3-none-any.whl

Download URL pysnarl-0.33-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0eb93e2a380b42cbd0893752a6b9fc6b60aed7ce566a659a29b957cc26d59a71
BLAKE2b-256 checksum
How to use checksums
88cccb9dffeec0e50fcc9054811af6623c4e7ccfff4c08749f6b55b4d06c89f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.33 This release

2 release files

0.32

2 release files

0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page