Skip to main content

A Webhook publisher implementation for Swarmauri.

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_publisher_webhook


Swarmauri Webhook Publisher

WebhookPublisher is a Swarmauri component that delivers JSON events to an HTTP endpoint. It keeps an internal httpx.Client session for efficient reuse and raises a RuntimeError when the webhook cannot be reached or responds with a non-success status code.

Installation

Choose the tool that fits your workflow:

# pip
pip install swarmauri_publisher_webhook

# Poetry
poetry add swarmauri_publisher_webhook

# uv (install the tool if you do not already have it)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv add swarmauri_publisher_webhook

Usage

from swarmauri_publisher_webhook import WebhookPublisher

publisher = WebhookPublisher(url="https://your-webhook-endpoint.com/hook")

publisher.publish(
    channel="my_data_stream",
    payload={"message": "Hello, webhook!", "value": 123}
)

The publisher posts a JSON object shaped as {"channel": ..., "payload": ...} to the configured URL. Wrap calls to publish in your own error handling if you need to catch connectivity or webhook-side failures.

Want to help?

If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_publisher_webhook-0.3.0.dev36.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file swarmauri_publisher_webhook-0.3.0.dev36.tar.gz.

File metadata

  • Download URL: swarmauri_publisher_webhook-0.3.0.dev36.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for swarmauri_publisher_webhook-0.3.0.dev36.tar.gz
Algorithm Hash digest
SHA256 184da422e74bc65633578fe189ab715cbf2277624b7912fd57802b71af74d326
MD5 40d4e12b738c26445e6f1aca9152bcee
BLAKE2b-256 5026c16e889f1cb191b2310005e09282628e715194b02f79cfa497b20403c4ab

See more details on using hashes here.

File details

Details for the file swarmauri_publisher_webhook-0.3.0.dev36-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_publisher_webhook-0.3.0.dev36-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for swarmauri_publisher_webhook-0.3.0.dev36-py3-none-any.whl
Algorithm Hash digest
SHA256 9fe24e1ad28ae04e235a25dd7ed70e277e9eec8f103238c02ea879ef4be8ad5b
MD5 2614670bd8c4512e80b60fd3d89774a9
BLAKE2b-256 971466326a5599db156328e39d334eccf49f75145fbaf212b76ba654c4f3b828

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page