Postgres client manager for python-socketio.
python3 -m pip install -r socketio-pg-manager
When you are using python-socketio
and you have multiple instances of your socketio server, simply pass AsyncPgManager
to the constructor of AsyncServer
import socketio
import socketio_pg_manager
client_manager = socketio_pg_manager.AsyncPgManager(
pg_options=dict(user="postgres", password="postgres")
)
sio = socketio.AsyncServer(async_mode="aiohttp", client_manager=client_manager)
For details, see Using a Message Queue.
Not available now.
AsyncPgManager
is an implementation subtyping to AsyncPubSubManager
of python-socketio
. It creates a connection to your postgres database and listens on LISTEN channel
, and publish any data using NOTIFY channel, payload
.