https://github.com/tarik56/easy-socketio
Wrapper around python-socketio that handles a simple que and threading
https://github.com/tarik56/easy-socketio
python socket-io socketio web-socket websocket
Last synced: 2 months ago
JSON representation
Wrapper around python-socketio that handles a simple que and threading
- Host: GitHub
- URL: https://github.com/tarik56/easy-socketio
- Owner: tarik56
- License: mit
- Created: 2022-10-14T22:42:26.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-15T01:21:54.000Z (over 3 years ago)
- Last Synced: 2025-09-23T19:52:10.393Z (7 months ago)
- Topics: python, socket-io, socketio, web-socket, websocket
- Language: Python
- Homepage: https://pypi.org/project/easy-socketio/
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## Easy SocketIO
Easy SocketIO is a wrapper build around [python-socketio](https://github.com/miguelgrinberg/python-socketio) that handles a simple queue and threading.
```
pip install easy-socketio
```
Example with default configs:
```python
from easy_socketio import socketio
socketio.start_server()
# Wait for connections....
# Send message to all clients
socketio.send("Hello clients")
```
Example with more detailed configurations:
```python
from easy_socketio import socketio
# Threaded flag starts the server in a background thread, default is True
socketio.start_server(
host="127.0.0.1",
port=5000,
threaded=True,
cors=True,
static_files={'/': {'content_type': 'text/html'}}
)
# Wait for connections....
# Send message to a specific client
socketio.send(msg="Hello client", event="message", to="client_sid_here")
```