{"id":28456,"library":"webhook-listener","title":"webhook-listener","description":"A lightweight Python web server module to listen for webhooks and forward incoming requests to predefined callback functions. Currently at version 1.2.0, with infrequent releases.","status":"active","version":"1.2.0","language":"python","source_language":"en","source_url":"https://github.com/toddrob99/Webhooks","tags":["webhooks","server","http","listener","ssl"],"install":[{"cmd":"pip install webhook-listener","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used internally as the HTTP server. Automatically installed as a dependency.","package":"cherrypy","optional":false}],"imports":[{"note":"The package name uses hyphens on PyPI but underscores in Python imports.","symbol":"Listener","correct":"from webhook_listener import Listener"}],"quickstart":{"code":"from webhook_listener import Listener\n\ndef handle_webhook(data):\n    print(\"Received:\", data)\n    return {\"status\": \"ok\"}\n\nlistener = Listener(\n    port=8080,\n    endpoint=\"/webhook\",\n    callback=handle_webhook,\n    ssl_certificate=\"/path/to/cert.pem\",\n    ssl_key=\"/path/to/key.pem\"\n)\nlistener.start()","lang":"python","description":"Creates a webhook listener on port 8080 with SSL support. The callback receives the parsed JSON body of incoming POST requests."},"warnings":[{"fix":"Upgrade to 1.0.0 or newer.","message":"In v1.0.0 a warning about cherrypy bus on exit was fixed. Older versions may show a stack trace when the listener is stopped.","severity":"deprecated","affected_versions":"<1.0.0"},{"fix":"Use `from webhook_listener import Listener`.","message":"The import uses underscores (webhook_listener) but the PyPI package name uses hyphens (webhook-listener). Common mistake is to write `import webhook-listener` which is invalid Python syntax.","severity":"gotcha","affected_versions":"all"},{"fix":"Provide both files or omit both to run without SSL.","message":"SSL support requires both `ssl_certificate` and `ssl_key` parameters. If only one is provided, the listener crashes.","severity":"gotcha","affected_versions":">=1.2.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install webhook-listener` and then use `from webhook_listener import Listener`.","cause":"The package installed as 'webhook-listener' but the import uses underscores. This error appears if pip install failed or if import is misspelled.","error":"ImportError: No module named webhook_listener"},{"fix":"Avoid setting cherrypy config directly; rely on webhook_listener's default config. If error persists, upgrade to latest version.","cause":"Incorrect configuration or conflicting cherrypy settings when using custom endpoints.","error":"cherrypy._cpdispatch.LateParamCallback: The config entry 'tools.sessions.on' refers to an unknown tool"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}