Socket.IO integration for Flask applications
Project description
Flask-SocketIO
Socket.IO integration for Flask applications.
Sponsors
The following organizations are funding this project:
Socket.IO |
Add your company here! |
---|
Many individual sponsors also support this project through small ongoing contributions. Why not join them?
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.
Project details
Release history Release notifications | RSS feed
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.1.1.tar.gz
(16.1 kB
view details)
Built Distribution
File details
Details for the file Flask-SocketIO-5.1.1.tar.gz
.
File metadata
- Download URL: Flask-SocketIO-5.1.1.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1efdaacc7a26e94f2b197a80079b1058f6aa644a6094c0a322349e2b9c41f6b1 |
|
MD5 | 0fa89c149bd9dbef118bccdec4db5dd0 |
|
BLAKE2b-256 | 5fa55c03d62fdbdf0343345c8cca19d4961d8958eba54449230df2b0080b7011 |
Provenance
File details
Details for the file Flask_SocketIO-5.1.1-py3-none-any.whl
.
File metadata
- Download URL: Flask_SocketIO-5.1.1-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07e1899e3b4851978b2ac8642080156c6294f8d0fc5212b4e4bcca713830306a |
|
MD5 | a439ef52bfb7bef9ff8863b114945f9a |
|
BLAKE2b-256 | 7073b30d4448b64e877c4f75a916bdad0070c92570b8913c8e4893faf8c69850 |