Skip to main content

Command line webhooks, on demand

Project description

hookee - Command line webhooks, on demand

Version Python Versions Coverage Build Docs GitHub License

hookee is a utility that provides command line webhooks, on demand! Dump useful request data to the console, process requests and responses, customize response data, and configure hookee and its routes further in any number of ways through custom plugins.

Installation

hookee is available on PyPI and can be installed using pip:

pip install hookee

or conda:

conda install -c conda-forge hookee

That's it! hookee is now available as a Python package and is available from the command line.

Basic Usage

hookee makes it easy to get webhooks on the fly right from the console. Simply start it with:

hookee start

With its default configuration, this will start a server on port 8000, open a ngrok tunnel using pyngrok, and mount a URL at /webhook. Sending any request to the /webhook endpoint will dump the request and response data to the console.

hookee can be configured in a number of ways to quickly and easily tweak request and response data. For example, here we are customizing the response body from /webhook using the --response arg.

hookee --response "<Response>Ok</Response>" --content-type application/xml

hookee can also be started without a tunnel (removing the dependency on an Internet connection). Using the --no-tunnel flag only starts hookee's server, allowing responses to be mocked locally. This can be particularly useful when service discovery is done through a proxy service (ex. HAProxy, Envoy, etc.), meaning we can tell hookee to start on the port of an expected downstream, thus intercepting requests to that service to provide our own responses in an isolated environment, very useful for rapid local development, cluster testing, and more.

hookee --no-tunnel --response "<Response>Ok</Response>" --content-type application/xml --default-route /some/route --port 19780

To see the ways hookee can be tweaked right from the console, view its documented args and commands like this:

hookee --help

Documentation

For more advanced usage, including how hookee's default configuration can be changed, extended through plugins, API integrations, and more, see its official documentation is available at http://hookee.readthedocs.io.

Contributing

If you would like to get involved, be sure to review the Contribution Guide.

Want to contribute financially? If you've found hookee useful, sponsorship would also be greatly appreciated!

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

hookee-2.3.9.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

hookee-2.3.9-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file hookee-2.3.9.tar.gz.

File metadata

  • Download URL: hookee-2.3.9.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for hookee-2.3.9.tar.gz
Algorithm Hash digest
SHA256 c55698135b8c5d20683e685a5e3b12489c9a0644d068145a9b5b67e947c42084
MD5 f72576010e1c663f6c7a0c29f9a0930b
BLAKE2b-256 d1669a4f07c8fc4c9f050d888dea78e9c3c64193d568d7ce9239c1d8ee6a9486

See more details on using hashes here.

File details

Details for the file hookee-2.3.9-py3-none-any.whl.

File metadata

  • Download URL: hookee-2.3.9-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for hookee-2.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 73d46912030dc0639efd7eed12ddc286793bafb20b3bbfe98dee1ff4fc07d86f
MD5 c39e03b443f5f919c763603a374a3b92
BLAKE2b-256 41528dc502d51c83e03a58863bb45f6b598edc1d8d2c5368ab874adeec977784

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page