Skip to main content

Structured, UUID-based signal orchestration utilities for Python using Blinker

Project description

SignalKit

SignalKit is a lightweight utility library that builds on Blinker to provide structured, UUID-based signal-response orchestration.

Features

  • Typed signal events using dataclasses (or any object with a request_id)
  • Safe response correlation via request IDs
  • Decorators to simplify consistent handler behavior
  • High performance, minimal dependencies

Install

pip install -e .

Usage Example

from dataclasses import dataclass, field
import uuid
from src.core import CoolSignal

@dataclass
class SignalEvent:
    request_id: str = field(default_factory=lambda: str(uuid.uuid4()))

signal = CoolSignal()

def handler(sender, event: SignalEvent):
    if event.request_id == "abc":
        return "matched!"

signal.connect(handler)
event = SignalEvent(request_id="abc")
result = signal.send(signal, event=event)
print(result)  # "matched!"

Note

SignalKit works with any event object that has a request_id attribute. For high-performance or low-latency systems, you can use a dataclass as shown above. For more complex validation, you can use your own custom class.

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

signalkit-0.1.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

signalkit-0.1.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file signalkit-0.1.1.tar.gz.

File metadata

  • Download URL: signalkit-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for signalkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 73e739b4c7e052bb250a25c92dca5710209973d6ef9cd92a53da33739c52611d
MD5 5090c9459a503c808f2d2c08a173a20e
BLAKE2b-256 9654036aa65bf223cb7e543c614346a4316dbd8c9858e2bfc4af66dd2cb038aa

See more details on using hashes here.

File details

Details for the file signalkit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: signalkit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for signalkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aed10ea859664ba09b4a433c27918ef386a7872bfd0261d059e30421dad05e59
MD5 18ea07898991bca05e22c233d30e4cfc
BLAKE2b-256 c7e77d18a58417c83eb04beed314b163ae3b963ee3ddfb9ddf7520006a0654ba

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