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.dev46.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.dev46.tar.gz.

File metadata

  • Download URL: swarmauri_publisher_webhook-0.3.0.dev46.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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.dev46.tar.gz
Algorithm Hash digest
SHA256 d358bed32c35dd42e7cae40acfaded0eaffd9316f6ab3f4ee25d5f5e01d0cb58
MD5 d9229604b4c5e3b6ab00d5bdc1f603b3
BLAKE2b-256 8ac2e23c26ddcd15c3919bbe2df3f0b470ef8df9eabc5bb7abb6603e1ed0f4e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_publisher_webhook-0.3.0.dev46-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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.dev46-py3-none-any.whl
Algorithm Hash digest
SHA256 2201127c99b5bcf6308a1b7934c4bfee0dc9f02a9022ddb820d3a6062da18f58
MD5 33eefeafa1addb8660efd368d3bd318a
BLAKE2b-256 ce8e06b8b2a7d9045d1445761735de0937859224b288a694524ef8d69b802548

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