Skip to main content

A simple and small webserver to react to webhook-calls by running commands.For simplicity, webhook-urls and scripts are configured in a configfile.

Project description

Webhook command runner

This module provides a simple method for automatically execution calling scripts when a webhook-call is received.

In the configuration file you define, which script will be called on wich request. e.g.:

[webserver-settings]
listen_ip: 127.0.0.1
listen_port: 8080

[/print/hello]
method: GET, POST
command: echo "Hello!"

[/wall/hello]
method: GET, POST
command: wall "Hello!"

[/sleep]
method: GET
command: sleep 5 && wall "Hello!"

[/git/pull/webhook_script_execution]
method: GET
path: /data/scripts/webhook_script_execution
command: git pull

To start the webhook command runner simply install it with pip and call webhook-command-runner:

$ pip3 install webhook-command-runner
$ webhook-command-runner config.ini

The configuration has following sections:

webserver-settings:

In this section, the IP-Adress and Port configuration can be done.

/request/paths:

In these sections, it is defined, wich script will be called: You can define:

  • method: Which HTTP-Method can be used to trigger the script-execution. Today, GETand POST are implemented.
  • path: Optionally, you can define a Filesystem-Path, where the script shall be executed.
  • command: The command to be executed.

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

webhook_command_runner-1.0.3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

webhook_command_runner-1.0.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file webhook_command_runner-1.0.3.tar.gz.

File metadata

  • Download URL: webhook_command_runner-1.0.3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for webhook_command_runner-1.0.3.tar.gz
Algorithm Hash digest
SHA256 bddedc08d878e5a968622bcc8d0085087b20dd94f01d36d3f1bd02c6d398d994
MD5 2d6812f916a1c83e0ab3d95390a63053
BLAKE2b-256 aae3d02e061cf7557c2da428a7ce2d2e960183d7f8da01f5d42157b63bc2ddb0

See more details on using hashes here.

File details

Details for the file webhook_command_runner-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: webhook_command_runner-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for webhook_command_runner-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 db112276541c11c6cba830494109a2846d3b59b5f4ecae1b2dc2f42fb420693d
MD5 a4e2f7c654e2e3f470db5c0a009ce824
BLAKE2b-256 a5e1eceb350899acc6c8c5605f8dcca66e99dadf8e214fdc98865801e0bc1e44

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