Skip to content

Flask web app that synchronizes Youtube videos between multiple users.

License

Notifications You must be signed in to change notification settings

jtcourtemarche/flask-together

Repository files navigation

Flask web app that synchronizes Youtube videos between multiple users.

screenshot of flask-together room

Setup

This application requires that you have a PostgreSQL & Redis server already set up. Put your credentials in the config.py file:

# Example postgres import

POSTGRES = {
    'user': 'postgres',
    'password': 'password',
    'dbname': 'mydatabase',
    'host': 'localhost',
    'port': '5432',
}

It is assumed that you are running Redis on the default port.

All of your API keys belong in the config.py file as well. Your config.py file setup should look similar to this:

YOUTUBE_KEY = "<youtube api key>"
SECRET_KEY = "<secret key for flask>"

# If you want LastFM integration (these are optional)
LASTFM_ENABLED = True
LASTFM_KEY = "<lastfm api key>"
LASTFM_SECRET = "<lastfm secret key>"

Python setup is as follows:

$ pip install -r requirements.txt

$ python manager.py
>> init_db

$ python manager.py
>> add_user

# Initialize migrations
$ flask db init

# Run locally
$ flask run

# Or run w/ Gunicorn
$ gunicorn app:app --bind 0.0.0.0:5000 --reload -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker"

Developer Notes

Disconnection Issue:

  • A disconnect event will not fire immediately if you are not using web sockets. This can make users appear online long after they have left the room: miguelgrinberg/Flask-SocketIO#291

About

Flask web app that synchronizes Youtube videos between multiple users.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published