Skip to content

Releases: samuelgregorovic/callpyback

Updated usage examples

07 Feb 19:01
Compare
Choose a tag to compare
v1.2.1

release v1.2.0 to pypi

Added support for passing decorated function to callbacks

07 Feb 18:56
a744ca1
Compare
Choose a tag to compare

Added support for passing decorated function to callbacks + updated README.md + examples

Enforce callback parameters rules

02 Feb 22:20
Compare
Choose a tag to compare

In latest version of callpyback, when declaring callback functions, following rules must be obeyed:

a) on_call() callback MUST eitheraccept no parameters or combination of the following:

  • func_kwargs - will receive parameters passed to the function decorated with CallPyBack

b) on_success() callback MUST either accept no parameters or combination of the following:

  • func_result - will receive return value of the function decorated with CallPyBack
  • func_kwargs - will receive parameters passed to the function decorated with CallPyBack

c) on_failure() callback MUST either accept no parameters or combination of the following:

  • func_exception - will receive exception raised by the function decorated with CallPyBack
  • func_kwargs - will receive parameters passed to the function decorated with CallPyBack

d) on_end() callback MUST either accept no parameters or combination of the following:

  • func_result - will receive return value of the function decorated with CallPyBack
  • func_exception - will receive exception raised by the function decorated with CallPyBack
  • func_kwargs - will receive parameters passed to the function decorated with CallPyBack
  • func_scope_vars - will receive local variables of the function decorated with CallPyBack, whose names were specified in the pass_vars decorator parameter.

These rules are enforced to allow omitting parameters in the callback function. This is useful when some of these parameters are not needed for the callback function. If those rules are not obeyed, error will be raised during the initialization of the CallPyBack decorator class.

Updated pypi description

02 Feb 19:21
Compare
Choose a tag to compare
v1.0.1

update pypi description

Mixin restructure + args and kwargs now available via kwargs

02 Feb 19:12
b9d1f55
Compare
Choose a tag to compare
v1.0.0

Change structure to use mixins (#3) + args and kwargs now available a…

Added features

01 Feb 18:47
Compare
Choose a tag to compare
v0.0.6

added license + black badges and black formatting