Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/torxed/slimws
WebSocket API engine.
https://github.com/torxed/slimws
http https json minimal not-secure server tiny vhost web websocket
Last synced: about 1 month ago
JSON representation
WebSocket API engine.
- Host: GitHub
- URL: https://github.com/torxed/slimws
- Owner: Torxed
- License: gpl-3.0
- Created: 2017-10-13T20:33:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-20T12:58:03.000Z (almost 4 years ago)
- Last Synced: 2024-12-10T05:11:26.406Z (about 1 month ago)
- Topics: http, https, json, minimal, not-secure, server, tiny, vhost, web, websocket
- Language: Python
- Homepage:
- Size: 454 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
WebSocket framework writtein in Python.
Works standalone but is preferred as `@upgrader` for [slimHTTP](https://github.com/Torxed/slimHTTP).* slimWS [documentation](https://slimws.readthedocs.io/en/latest)
* slimWS via slimHTTP's [discord](https://discord.gg/CMjZbwR) server# 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`)*
# Usage
Most examples will be found under the [documentation](https://slimws.readthedocs.io/en/latest), but here's a quick one.
```python
from slimWS import slimwsserver = slimws.host(address='', port=4001)
@server.frame
def parse_frame(self, frame):
print('Got WebSocket frame:', frame.data)
yield {'status' : 'successful'}while 1:
for event, *event_data in server.poll():
pass
```