A Rackio extension to add a SocketIO Server to Rackio
Project description
rackio-socket
A Rackio extension to add a SocketIO Server to Rackio
Installation
pip install RackioSocket
Usage
from rackio import Rackio
from rackio_socket import RackioSocket
app = Rackio()
RackioSocket(app, 5005)
app.run(8028)
SocketIO Client
After running your application it will serve the SocketIO through the 5005 port.
var socket = io('http://localhost:5005');
Adding new events to your applications
You can add your custom events using the decorator pattern.
rs = RackioSocket()
@rs.event
def custom(sid):
print("custom event " , sid)
rs.emit("response", {"message": "this is the custom response"})
@rs.on("another custom")
def another_event(sid, data):
response = processing(data)
rs.emit('response', response)
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
RackioSocket-0.9.win-amd64.zip
(20.7 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 RackioSocket-0.9.win-amd64.zip.
File metadata
- Download URL: RackioSocket-0.9.win-amd64.zip
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2cd510ee53ff8e545bdcfcdcde3a4a7943326651c1e6b5bde1de67fcc0bae88
|
|
| MD5 |
e9d99d23c8e7204f937973bb3afabc1f
|
|
| BLAKE2b-256 |
2304f4c554bf5b458964807c33aebcab6a0203954c7769a287f5776673cf9b37
|
File details
Details for the file RackioSocket-0.9-py3-none-any.whl.
File metadata
- Download URL: RackioSocket-0.9-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11b9aa3ad43df060fffd9fa0faed9a451adad4e5f603f7af1ba9a41aa211b003
|
|
| MD5 |
e16ab2fa823d232824eefd5142ed281b
|
|
| BLAKE2b-256 |
6f1ad5c6b0c0ec742c071ba428f97b027a93caa207e1ba3c1b77f05b5e67aae6
|