Python Wrapper

  • A wrapper is a python module that interface between python and another software library function which is a non python interface.
  • Python wrapper allows users to write only python code, even when calling non python libraries.Decorators are also called ‘wrappers’.
  • To pass the argument from my_function to wrapper the syntax is,
def wrapper(x):

If you need more functions we do have something like:

def wrapper(*args, **kwargs):

But, your logic within the decorator should able to handle the args and kwargs generally.

Categorized in:

Tagged in:

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,