# PySnarl
PySnarl python lib, Send SNP/3.1 messages. (Snarl)
## Installing
Install and update using [pip](https://pip.pypa.io/en/stable/quickstart/):
$ pip install pysnarl
pysnarl supports Python 3 and newer
## Example
use as module/lib
```python
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:
```bash
[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
```bash
> 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](https://github.com/cumulus13/snarl/blob/master/LICENSE.md)
- Code: [https://github.com/cumulus13/snarl](https://github.com/cumulus13/snarl)
- Issue tracker: [https://github.com/cumulus13/snarl/issues](https://github.com/cumulus13/snarl/issues)
## Author
[Hadi Cahyadi](mailto:cumulus13@gmail.com)
[![Buy Me a Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/cumulus13)
[![Donate via Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/cumulus13)
[Support me on Patreon](https://www.patreon.com/cumulus13)
Raw data
{
"_id": null,
"home_page": "https://github.com/cumulus13/snarl",
"name": "pysnarl",
"maintainer": "cumulus13 Team",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "cumulus13@gmail.com",
"keywords": null,
"author": "Hadi Cahyadi LD",
"author_email": "cumulus13@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/98/26/7906e2ca79836b6a47af58e485067cb5cbef07fa1447bf192b977d1c08d0/pysnarl-0.33.tar.gz",
"platform": null,
"description": "# PySnarl\r\n\r\nPySnarl python lib, Send SNP/3.1 messages. (Snarl)\r\n\r\n## Installing\r\n\r\nInstall and update using [pip](https://pip.pypa.io/en/stable/quickstart/):\r\n\r\n$ pip install pysnarl\r\n\r\npysnarl supports Python 3 and newer\r\n\r\n## Example\r\n\r\nuse as module/lib\r\n\r\n```python\r\nfrom pysnarl import Snarl\r\nSnarl.send(\"REGISTER\", 'test_app', 'TEST', icon = 'snarl.png', '127.0.0.1', 9899, verbose = True)\r\nSnarl.send(\"NOTIFY\", 'test_app', 'TEST', 'TEST MESSAGE', 'snarl.png', '127.0.0.1', 9899, priority = 1, verbose = True)\r\n```\r\n\r\noutputs:\r\n```bash\r\n[SNP/3.1 REGISTER\r\napp-id: test_app\r\ntitle: TEST\r\nicon: snarl.png\r\nEND]\r\nrequest xxx: SNP/3.1 REGISTER\r\napp-id: test_app\r\ntitle: TEST\r\nicon: snarl.png\r\nEND\r\n\r\nresult: [SNP/3.1 SUCCESS\r\nEND]\r\n\r\n[SNP/3.1 NOTIFY\r\napp-id: test_app\r\ntitle: TEST\r\ntext: TEST MESSAGE\r\nicon: snarl.png\r\npriority: 1\r\nEND]\r\nrequest xxx: SNP/3.1 NOTIFY\r\napp-id: test\r\ntitle: TEST\r\ntext: TEST MESSAGE\r\nicon: snarl.png\r\npriority: 1\r\nEND\r\n\r\nresult: [SNP/3.1 SUCCESS\r\nEND]\r\n```\r\n\r\nor run on terminal/cmd\r\n\r\n```bash\r\n> snarl 127.0.0.1 9889 -a test_app -i \"snarl.png\" -t TEST -v -R\r\n> snarl 127.0.0.1 9889 -a test_app -b \"TEST MESSAGE\" -i \"snarl.png\" -p 1 -t TEST -v -N\r\n> pysnarl 127.0.0.1 9889 -a test_app -i \"snarl.png\" -t TEST -v -R\r\n> pysnarl 127.0.0.1 9889 -a test_app -b \"TEST MESSAGE\" -i \"snarl.png\" -p 1 -t TEST -v -N\r\n[SNP/3.1 NOTIFY\r\napp-id: test_app\r\ntitle: TEST\r\ntext: TEST MESSAGE\r\nicon: snarl.png\r\npriority: 1\r\nEND]\r\nrequest xxx: SNP/3.1 NOTIFY\r\napp-id: test_app\r\ntitle: TEST\r\ntext: TEST MESSAGE\r\nicon: snarl.png\r\npriority: 1\r\nEND\r\n\r\nresult: [SNP/3.1 SUCCESS\r\nEND]\r\n```\r\n\r\n## Tips\r\n`always register (-R) before send message`\r\n\r\n## Links\r\n\r\n- License: [GPL](https://github.com/cumulus13/snarl/blob/master/LICENSE.md)\r\n- Code: [https://github.com/cumulus13/snarl](https://github.com/cumulus13/snarl)\r\n- Issue tracker: [https://github.com/cumulus13/snarl/issues](https://github.com/cumulus13/snarl/issues)\r\n\r\n## Author\r\n[Hadi Cahyadi](mailto:cumulus13@gmail.com)\r\n\r\n[![Buy Me a Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/cumulus13)\r\n[![Donate via Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/cumulus13)\r\n [Support me on Patreon](https://www.patreon.com/cumulus13)\r\n",
"bugtrack_url": null,
"license": "GPL",
"summary": "Snarl python lib, Send SNP/3.1 messages. (Snarl)",
"version": "0.33",
"project_urls": {
"Code": "https://github.com/cumulus13/snarl",
"Documentation": "https://github.com/cumulus13/snarl",
"Homepage": "https://github.com/cumulus13/snarl"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "88cccb9dffeec0e50fcc9054811af6623c4e7ccfff4c08749f6b55b4d06c89f9",
"md5": "c2d029968e9b61370210f36ad5166306",
"sha256": "0eb93e2a380b42cbd0893752a6b9fc6b60aed7ce566a659a29b957cc26d59a71"
},
"downloads": -1,
"filename": "pysnarl-0.33-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c2d029968e9b61370210f36ad5166306",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 9279,
"upload_time": "2024-12-11T08:55:56",
"upload_time_iso_8601": "2024-12-11T08:55:56.698585Z",
"url": "https://files.pythonhosted.org/packages/88/cc/cb9dffeec0e50fcc9054811af6623c4e7ccfff4c08749f6b55b4d06c89f9/pysnarl-0.33-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "98267906e2ca79836b6a47af58e485067cb5cbef07fa1447bf192b977d1c08d0",
"md5": "08db735fa5b0063e0e02c1623167d9bf",
"sha256": "dbb93a0f0531f9779255f85da75919f6128460fe3b5f498fcfbcfe51627860f0"
},
"downloads": -1,
"filename": "pysnarl-0.33.tar.gz",
"has_sig": false,
"md5_digest": "08db735fa5b0063e0e02c1623167d9bf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 7888,
"upload_time": "2024-12-11T08:56:00",
"upload_time_iso_8601": "2024-12-11T08:56:00.393297Z",
"url": "https://files.pythonhosted.org/packages/98/26/7906e2ca79836b6a47af58e485067cb5cbef07fa1447bf192b977d1c08d0/pysnarl-0.33.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-11 08:56:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cumulus13",
"github_project": "snarl",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "rich",
"specs": []
},
{
"name": "configset",
"specs": []
},
{
"name": "ctraceback",
"specs": []
}
],
"lcname": "pysnarl"
}