Skip to main content

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


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.1b1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

pgwebsocket-0.0.1b1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file pgwebsocket-0.0.1b1.tar.gz.

File metadata

File hashes

Hashes for pgwebsocket-0.0.1b1.tar.gz
Algorithm Hash digest
SHA256 aa95c86ce0e52a7f515333c3e662841a68659832a4ed5f2de58d3ddafe23a96e
MD5 2dd37393712620ffb493f39aef0e3244
BLAKE2b-256 931c471f50bceb595db2be4e8dd8a191d992831bb58d553439e78c6aeb874030

See more details on using hashes here.

Provenance

File details

Details for the file pgwebsocket-0.0.1b1-py3-none-any.whl.

File metadata

File hashes

Hashes for pgwebsocket-0.0.1b1-py3-none-any.whl
Algorithm Hash digest
SHA256 622a8a8ee15f4bd5602641a949bedfbb89eed4d559113ede600312aa0118bce6
MD5 2b509f331d8a5ae7539a46bb6a561b1f
BLAKE2b-256 be2fa11069b0b975a061dfde6506dfedc19854a3580f8dae52a22519c645276b

See more details on using hashes here.

Provenance

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