Skip to main content

Postgres client manager for python-socketio

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

socketio_pg_manager-0.0.2.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

socketio_pg_manager-0.0.2-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page