Skip to main content

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

Project description

SignalKit

SignalKit is a lightweight Python signaling library built upon the robust Blinker library. It provides a simple yet flexible way to dispatch signals and handle responses, automatically adapting to your handler function signatures.

Installation

pip install signalkit

Usage Example

# define event model
class Event:
    def __init__(self, text: str):
        self.text = text

# define handler
def handle_event(sender, event: Event) -> str:
    return event.text.upper()

# use CoolSignal
from signalkit import CoolSignal

signal = CoolSignal()
signal.connect(handle_event)

event = Event("hello world")
response = signal.send(sender=None, event=event)
print(result) # 'HELLO WORLD'

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-1.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

signalkit-1.1.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for signalkit-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c395e45bafc1da8df0b97826e2ae7a7a371f468560fade216b433fb39f65eed1
MD5 6464fd2bcbfb4604201ead87c1d7aa9d
BLAKE2b-256 fed070005b22a0f15fb11353aafecfad4d3786e774a408b9eacae9e79f0b565e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for signalkit-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 461ace5fdb42b95f169ad4de8bb0b64083ae25a290c0845a2dafeae89ab591d0
MD5 ae33ae6d4b0d337d9eb608be49b934ae
BLAKE2b-256 e7087bb7d8f9a615b7257e826d4bbdf42527d20d427471d66b0324739e844967

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