package documentation

This script creates an IPython extension to load Kedro-related variables in local scope.

From __init__.py:

Function load_ipython_extension Main entry point when %load_ext kedro.ipython is executed, either manually or automatically through kedro ipython or kedro jupyter lab/notebook. IPython will look for this function specifically. See https://ipython.readthedocs.io/en/stable/config/extensions/index.html...
Function magic_reload_kedro The %reload_kedro IPython line magic. See https://kedro.readthedocs.io/en/stable/notebooks_and_ipython/kedro_and_notebooks.html#reload-kedro-line-magic # pylint: disable=line-too-long for more.
Function reload_kedro Function that underlies the %reload_kedro Line magic. This should not be imported or run directly but instead invoked through %reload_kedro.
Variable logger Undocumented
Function _find_kedro_project Undocumented
Function _remove_cached_modules Undocumented
Function _resolve_project_path Resolve the project path to use with reload_kedro, updating or adding it (in-place) to the local ipython Namespace (local_namespace) if necessary.

Undocumented

def load_ipython_extension(ipython): (source)

Main entry point when %load_ext kedro.ipython is executed, either manually or automatically through kedro ipython or kedro jupyter lab/notebook. IPython will look for this function specifically. See https://ipython.readthedocs.io/en/stable/config/extensions/index.html

@needs_local_scope
@magic_arguments()
@argument('path', type=str, help='Path to the project root directory. If not given, use the previously setproject root.', nargs='?', default=None)
@argument('-e', '--env', type=str, default=None, help=ENV_HELP)
@argument('--params', type=(lambda value: _split_params(None, None, value)), default=None, help=PARAMS_ARG_HELP)
def magic_reload_kedro(line: str, local_ns: Dict[str, Any] = None): (source)

The %reload_kedro IPython line magic. See https://kedro.readthedocs.io/en/stable/notebooks_and_ipython/kedro_and_notebooks.html#reload-kedro-line-magic # pylint: disable=line-too-long for more.

def reload_kedro(path: str = None, env: str = None, extra_params: Dict[str, Any] = None, local_namespace: Optional[Dict[str, Any]] = None): (source)

Function that underlies the %reload_kedro Line magic. This should not be imported or run directly but instead invoked through %reload_kedro.

def _resolve_project_path(path: Optional[str] = None, local_namespace: Optional[Dict[str, Any]] = None) -> Path: (source)

Resolve the project path to use with reload_kedro, updating or adding it (in-place) to the local ipython Namespace (local_namespace) if necessary.

Parameters
path:Optional[str]the path to use as a string object
local_namespace:Optional[Dict[str, Any]]Namespace with local variables of the scope where the line magic is invoked in a dict.
Returns
PathUndocumented
def _remove_cached_modules(package_name): (source)

Undocumented

def _find_kedro_project(current_dir: Path): (source)

Undocumented