Async websocket to PostgreSQL proxy
Project description
from pgwebsocket import PgWebsocket
app = PgWebsocket(
"postgresql://"
)
@app.on_connect
async def on_connect(ctx):
""""""
ctx.subscribed = []
await ctx.execute("LISTEN all;")
@app.on_disconnect
async def on_disconnect(ctx):
""""""
await ctx.execute("UNLISTEN all;")
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.1b2.tar.gz
(3.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pgwebsocket-0.0.1b2.tar.gz.
File metadata
- Download URL: pgwebsocket-0.0.1b2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d929ae905e63e70e1972557600c5f1d49861fc720635581613dcf1fdd7a000c1
|
|
| MD5 |
9e2139d88349fac06f0a088138d953e1
|
|
| BLAKE2b-256 |
dd2c54c25d8c61f552842c7d3a2740ac4bec1f69c625944df045a01d91d7255d
|
File details
Details for the file pgwebsocket-0.0.1b2-py3-none-any.whl.
File metadata
- Download URL: pgwebsocket-0.0.1b2-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87ed4e20a350297ded07cd53acdd145e8c1f6bbb2e86b8efaf684e901fec097d
|
|
| MD5 |
23177a846e67f3d9fbb6ffa84ce65e9f
|
|
| BLAKE2b-256 |
0967bd23928bba5ab8ec2950bceb047fcce2ab9d26fc1a4f5c0a57168b10a202
|