Flask-SocketIOSocket.IO integration for Flask applications.
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.
评论
MetaProducts Integration
IntegrateMetaProductssoftwarewithMozillabrowsers.DownloadlinksandWebsitesusingMassDownloaderandOffli
MetaProducts Integration
0
keycloak-angularEasy Keycloak setup for Angular applications.
Keycloak AngularEasy Keycloak setup for Angular ap
keycloak-angularEasy Keycloak setup for Angular applications.
0
SVG Integration
ManipulateSVGdocumentsfromJavaScript.SupportednativelyinFirefox,Opera,andSafariandviatheAdobeSVGview
SVG Integration
0
keycloak-angularEasy Keycloak setup for Angular applications.
KeycloakAngularEasyKeycloaksetupforAngularapplications.AboutInstallationSetupExampleprojectAuthGuard
keycloak-angularEasy Keycloak setup for Angular applications.
0
node-red-contrib-homebridge-automationHomebridge and Node-RED Integration
HomebridgeAutomationpoweredbyNode-REDTheaboveNode-REDFlow,turnsonmy'OutsideOffice'lightwhenthepowder
node-red-contrib-homebridge-automationHomebridge and Node-RED Integration
0
Spring GemFire Integration
SpringGemFireIntegration是一个顶级的Spring项目,主要用来简化通过GemFire分布式数据管理平台来部署高可伸缩性的Spring应用,包含Java和.NET版本。
Spring GemFire Integration
0
Zhouyi Compass Integration
Arm China(安谋科技) “周易”NPU开源项目 - Compass_Integration本
Zhouyi Compass Integration
0
graphene-sqlalchemyGraphene SQLAlchemy integration
PleasereadUPGRADE-v2.0.mdtolearnhowtoupgradetoGraphene2.0.Graphene-SQLAlchemyASQLAlchemyintegrationf
graphene-sqlalchemyGraphene SQLAlchemy integration
0