Process Events In Style¶
This library aims to simplify the common pattern of event processing. It simplifies the process of filtering, dispatching and pre-processing events as well as injecting dependencies in event processors.
The only requirement is that your events are regular python dictionaries.
Take a look at the following examples to get an overview of the features available! Of course, you can mix and combine them in any way you like to create more complex scenarios.
v3.1.0: Add error handling strategies for processors.
v3.0.1: Improve the import path for results.
BREAKING CHANGE: The value returned by invoking a processor is now a Result.
BREAKING CHANGE: Dependencies are now only cached per-invocation.
It’s not possible to use identical or equivalent filters for different processors.
v2.6.0: Support getting a list of invoked processors after an invocation
v2.5.0: Support adding multiple subprocessors at once and also adding all processors from all modules in a package
v2.4.1: Fix scalar dependency resolution without pydantic (only raise on actual missing values and not none values)
v2.4.0: Support scalar value dependencies in processor parameters
v2.3.1: Raise the correct exception when processor parameters are invalid due to optional args
v2.3.0: Support dynamic filters
v2.2.0: Support pydantic models as processor dependencies
v2.1.1: Fix negative ranks and document the -1 rank usage
v2.1.0: Add number comparison filters
v2.0.0: Refactor a lot of the internals, make filters more user friendly and dependency injection more intuitive
v1.1.0: Add support for subprocessors
v1.0.0: Move the state and decorators inside a class
v0.0.1: Initial release