Flask-SocketIO
==============
[![Build status](https://github.com/miguelgrinberg/flask-socketio/workflows/build/badge.svg)](https://github.com/miguelgrinberg/Flask-SocketIO/actions) [![codecov](https://codecov.io/gh/miguelgrinberg/flask-socketio/branch/main/graph/badge.svg)](https://codecov.io/gh/miguelgrinberg/flask-socketio)
Socket.IO integration for Flask applications.
Sponsors
--------
The following organizations are funding this project:
![Socket.IO](https://images.opencollective.com/socketio/050e5eb/logo/64.png)<br>[Socket.IO](https://socket.io) | [Add your company here!](https://github.com/sponsors/miguelgrinberg)|
-|-
Many individual sponsors also support this project through small ongoing contributions. Why not [join them](https://github.com/sponsors/miguelgrinberg)?
Installation
------------
You can install this package as usual with pip:
pip install flask-socketio
Example
-------
```py
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](http://blog.miguelgrinberg.com/post/easy-websockets-with-flask-and-gevent)
- [Documentation](http://flask-socketio.readthedocs.io/en/latest/)
- [PyPI](https://pypi.python.org/pypi/Flask-SocketIO)
- [Change Log](https://github.com/miguelgrinberg/Flask-SocketIO/blob/main/CHANGES.md)
- Questions? See the [questions](https://stackoverflow.com/questions/tagged/flask-socketio) others have asked on Stack Overflow, or [ask](https://stackoverflow.com/questions/ask?tags=python+flask-socketio+python-socketio) your own question.
Raw data
{
"_id": null,
"home_page": "https://github.com/miguelgrinberg/flask-socketio",
"name": "Flask-SocketIO",
"maintainer": "",
"docs_url": "https://pythonhosted.org/Flask-SocketIO/",
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Miguel Grinberg",
"author_email": "miguel.grinberg@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/33/b2/aa882384d130523d7d2d6eed33403aed68a438622df388d92171d7657960/Flask-SocketIO-5.3.6.tar.gz",
"platform": null,
"description": "Flask-SocketIO\n==============\n\n[![Build status](https://github.com/miguelgrinberg/flask-socketio/workflows/build/badge.svg)](https://github.com/miguelgrinberg/Flask-SocketIO/actions) [![codecov](https://codecov.io/gh/miguelgrinberg/flask-socketio/branch/main/graph/badge.svg)](https://codecov.io/gh/miguelgrinberg/flask-socketio)\n\nSocket.IO integration for Flask applications.\n\nSponsors\n--------\n\nThe following organizations are funding this project:\n\n![Socket.IO](https://images.opencollective.com/socketio/050e5eb/logo/64.png)<br>[Socket.IO](https://socket.io) | [Add your company here!](https://github.com/sponsors/miguelgrinberg)|\n-|-\n\nMany individual sponsors also support this project through small ongoing contributions. Why not [join them](https://github.com/sponsors/miguelgrinberg)?\n\nInstallation\n------------\n\nYou can install this package as usual with pip:\n\n pip install flask-socketio\n\nExample\n-------\n\n```py\nfrom flask import Flask, render_template\nfrom flask_socketio import SocketIO, emit\n \napp = Flask(__name__)\napp.config['SECRET_KEY'] = 'secret!'\nsocketio = SocketIO(app)\n\n@app.route('/')\ndef index():\n return render_template('index.html')\n\n@socketio.event\ndef my_event(message):\n emit('my response', {'data': 'got it!'})\n\nif __name__ == '__main__':\n socketio.run(app)\n```\n\nResources\n---------\n\n- [Tutorial](http://blog.miguelgrinberg.com/post/easy-websockets-with-flask-and-gevent)\n- [Documentation](http://flask-socketio.readthedocs.io/en/latest/)\n- [PyPI](https://pypi.python.org/pypi/Flask-SocketIO)\n- [Change Log](https://github.com/miguelgrinberg/Flask-SocketIO/blob/main/CHANGES.md)\n- Questions? See the [questions](https://stackoverflow.com/questions/tagged/flask-socketio) others have asked on Stack Overflow, or [ask](https://stackoverflow.com/questions/ask?tags=python+flask-socketio+python-socketio) your own question.\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Socket.IO integration for Flask applications",
"version": "5.3.6",
"project_urls": {
"Bug Tracker": "https://github.com/miguelgrinberg/flask-socketio/issues",
"Homepage": "https://github.com/miguelgrinberg/flask-socketio"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "56c8dc0be9e26272dc89342868ecc2d9ddb9e31002b4b8e49fdb754aa0f9ecbf",
"md5": "6c7d90ef97348e25f0c7ce5ac6039b00",
"sha256": "9e62d2131842878ae6bfdd7067dfc3be397c1f2b117ab1dc74e6fe74aad7a579"
},
"downloads": -1,
"filename": "Flask_SocketIO-5.3.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6c7d90ef97348e25f0c7ce5ac6039b00",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 18098,
"upload_time": "2023-09-05T09:35:23",
"upload_time_iso_8601": "2023-09-05T09:35:23.601219Z",
"url": "https://files.pythonhosted.org/packages/56/c8/dc0be9e26272dc89342868ecc2d9ddb9e31002b4b8e49fdb754aa0f9ecbf/Flask_SocketIO-5.3.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "33b2aa882384d130523d7d2d6eed33403aed68a438622df388d92171d7657960",
"md5": "26d26b2d623235835aff1acd14eebad1",
"sha256": "bb8f9f9123ef47632f5ce57a33514b0c0023ec3696b2384457f0fcaa5b70501c"
},
"downloads": -1,
"filename": "Flask-SocketIO-5.3.6.tar.gz",
"has_sig": false,
"md5_digest": "26d26b2d623235835aff1acd14eebad1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 17167,
"upload_time": "2023-09-05T09:35:25",
"upload_time_iso_8601": "2023-09-05T09:35:25.347897Z",
"url": "https://files.pythonhosted.org/packages/33/b2/aa882384d130523d7d2d6eed33403aed68a438622df388d92171d7657960/Flask-SocketIO-5.3.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-05 09:35:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "miguelgrinberg",
"github_project": "flask-socketio",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "flask-socketio"
}