## Python Package for Websocket Server Live
# WebsocketServer built in python.
# For active server on command line:
- Install package with PIP;
- Run command wsserver-malbizer 'port_value_numerical'
- Send JSON string for serve on model:
{
"subject": "subject for your message",
"sender": "id_sender",
"topic": [], //List of topics to inscribe message
"payload": "Value for your message (JSON string)",
"persist": false //indicate if message is persisted and send for new clients
}
# For using on python file:
- Import wsservermalbizer with WebsocketServer and use the code:
WebSocketServer(port=port).start()
# For use Client (command-line):
- Run command (if port_value_numerical is 7135):
wsclient-malbizer "ws://localhost:7135" "topic"
- watch for messages on server websocket;
# For use Message Sender (command-line):
- Run command (if port_value_numerical is 7135):
wssend-malbizer "ws://localhost:7135" "payload" "subject" "user" "topics,separed,with,comma"
- await command send for server;
# For use Client (python file):
- Import wsservermalbizer with WebsocketClientReceiver and use the code (if port_value_numerical is 7135):
WebsocketClientReceiver("ws://localhost:7135","topics,separed,with,comma,for,subscribe").receiver()
# For use Message Sender (python file):
- Import wsservermalbizer with WebsocketClientReceiver and use the code (if port_value_numerical is 7135):
client = WebsocketClientMessage()
client.sender = "user"
client.subject = "subject"
client.payload = "payload JSON"
client.topics = ["topics","to","send"]
client.persist = False //True if you need persistance
sender = WebsocketClientSender(client, "ws://localhost:7135")
sender.send()
Raw data
{
"_id": null,
"home_page": "",
"name": "wsserver-malbizer",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,websocket,server",
"author": "Anderson Souza",
"author_email": "anderson@malbizer.com.br",
"download_url": "https://files.pythonhosted.org/packages/44/07/d74855dc72cfda553a2b485d83f0980adc16564bca10adc2b6b0f26e5e7c/wsserver_malbizer-1.0.6.tar.gz",
"platform": null,
"description": "## Python Package for Websocket Server Live\r\n\r\n# WebsocketServer built in python.\r\n\r\n# For active server on command line:\r\n - Install package with PIP;\r\n - Run command wsserver-malbizer 'port_value_numerical'\r\n - Send JSON string for serve on model:\r\n\r\n {\r\n \"subject\": \"subject for your message\",\r\n \"sender\": \"id_sender\",\r\n \"topic\": [], //List of topics to inscribe message\r\n \"payload\": \"Value for your message (JSON string)\",\r\n \"persist\": false //indicate if message is persisted and send for new clients\r\n }\r\n\r\n\r\n\r\n# For using on python file:\r\n\r\n - Import wsservermalbizer with WebsocketServer and use the code:\r\n\r\n WebSocketServer(port=port).start()\r\n\r\n# For use Client (command-line):\r\n - Run command (if port_value_numerical is 7135):\r\n\r\n wsclient-malbizer \"ws://localhost:7135\" \"topic\"\r\n\r\n - watch for messages on server websocket;\r\n\r\n# For use Message Sender (command-line):\r\n\r\n - Run command (if port_value_numerical is 7135):\r\n\r\n wssend-malbizer \"ws://localhost:7135\" \"payload\" \"subject\" \"user\" \"topics,separed,with,comma\"\r\n\r\n\r\n - await command send for server;\r\n\r\n\r\n# For use Client (python file):\r\n\r\n - Import wsservermalbizer with WebsocketClientReceiver and use the code (if port_value_numerical is 7135):\r\n\r\n WebsocketClientReceiver(\"ws://localhost:7135\",\"topics,separed,with,comma,for,subscribe\").receiver()\r\n\r\n\r\n# For use Message Sender (python file):\r\n\r\n - Import wsservermalbizer with WebsocketClientReceiver and use the code (if port_value_numerical is 7135):\r\n\r\n client = WebsocketClientMessage()\r\n client.sender = \"user\"\r\n client.subject = \"subject\"\r\n client.payload = \"payload JSON\"\r\n client.topics = [\"topics\",\"to\",\"send\"]\r\n client.persist = False //True if you need persistance\r\n\r\n sender = WebsocketClientSender(client, \"ws://localhost:7135\")\r\n\r\n sender.send()\r\n\r\n",
"bugtrack_url": null,
"license": "",
"summary": "Websocket Server for python",
"version": "1.0.6",
"split_keywords": [
"python",
"websocket",
"server"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "cec6e327eb66bee2940a660c18bcee14",
"sha256": "c164d29937035a281d1cacfc972dedeac641c5ef846a0e25b865956f5e0719ee"
},
"downloads": -1,
"filename": "wsserver_malbizer-1.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cec6e327eb66bee2940a660c18bcee14",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6680,
"upload_time": "2022-12-07T20:15:35",
"upload_time_iso_8601": "2022-12-07T20:15:35.240387Z",
"url": "https://files.pythonhosted.org/packages/09/c6/3a025c0b8049d92e44b6756bbdb8e247a17fc87b009c4cb3bdf6cf290219/wsserver_malbizer-1.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "a567ebca1d633224420456af4ee2cc59",
"sha256": "3adb24798a2547b4c95faf45d2e64e374ff0836034f46997492b477bea05df3c"
},
"downloads": -1,
"filename": "wsserver_malbizer-1.0.6.tar.gz",
"has_sig": false,
"md5_digest": "a567ebca1d633224420456af4ee2cc59",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4873,
"upload_time": "2022-12-07T20:15:37",
"upload_time_iso_8601": "2022-12-07T20:15:37.915206Z",
"url": "https://files.pythonhosted.org/packages/44/07/d74855dc72cfda553a2b485d83f0980adc16564bca10adc2b6b0f26e5e7c/wsserver_malbizer-1.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-07 20:15:37",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "wsserver-malbizer"
}