Skip to main content

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


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)

Uploaded Source

Built Distribution

slimWS-1.0.0rc2-py3-none-any.whl (23.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page