A Rust webhook forwarding bridge with Python hook support
Project description
Webhook Bridge
Webhook Bridge 4.0 is a Rust-based webhook gateway with a single
webhook-bridge executable for the CLI, HTTP server, admin commands, and
Python worker management.
Expose one public URL, configure it in GitHub/GitLab/Sentry, and let the Rust gateway identify the provider, persist the event, and trigger local Python hooks, PowerShell/Python scripts, parallel script groups, or forwarding routes.
Quick Start
cargo run -p webhook-bridge-server --bin webhook-bridge -- run --config config.4.0.yaml
Open:
- Dashboard: http://127.0.0.1:3002
- API health: http://127.0.0.1:8080/health
- Unified webhook gateway: http://127.0.0.1:8080/gateway
CLI
webhook-bridge run --config config.4.0.yaml
webhook-bridge admin --config config.4.0.yaml
webhook-bridge worker start --config config.4.0.yaml --index 0
webhook-bridge check-config --config config.4.0.yaml
Unified Gateway
Configure external providers to send webhooks to a single URL:
https://your-host.example.com/gateway
The gateway detects common provider headers such as X-GitHub-Event,
X-Gitlab-Event, and Sentry hook headers, then maps them through
gateway.provider_routes:
gateway:
enabled: true
public_path: "/gateway"
provider_routes:
github: "github-fanout"
gitlab: "gitlab"
sentry: "sentry"
You can still force a route for debugging or custom providers:
curl -X POST "http://127.0.0.1:8080/gateway?route=github" \
-H "Content-Type: application/json" \
-d '{"repository":{"full_name":"loonghao/webhook_bridge"}}'
Script Fanout
Routes can run local scripts directly. This lets one GitHub delivery fan out to multiple local actions, for example writing the raw webhook JSON with PowerShell and sending a short notification with Python:
gateway:
provider_routes:
github: "github-fanout"
scripts:
groups:
- name: "github-fanout"
mode: "parallel"
routes:
- "github-save-json"
- "github-wechat"
routes:
- name: "github-save-json"
shell: "powershell"
script_path: "scripts/save-github-hook.ps1"
env:
WEBHOOK_BRIDGE_OUTPUT_DIR: "data/github-hooks"
- name: "github-wechat"
shell: "python"
script_path: "scripts/notify-wechat.py"
env:
WEBHOOK_BRIDGE_WECHAT_WEBHOOK_URL: "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=00000000-0000-0000-0000-000000000000"
Use a real webhook URL only in local config or environment variables. Do not commit production webhook keys.
Python Hook Example
from webhook_bridge.plugin import BasePlugin
class Plugin(BasePlugin):
def post(self):
return {
"status": "success",
"payload": self.data,
}
Send a webhook:
curl -X POST http://127.0.0.1:8080/gateway?route=test_plugin \
-H "Content-Type: application/json" \
-d '{"event":"hello"}'
The executor can run under uv by default:
python:
environment_manager: "uv"
uv_project_dir: "."
If uv is not installed, local development falls back to the configured Python
interpreter when allowed.
Development
cargo test
cd web-nextjs
npm install
npm run dev
The release build emits one executable named webhook-bridge. It embeds the
Python executor runtime and materializes it locally when workers start.
Release
Releases are managed by googleapis/release-please-action. When the
release-please PR is merged to main, CI builds and uploads platform-specific
single executable assets to the GitHub Release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webhook_bridge-4.0.0a0.tar.gz.
File metadata
- Download URL: webhook_bridge-4.0.0a0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a6500d08a9f8d2e4ffef52b03cdaf93f37945a3e0b1d15d981048ce8745aeba
|
|
| MD5 |
0456702db75d323434017013216896c9
|
|
| BLAKE2b-256 |
f547a3b445dbb064eca593d56f894edc184e1a696488a3d950178061065da02a
|
Provenance
The following attestation bundles were made for webhook_bridge-4.0.0a0.tar.gz:
Publisher:
python-publish.yml on loonghao/webhook_bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webhook_bridge-4.0.0a0.tar.gz -
Subject digest:
1a6500d08a9f8d2e4ffef52b03cdaf93f37945a3e0b1d15d981048ce8745aeba - Sigstore transparency entry: 1568938888
- Sigstore integration time:
-
Permalink:
loonghao/webhook_bridge@29f351bc77e5ac5caaa62088d4989ac396585efb -
Branch / Tag:
refs/tags/v4.0.0 - Owner: https://github.com/loonghao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@29f351bc77e5ac5caaa62088d4989ac396585efb -
Trigger Event:
push
-
Statement type:
File details
Details for the file webhook_bridge-4.0.0a0-py3-none-any.whl.
File metadata
- Download URL: webhook_bridge-4.0.0a0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f4720e928de29030820e972bf9c560d10a45f2243bf3eaae8af45bf21637d86
|
|
| MD5 |
9239976bc322474ba10de42c641954fb
|
|
| BLAKE2b-256 |
c79b14b5009eccecc759baeaea163dfcc676786f892033779398a5a41890c85f
|
Provenance
The following attestation bundles were made for webhook_bridge-4.0.0a0-py3-none-any.whl:
Publisher:
python-publish.yml on loonghao/webhook_bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webhook_bridge-4.0.0a0-py3-none-any.whl -
Subject digest:
2f4720e928de29030820e972bf9c560d10a45f2243bf3eaae8af45bf21637d86 - Sigstore transparency entry: 1568938939
- Sigstore integration time:
-
Permalink:
loonghao/webhook_bridge@29f351bc77e5ac5caaa62088d4989ac396585efb -
Branch / Tag:
refs/tags/v4.0.0 - Owner: https://github.com/loonghao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@29f351bc77e5ac5caaa62088d4989ac396585efb -
Trigger Event:
push
-
Statement type: