Skip to main content

Socket.IO integration for Flask applications

Project description

Flask-SocketIO

Build status codecov

Socket.IO integration for Flask applications.

Sponsors

The following organizations are funding this project:

Socket.IO
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

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.3.1.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

Flask_SocketIO-5.3.1-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file Flask-SocketIO-5.3.1.tar.gz.

File metadata

  • Download URL: Flask-SocketIO-5.3.1.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for Flask-SocketIO-5.3.1.tar.gz
Algorithm Hash digest
SHA256 fd0ed0fc1341671d92d5f5b2f5503916deb7aa7e2940e6636cfa2c087c828bf9
MD5 23809f0f2a94ed2e38b3ee5bca2c758e
BLAKE2b-256 d1acb02bf39f70e514355e80fe19bd3eb332f2962b56cc21340cc316cba969fe

See more details on using hashes here.

File details

Details for the file Flask_SocketIO-5.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Flask_SocketIO-5.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff0c721f20bff1e2cfba77948727a8db48f187e89a72fe50c34478ce6efb3353
MD5 2ae67c4b59cfb84329ffd637a86c11ec
BLAKE2b-256 a0396899b61349cbcb19e84c948fbc8fc216c20d113e0e1ea996cf8fe5d50ee5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page