Async websocket to PostgreSQL proxy.
Project description
Async websocket to PostgreSQL proxy.
Install
python3 -m pip install pgwebsocket
Usage
from pgwebsocket import PgWebsocket
app = PgWebsocket("")
@app.on_connect
async def _on_connect(ctx):
await ctx.execute("LISTEN clients;")
@app.on_disconnect
async def _on_disconnect(ctx):
await ctx.execute("UNLISTEN clients;")
if __name__ == '__main__':
app.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pgwebsocket-0.0.1.tar.gz
(14.7 kB
view hashes)
Built Distribution
Close
Hashes for pgwebsocket-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efd53a10aafeb72a476a1f28eeb757b7bdaa3f7c81b07f1aff37776b1e268203 |
|
MD5 | 07a7bb495643ab9998c0a40d7672e102 |
|
BLAKE2b-256 | c638f1e86f3dc3cb5715f70cd3aa614ca7f2d65f3d63fc697ce1310ef5a3b979 |