Skip to main content

hookee - Command line webhooks, on demand: see, answer, forward, and capture requests from your terminal

Version Python Versions Coverage Build Docs GitHub License

hookee gives you a public URL to your terminal with one command. Point any service's webhooks at it, then see, answer, and forward every request as it happens, with no code.

  • See any webhook, instantly. Run hookee, paste its URL into any service's console, and every request is dumped to your terminal, with JSON, XML, and form bodies formatted.
  • Answer it from the command line. Respond with any body, status code, headers, or delay, and see how the service reacts.
  • Sit in front of your app. --forward-to relays every request to your local app and shows both sides, including streamed responses.
  • Debug a phone or browser against your local backend. Every API call shows up in your console, with nothing to set up on the device.
  • Capture real payloads as test fixtures. Save each request, and your app's response, as JSON.
  • Verify signatures, test error handling, and mock services. Check that requests really came from the service, break one endpoint while the rest keep working, or stand in for an API your app calls.

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 into hookee's config file:

hookee authtoken $NGROK_AUTHTOKEN

Basic Usage

Start hookee, and it gives you a public URL whose /webhook endpoint dumps every request it receives, and the response sent back, to your console:

hookee

Each workflow below is a single command:

You want to ... Run
See what a webhook sends hookee
Reply without writing code hookee --response-file reply.xml
Test error handling and retries hookee --status-code 503 --delay 10
Forward to your app, and watch both sides hookee --forward-to http://localhost:3000
Capture real payloads as fixtures hookee --forward-to http://localhost:3000 --save-dir tests/fixtures
Record a third-party API's real responses hookee --forward-to https://api.example.com --host-header api.example.com --save-dir tests/fixtures
Verify webhook signatures hookee --verify-webhook <provider>:<secret>
Debug a device against your local API hookee --forward-to http://localhost:3000 --url my-api.ngrok.dev
Break one endpoint, keep the rest working hookee --forward-to http://localhost:3000 --response-route "^GET /api/" --status-code 503
Mock a service your app calls hookee --response-file feed.ics
Run locally, without a tunnel hookee --no-tunnel --port 19780 --response "Ok"

To see every way hookee can be configured right from the console:

hookee --help

Documentation

For more advanced usage, hookee's official documentation is available on Read the Docs, including how to change its defaults, extend it with plugins, and integrate it into your own code.

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 3.0.2

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 3.0.2
File Size Uploaded Provenance Actions
hookee-3.0.2.tar.gz 41.0 kB Without provenance Details for hookee-3.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 73.5 kB

Release files / hookee-3.0.2.tar.gz

Download URL hookee-3.0.2.tar.gz
Size 41.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5a1227479e74bc4ee3a4c8084b22360ba0c06583cbed87c7e61d95082791f5d0
BLAKE2b-256 checksum
How to use checksums
7bad53919ead53107774262cd9d5d0cb5566efb67421aa10b44c08381075ed64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.17

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

Download URL hookee-3.0.2-py3-none-any.whl
Size 32.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
856ecd5e309d82cd42435f8ad1d5d2e7bc19c9308ae4d6b8be79ee78c6b46a3d
BLAKE2b-256 checksum
How to use checksums
f8f45a3997c4336ab60b95c404fdc8086f510b290547a5e70ce92c1624141ee8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.17

Security for hookee 3.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.2 This release

2 release files No provenance

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