minimal WebSocket framework and works as a HTTP upgrader for slimHTTP.
Project description
slimWS
WebSocket framework writtein in Python.
Works standalone but is preferred as @upgrader
for slimHTTP.
Installation
pypi
pip install slimWS
Git it to a project
git submodule add -b master https://github.com/Torxed/slimWS.git
(Or just git clone https://github.com/Torxed/slimWS.git
)
Example usage
from slimWS import slimws
server = slimws.host(address='', port=4001)
@server.route_parser
def parse(self, frame):
print('Got WebSocket frame:', frame.data)
yield {'status' : 'successful'}
while 1:
for event, *event_data in server.poll():
pass
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
slimWS-1.0.0rc2.tar.gz
(12.0 kB
view hashes)
Built Distribution
slimWS-1.0.0rc2-py3-none-any.whl
(23.7 kB
view hashes)
Close
Hashes for slimWS-1.0.0rc2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3875aae1f74916e608290f4a407ed2556c170205ff5eb0accbbfb1148564b711 |
|
MD5 | 5856364eb2b356cfd57a5b480b6d5385 |
|
BLAKE2b-256 | 0c0d26d0b7d2111fd4845f7414786eb3940fb4fc6fed5a1c76cda71a71f2b571 |