diff --git a/boa/__init__.py b/boa/__init__.py index e6a79959..c7087b02 100644 --- a/boa/__init__.py +++ b/boa/__init__.py @@ -15,6 +15,7 @@ loads_partial, ) from boa.network import NetworkEnv +from boa.plugins import LOAD_PLUGINS from boa.precompile import precompile from boa.test.strategies import fuzz @@ -88,3 +89,6 @@ def _jupyter_server_extension_points() -> list[dict]: where to find the `_load_jupyter_server_extension` function. """ return [{"module": "boa.integrations.jupyter"}] + + +LOAD_PLUGINS() diff --git a/boa/plugins/__init__.py b/boa/plugins/__init__.py new file mode 100644 index 00000000..6343d401 --- /dev/null +++ b/boa/plugins/__init__.py @@ -0,0 +1,8 @@ +import importlib +import pkgutil + + +def LOAD_PLUGINS(): + for _, name, _ in pkgutil.iter_modules(): + if name.startswith("boa_"): + importlib.import_module(name)