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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

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

Hashes for pgwebsocket-0.0.1b2.tar.gz
Algorithm Hash digest
SHA256 d929ae905e63e70e1972557600c5f1d49861fc720635581613dcf1fdd7a000c1
MD5 9e2139d88349fac06f0a088138d953e1
BLAKE2b-256 dd2c54c25d8c61f552842c7d3a2740ac4bec1f69c625944df045a01d91d7255d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgwebsocket-0.0.1b2-py3-none-any.whl
Algorithm Hash digest
SHA256 87ed4e20a350297ded07cd53acdd145e8c1f6bbb2e86b8efaf684e901fec097d
MD5 23177a846e67f3d9fbb6ffa84ce65e9f
BLAKE2b-256 0967bd23928bba5ab8ec2950bceb047fcce2ab9d26fc1a4f5c0a57168b10a202

See more details on using hashes here.

Supported by

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