Skip to content

Startup project for python-socketio with sanic webserver

Notifications You must be signed in to change notification settings

rajezvelse/opensocket

Repository files navigation

opensocket

Sanic - SocketIO startup kit.

banner

Getting started

Clone the repo, followup the steps:

  1. Configure database and server host settings in webconsole/main/settings.py

  2. pip install -r requirements - Installs required python packages

  3. python manage.py migrate - Updates database schema

  4. To start server run python manage.py runserver

Open http://localhost:8000 to view webconsole

Note: You may need to install mysql/sqlite3 server depends on database that you are using.

Getting started with docker

Pull docker image

docker pull rajez/opensocket:beta

Run

docker run -dti -p 8000:8000 --name opensocket rajez/opensocket:beta

Open http://localhost:8000 to view webconsole

Workup

You may modify socket authentication in socketplay/connection/authentication.py

Define websocket event in directory socketplay/events

Define namespaces in directory socketplay/namespaces

Define rooms in directory socketplay/rooms

Note: webconsole page implementation is in progress.

Sources

sanic

python-socketio

References

python-sokcetio - Example implementations of python-socketio for various deployment methods

sanic-starter - sanic starter with alembic migration

About

Startup project for python-socketio with sanic webserver

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published