Skip to main content

PostgreSQL interface for WebAssembly over WebSockets

Project description

pgwasm

pgwasm is a Python interface to PostgreSQL proxied over WebSockets for use in WebAssembly (specifically using Pyodide). It is based on pg8000 and uses wasmsockets for communication.

wasmsockets handles the proxying of WebSocket calls to the Javascript interface when it detects it is being run in a WebAssembly environment. When run in a native Python environment, it instead uses the websockets package. This allows pgwasm to be tested in a native environment. However in both cases, since all network traffic is proxied over WebSockets, a WebSocket proxy is also required for the Postgres server; it cannot connect to a PostgreSQL server directly. The websockify package is convenient for implementing this proxy to PostgreSQL.

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

pgwasm-0.1.1.tar.gz (21.4 kB view hashes)

Uploaded Source

Built Distribution

pgwasm-0.1.1-py3-none-any.whl (23.4 kB view hashes)

Uploaded Python 3

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