Bind functions to events that can be called from any other script at any time.
Project description
ev-manager (Event Manager)
Useful when working with DCCs like Maya, MotionBuilder, Unreal Engine, etc. and you want different tools/scripts to communicate with each other.
Installation:
pip install ev-manager
Examples:
import ev_manager
def hello_world():
print("Hello World")
ev_manager.bind("MyEvent", hello_world)
>>> import ev_manager
>>> ev_manager.emit("MyEvent")
>>> "Hello World"
Available functions:
Function | Description |
---|---|
bind(event, function) |
Bind a function to an event. |
unbind(event, function) |
Unbind a function from an event. |
unbind_all(*, event, function) |
Either unbind all functions from an event or unbind a function from all events. |
is_bound(event, function) |
Check if a function is bound to an event. |
emit(event, *args, **kwargs) |
Call all functions bound to an event. |
Limitations:
Events are per Python instance. So they will for example not be communicating between different applications.
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
ev-manager-0.0.5.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for ev_manager-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f85b12e347e41e007a99fb762cc00f346b137126f2190b5cf63e3ef35b1e046c |
|
MD5 | d50f949c8c8e4269e73e4591897aa243 |
|
BLAKE2b-256 | 192d42c4de645d2b27f50e06d162cd0e0a18ba20cdbfa7cd0effd5ae7b5fabc8 |