https://github.com/alexdlaird/hookee
Command line webhooks, on demand
https://github.com/alexdlaird/hookee
cli education flask ngrok plugins python requests webhook
Last synced: about 2 months ago
JSON representation
Command line webhooks, on demand
- Host: GitHub
- URL: https://github.com/alexdlaird/hookee
- Owner: alexdlaird
- License: mit
- Created: 2020-07-31T23:37:11.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-18T00:22:51.000Z (12 months ago)
- Last Synced: 2024-10-07T08:12:06.102Z (7 months ago)
- Topics: cli, education, flask, ngrok, plugins, python, requests, webhook
- Language: Python
- Homepage: https://hookee.readthedocs.io
- Size: 329 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-rainmana - alexdlaird/hookee - Command line webhooks, on demand (Python)
README
[](https://pypi.org/project/hookee)
[](https://pypi.org/project/hookee/)
[](https://codecov.io/gh/alexdlaird/hookee)
[](https://github.com/alexdlaird/hookee/actions/workflows/build.yml)
[](https://hookee.readthedocs.io/en/latest)
[](https://github.com/alexdlaird/hookee/blob/main/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](https://pypi.org/project/hookee/) and can be installed
using `pip`:```sh
pip install hookee
```or `conda`:
```sh
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:
```sh
hookee start
```With its default configuration, this will start a server on port 8000, open a [`ngrok`](https://ngrok.com/) tunnel
using [`pyngrok`](https://pyngrok.readthedocs.io/en/latest/), 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.```sh
hookee --response "Ok" --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](https://www.haproxy.org/),
[Envoy](https://www.envoyproxy.io/), 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.```sh
hookee --no-tunnel --response "Ok" --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:
```sh
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](http://hookee.readthedocs.io).## Contributing
If you would like to get involved, be sure to review
the [Contribution Guide](https://github.com/alexdlaird/hookee/blob/main/CONTRIBUTING.rst).Want to contribute financially? If you've found `hookee` useful, [sponsorship](https://github.com/sponsors/alexdlaird)
would
also be greatly appreciated!