https://github.com/lukeyeager/flask-sqlalchemy-socketio-demo
Demo for how to use Flask, SQLAlchemy and SocketIO together
https://github.com/lukeyeager/flask-sqlalchemy-socketio-demo
flask socketio sqlalchemy
Last synced: 7 months ago
JSON representation
Demo for how to use Flask, SQLAlchemy and SocketIO together
- Host: GitHub
- URL: https://github.com/lukeyeager/flask-sqlalchemy-socketio-demo
- Owner: lukeyeager
- License: mit
- Created: 2016-01-09T16:49:55.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-13T20:00:22.000Z (over 9 years ago)
- Last Synced: 2025-03-20T17:54:14.611Z (11 months ago)
- Topics: flask, socketio, sqlalchemy
- Language: Python
- Size: 46.9 KB
- Stars: 19
- Watchers: 0
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flask-sqlalchemy-socketio-demo
[](https://travis-ci.org/lukeyeager/flask-sqlalchemy-socketio-demo)
Demo for how to use Flask, SQLAlchemy and SocketIO together
### Setup
```
pip install -r requirements.txt
./manage.py db init
./manage.py db migrate
./manage.py db upgrade
```
#### Asynchronous framework
There are three options for the asynchronous backend framework:
1. eventlet
* `pip install eventlet`
2. gevent
* `pip install gevent gevent-websocket`
3. threading
* *built-in*
#### Communication method
There are three options for the worker-server communication method:
1. SocketIO
* `pip install socketio-client`
2. Redis
* `pip install redis`
3. ZeroMQ
* `pip install pyzmq`
### Run server
```
./manage.py runserver
```
### Test functionality
```
./manage.py add
```