Skip to main content

load_handler

Given a path to a handler, return an instance of that handler.

def load_handler(
path: string,
*args: any,
**kwargs: any
) - > object

Given a path to a handler, return an instance of that handler.

Parameters

NameTypeDescription
pathstringThe full Python dot-notation path to the handler class to be instantiated.
*argsanyVariable length argument list passed to the handler's constructor.
**kwargsanyArbitrary keyword arguments passed to the handler's constructor.

Returns

TypeDescription
objectAn instance of the handler class specified by the import path, initialized with the provided arguments.