Skip to content

Wrapper around python-socketio that handles a simple que and threading

License

Notifications You must be signed in to change notification settings

tarik56/easy-socketio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy SocketIO

Easy SocketIO is a wrapper build around python-socketio that handles a simple queue and threading.

pip install easy-socketio

Example with default configs:

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:

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")

About

Wrapper around python-socketio that handles a simple que and threading

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages