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 Pydantic
- Safe response correlation via request IDs
- Decorators to simplify consistent handler behavior
- High performance, minimal dependencies
Install
pip install -e .
Usage Example
from pydantic import BaseModel, Field
import uuid
from signalkit.core import CoolSignal, SignalEvent
class MyEvent(SignalEvent):
value: str
signal = CoolSignal()
def handler(sender, event: MyEvent):
if event.value == "hello":
return "matched!"
signal.connect(handler)
event = MyEvent(value="hello")
result = signal.send(signal, event=event)
print(result) # "matched!"
Note
SignalKit works with any Pydantic model that has a request_id field. For more complex validation and parsing, simply extend SignalEvent with your own fields.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file signalkit-0.1.3.tar.gz.
File metadata
- Download URL: signalkit-0.1.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12072bbd7908b8d934f6ae3656c6f072e9e82d48776b886733c93bbc8517515a
|
|
| MD5 |
579c54dae4b96fd4422d582b36b60d21
|
|
| BLAKE2b-256 |
1ad0bb87d6d106869453e5e99e872d55c95e9105cabfdc44ca8996c2ae91a96c
|
File details
Details for the file signalkit-0.1.3-py3-none-any.whl.
File metadata
- Download URL: signalkit-0.1.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
194c2161daac117d7a01cef1f1ff6a03b48f236fc4b2d368b279421b4bbab395
|
|
| MD5 |
907a78f152781e17a6a7a4d7a99592a3
|
|
| BLAKE2b-256 |
f16936edf4419ffa96baff894e8710feded905e05b9b547af43f9d2b91800f73
|