Skip to main content

PyEvent: A simple event handling library for python

Getting Started

  • Simply Run this Command:
pip install signally
  • Here are the examples on how to run events and add a listeners:
from signally.event import Event

test_event = Event()

def greet(name, **kwargs):
    print(f"Hello, {name}!")

def greet_with_exclamation(name, **kwargs):
    print(f"Hello, {name}!!!")

def greet_with_age(name, age, **kwargs):
    print(f"Hello, {name}! You are {age} years old.")

@test_event.emittable
def greet_with_decorator(name, **kwargs):
    print(f"Hello, {name} from decorator!")

def main():
    # Add listeners to the event
    test_event.add_listener(greet) # Greet the user
    test_event.add_listener(greet_with_exclamation) # Greet with exclamation 
    test_event.add_listener(greet_with_age)  # Greet with age
    test_event.add_listener(lambda name, **kwargs: print(f"Hello, {name} from lambda!")) # Greet from lambda
    # test_event.emittable(greet_with_decorator) # This should be a decorator and throws error
    
    # Emit the event
    test_event.emit(name="John", age=20)


if __name__ == "__main__":
    main()

Just Copy to try and get started...

Metadata

Release files for signally 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for signally 0.1.1
File Size Uploaded
signally-0.1.1.tar.gz 1.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for signally 0.1.1
File Interpreter ABI Platform
signally-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.0 kB

Release files / signally-0.1.1.tar.gz

Download URL signally-0.1.1.tar.gz
Size 1.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5121b7a77ba6da6b7b0bb131831b3eb0d51b73e0d855a8c1b5a7d4f2a2bbe2e2
BLAKE2b-256 checksum
How to use checksums
3c6c4ac30e3c491e044f53fcfb3365d565b146d8cabd7982b931470b974933c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / signally-0.1.1-py3-none-any.whl

Download URL signally-0.1.1-py3-none-any.whl
Size 1.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b54428d5b84f1bda66b1a1325a0f0ff327eb8573e5e82ac289a7a3f7a00054b7
BLAKE2b-256 checksum
How to use checksums
0b6837261153b3b7ba130ff3ece8e930f7891b090cff8ef85f73c3ab25a228ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page