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.0.tar.gz (2.7 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.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: signalkit-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 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.0.tar.gz
Algorithm Hash digest
SHA256 e85f354721b0e7b8d940c224965a5e638789d57054c4cd7f11339d38c371f462
MD5 9e160a6660501e6ada447ca1dfdeae19
BLAKE2b-256 17fda32fc8034d64ed146b0a2bbe07b1e4feda59838cd35c2a2d35d09d2da023

See more details on using hashes here.

File details

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

File metadata

  • Download URL: signalkit-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f49aa6af8d284e806771ef70d630a422512484188641722b67a7fb6b76ed7460
MD5 ecb77e19e747993a29dcb8a79b8ad3f4
BLAKE2b-256 96112ac1db9123d3d4812e570340e6ec7f9efcfb355bec9ba76aee22dc7b9a5b

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