Skip to main content

Async websocket to PostgreSQL proxy.

Project description

https://readthedocs.org/projects/pgwebsocket/badge/?version=latest https://badge.fury.io/py/pgwebsocket.svg

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


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 details)

Uploaded Source

Built Distribution

pgwebsocket-0.0.1-py2.py3-none-any.whl (11.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: pgwebsocket-0.0.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for pgwebsocket-0.0.1.tar.gz
Algorithm Hash digest
SHA256 720513144342bf388b1fad18970c3124f0125782ce3c841961bfd325db0f783a
MD5 e45e04c14f0d72299c8bf4197665cced
BLAKE2b-256 f155ea630aefbec31a0c3b117c50a894c0c5968d1a05aac605db4f8cdb0bc405

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pgwebsocket-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for pgwebsocket-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 efd53a10aafeb72a476a1f28eeb757b7bdaa3f7c81b07f1aff37776b1e268203
MD5 07a7bb495643ab9998c0a40d7672e102
BLAKE2b-256 c638f1e86f3dc3cb5715f70cd3aa614ca7f2d65f3d63fc697ce1310ef5a3b979

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