Skip to main content

Snarl python lib, Send SNP/3.1 messages. (Snarl)

Project description

snarl

Snarl python lib, Send SNP/3.1 messages. (Snarl)

Installing

Install and update using pip:

$ pip install snarl

snarl supports Python 3 and newer

Example

use as module/lib

from snarl 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
[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

Project details


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.3.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysnarl-0.3-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file pysnarl-0.3.tar.gz.

File metadata

  • Download URL: pysnarl-0.3.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

Hashes for pysnarl-0.3.tar.gz
Algorithm Hash digest
SHA256 de0f900be057ab850ea5f149049ffe8d876b6694b7245f0829cccf4c716e62ce
MD5 ab9094a6bfbc314720f7e7bc5dd8a332
BLAKE2b-256 8955bd0cc53d1f0f6013b00fc460017f3ab901d9974427ed6681ff428f4592e8

See more details on using hashes here.

File details

Details for the file pysnarl-0.3-py3-none-any.whl.

File metadata

  • Download URL: pysnarl-0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pysnarl-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b5c1770ba7aa4bb8ead49f1f48891afae28ca9e33e69b9691ba216a269c10bb7
MD5 9c60ceef503ecb290cd8f848dc4220f1
BLAKE2b-256 58393b8839a87daae760a28ca8529cbab06d560ee2c5f2defaa5c482ba47528f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page