Postgres client manager for python-socketio
Project description
SocketIO PG Manager
Postgres client manager for python-socketio.
Install
python3 -m pip install 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
Built Distribution
Close
Hashes for socketio_pg_manager-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07e21085d138f1f47df73e7186e2a8cbdc15ad8452b75d2ea787eab74ec8ee76 |
|
MD5 | 92035dad7b2c8caca9344757cea6250c |
|
BLAKE2b-256 | c2a6ecab48867041e9cced0d7a235064309efce6a18900b21614873cfdd7e1de |
Close
Hashes for socketio_pg_manager-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f269a518b731c8ab66eccd4aba002c3095d281aac55d52bcd66e09701c35d3ff |
|
MD5 | e8dca4d4d9c6c1129944de8ee5ff06cf |
|
BLAKE2b-256 | 880da043e6b3adbb80d020763fcf2c1a08925ec06698546ed9e1b66e24b0508e |