Skip to main content

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)

Release files for RackioSocket 0.9

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

Source distribution (sdist)

Source distribution for RackioSocket 0.9
File Size Uploaded
RackioSocket-0.9.win-amd64.zip 20.7 kB Details

Built distribution (wheel)

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

Total release size: 27.9 kB

Release files / RackioSocket-0.9.win-amd64.zip

Download URL RackioSocket-0.9.win-amd64.zip
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b2cd510ee53ff8e545bdcfcdcde3a4a7943326651c1e6b5bde1de67fcc0bae88
BLAKE2b-256 checksum
How to use checksums
2304f4c554bf5b458964807c33aebcab6a0203954c7769a287f5776673cf9b37
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / RackioSocket-0.9-py3-none-any.whl

Download URL RackioSocket-0.9-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11b9aa3ad43df060fffd9fa0faed9a451adad4e5f603f7af1ba9a41aa211b003
BLAKE2b-256 checksum
How to use checksums
6f1ad5c6b0c0ec742c071ba428f97b027a93caa207e1ba3c1b77f05b5e67aae6
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.9 This release

2 release files

0.8

2 release files

0.6

2 release files

0.4

2 release files

0.3

2 release files

0.1

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