Flask-SocketIO
Socket.IO integration for Flask applications.
Installation
You can install this package as usual with pip:
pip install flask-socketio
Example
from flask import Flask, render_template
from flask_socketio import SocketIO, emit
app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app)
@app.route('/')
def index():
return render_template('index.html')
@socketio.event
def my_event(message):
emit('my response', {'data': 'got it!'})
if __name__ == '__main__':
socketio.run(app)
Resources
- Tutorial
- Documentation
- PyPI
- Change Log
- Questions? See the questions others have asked on Stack Overflow, or ask your own question.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flask_socketio-5.6.1.tar.gz
(37.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flask_socketio-5.6.1.tar.gz.
File metadata
- Download URL: flask_socketio-5.6.1.tar.gz
- Upload date:
- Size: 37.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe5bd995c3ed4da9a98f335d0d830fa1a19d84a64789f6265642a671fdacaeac
|
|
| MD5 |
576ef011a48fc56ad69d862f16d6686a
|
|
| BLAKE2b-256 |
4b613287c8a8fe4c3c59f2573d71aea7d334a113383ed3e6eb96e290dc80115f
|
File details
Details for the file flask_socketio-5.6.1-py3-none-any.whl.
File metadata
- Download URL: flask_socketio-5.6.1-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51a3f71b28b4476c650829607e3a993e076034db6c3cc31f718f0a4b45939d42
|
|
| MD5 |
fa187810a07a1a162e89965ff6d49489
|
|
| BLAKE2b-256 |
08982a46f4a3117c17fd36e07ad8b085054451e96723baaeea245682156ba546
|