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

Built distribution (wheel)

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

Total release size: 73.5 kB

Release files / hookee-3.0.1.tar.gz

Download URL hookee-3.0.1.tar.gz
Size 41.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2fad9cf3a2caaa0efb3e8f463d8e2eb18cf24fbee0d9be09b51e7726fef8340d
BLAKE2b-256 checksum
How to use checksums
c1da6ce71efd6f6d0d3d73e695a7b670fe974e2b932134fdb22bc31302f8da93
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.1-py3-none-any.whl

Download URL hookee-3.0.1-py3-none-any.whl
Size 32.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d7cc2c080464d1b94a4df56ab5d8e06e6c3fb36c3be3ce921af46f667f32da6
BLAKE2b-256 checksum
How to use checksums
8df823f77c7c17b0adf9edb79ad90bffc1baf861f4a1f671dd6540aee67b41a8
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.1

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.1 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