Skip to main content

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.

Configure authtoken

To get the most out of hookee, you'll want to obtain an authtoken from ngrok (it's free!) and install it in to hookee's config file:

hookee authtoken $NGROK_AUTHTOKEN

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 is how you can customize 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 ngrok and 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 you can tell hookee to start on the port of an expected downstream, thus intercepting requests to that service to provide your 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 Read the Docs.

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!

Metadata

Release files for hookee 2.4.1

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

Source distribution (sdist)

Source distribution for hookee 2.4.1
File Size Uploaded
hookee-2.4.1.tar.gz 27.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hookee 2.4.1
File Interpreter ABI Platform
hookee-2.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 52.5 kB

Release files / hookee-2.4.1.tar.gz

Download URL hookee-2.4.1.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
00a228e455ab6efd5d184ce4c9a43cb8bd06bbe050e76dae1dd2b10fe7a8cc86
BLAKE2b-256 checksum
How to use checksums
0aa49b2d28a6d9436933f64207a7aafc1eb88e5adeca42084a81515615faf7e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / hookee-2.4.1-py3-none-any.whl

Download URL hookee-2.4.1-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7488b532d68f401c38e57ad4a1267ccaada26a30824eed1ea785c48b4f93bd9
BLAKE2b-256 checksum
How to use checksums
197e7c675f27f23d35e3c1303941b751613afb3eb8d2aea1433ae754af55b5e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

2.4.1 This release

2 release files

2.4.0

2 release files

2.3.13

2 release files

2.3.12

2 release files

2.3.11

2 release files

2.3.9

2 release files

2.3.8

2 release files

2.3.7

2 release files

2.3.6

2 release files

2.3.5

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.8

1 release file

2.0.7

1 release file

2.0.6

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.0

1 release file

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.0.12

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

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