Skip to main content

pg-notify-webhook

Implements a simple server process that listens to Postgres notifications, then fires off a webhook in response.

The content of the message is sent as the JSON payload to the webhook.

You can use this to invoke AWS Lambda functions (fronted by API gateway) or any other system that receives HTTP requests.

Install it as follows:

pip install pg-notify-webhook

You simply set up a config.yaml with the database connection string and define one or more channels and webhooks. Then start the server as follows:

pg-notify-webhook

Once the server is running, you can send notifications from Postgres:

NOTIFY one, '{"name": "Vijay"}'

config.yaml
DSN: postgresql://user:password@hostname:5432/database
channels:
  - one
  - two
webhooks: 
  one: https://postman-echo.com/get?foo1=bar1&foo2=bar2
  two: https://example.com

Metadata

Release files for pg-notify-webhook 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pg-notify-webhook 1.3
File Size Uploaded
pg-notify-webhook-1.3.tar.gz 2.8 kB Details

Release files / pg-notify-webhook-1.3.tar.gz

Download URL pg-notify-webhook-1.3.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
aa0d1c44f90bb8e47d7a444ad1fa80970fd884f23ba90b2b4f4fef287c5658e9
BLAKE2b-256 checksum
How to use checksums
3db84ab383f868ba545c978da5365a8436a1e80d779d4b4994a20678d120fed1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.4.2 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

1.3 This release

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page