Skip to content

Plugin

plugin

Package

name = name instance-attribute

modules = modules instance-attribute

__init__(name: str, modules: list)

Parameters:

Name Type Description Default
name str

Name of the package.

required
modules list

List of modules to expose. Each module can be a string or a dict.

If a string, it is the name of the module to import.

If a dict, with keys: name indicating name of the module to import. package indicating the name of the package to import the module from. If not specified, the module is imported from the current package.

required

import_modules()

Import all modules in the package.

The modules are imported in the order they are defined in the package.

Returns:

Type Description
None

The modules are imported silently. If an error occurs, it is raised.

Raises:

Type Description
TypeError

If a module is not a string or a dict.

ImportError

If a module cannot be imported.