decorators API reference

Global decorators for BioMAJ Manager

biomajmanager.decorators.bank_required(func)[source]

Decorator function that checks a bank name is set

Parameters:func (Function) – Decorated function
Returns:Result of function called
Return type:func
Raises:SystemExit – If no bank set
biomajmanager.decorators.deprecated(func)[source]

This is a decorator which can be used to mark functions as deprecated.

It will result in a warning being emitted when the functionis used.

Parameters:func (Function) – Decorated function
Returns:Result of functio called
Return type:func
biomajmanager.decorators.user_granted(func)[source]

Decorator function that checks a user has enough right to perform action

Parameters:func (Function) – Decorated function
Returns:Result of function called
Return type:func
Raises:SystemExit – If no owner found either in bank nor in config file