Onany

Latest version: v0.2.0

Safety actively analyzes 613631 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.2.0

Feat
- Declare a webhook as a listener

Chore
- Integrates with Github actions
- Integrates with CodeClimate
- Implements auto deploy on pypi
- Run deploy flow on python 3.7 version
- Declare needed packages on deploy

Docs
- Adds docstring how main functions are used

0.2.0rc4

Docs
Adds docstring how main functions are used

0.2.0rc3

**Chore**
Declare needed packages on deploy

0.2.0rc2

**Chore**
Run deploy flow on python 3.7 version

0.2.0rc1

**Feat**
Declare a webhook as a listener

**Chore**
Integrates with Github actions
Integrates with CodeClimate
Implements auto deploy on pypi

0.1.3

OnAny... thing happening
OnAny is a simple yet powerful event manager library, where you can
declare listeners and dispatch as much events as needed to them.

How To
To listen and dispatch events is very simple:
python
from onany import dispatch, listener

listener("event.name")
def on_event_name(*args, **kwargs):
print("I've been called with {} and {}".format(
args,
kwargs
))

>>> dispatch(
"event.name",
"first_param",
"second_param",
"third_param",
first="param",
second="param",
third="param")


Should I wait all callbacks to end ?
Nope. You can "threadily" dispatch your events so they don't need to be
waited for the main process.
python
from onany import disthread, listener

listener("event.name")
def on_event_name():
print("I'm gonna be executed on another thread")

>>> disthread("event.name")

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.