Skip to content

MonoidDev/socketio_pg_manager

Repository files navigation

PyPI - Version

Socket PG Manager

Postgres client manager for python-socketio.

Install

python3 -m pip install -r socketio-pg-manager

Usage

Asynchronous Usage

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.

Synchronous Usage

Not available now.

How it works

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published