Simple Event Processing Library
Project description
Event Processing
Welcome to EventProcessing, a lightweight, Python-based event handling system designed for efficient and straightforward event management and processing. This system allows for decoupled components, making it easier to develop and maintain complex applications with event-driven architectures.
Features
- Simple API: Easy to use for subscribing to events, publishing events, and handling them.
- Decoupled Design: Promotes loose coupling between components for better modularity.
- Efficient Event Handling: Queue-based event processing ensuring order and reliability.
Prerequisites
- Python 3.6+
Installation
pip install event_processing
Usage
Quick start guide and examples on how to subscribe to events, publish them, and handle them in your application.
Creating an Engine
# Create an engine for event handling
engine = Engine()
Subscribing to an Event
# Create a subscriber and subscribe to a topic
subscriber = Subscriber()
engine.subscribe(subscriber, "topic_name")
Publishing an Event
# Publish an event to a topic
event = Event(topic="topic_name", partition=1, value="Hello, World!")
engine.inject(event)
# Or with the subscriber itself
subscriber.send(event)
Handling an Event
Implement the receive method in your Subscriber class.
def receive(self, event: Event):
print(f"Received event: {event.value}")
Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Project Link: https://github.com/raulikeda/EventProcessing
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 Distributions
Built Distribution
Hashes for event_processing-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 675e4044771ab5ff74ba3a5093dd9be03de2d6d4976c8fb082a06c69fc0bb27f |
|
MD5 | 9ea8f8201a3ddb1e79387cd46964fa68 |
|
BLAKE2b-256 | d304104c98374e7cdfdccb00717f97b78cf484b16775caafc3fe4ec706dcf1b6 |