package documentation

kedro.framework.project module provides utitlity to configure a Kedro project and access its settings.

From __init__.py:

Function configure_logging Configure logging according to logging_config dictionary.
Function configure_project Configure a Kedro project by populating its settings with values defined in user's settings.py and pipeline_registry.py.
Function find_pipelines Automatically find modular pipelines having a create_pipeline function. By default, projects created using Kedro 0.18.3 and higher call this function to autoregister pipelines upon creation/addition.
Function validate_settings Eagerly validate that the settings module is importable. This is desirable to surface any syntax or import errors early. In particular, without eagerly importing the settings module, dynaconf would silence any import error (e...
Constant IMPORT_ERROR_MESSAGE Undocumented
Constant LOGGING Undocumented
Constant PACKAGE_NAME Undocumented
Variable pipelines Undocumented
Variable settings Undocumented
Class _HasSharedParentClassValidator A validator to check that the parent of the default class is an ancestor of the settings value.
Class _IsSubclassValidator A validator to check if the supplied setting value is a subclass of the default class
Class _ProjectLogging No class docstring; 0/1 instance variable, 2/2 methods documented
Class _ProjectPipelines A read-only lazy dictionary-like object to hold the project pipelines. On configure it will store the pipelines module. On first data access, e.g. through __getitem__, it will load the registered pipelines and merge them with pipelines defined from hooks.
Class _ProjectSettings Define all settings available for users to configure in Kedro, along with their validation rules and default values. Use Dynaconf's LazySettings as base.
Function _create_pipeline Undocumented
Function _get_default_class Undocumented
Function _load_data_wrapper Wrap a method in _ProjectPipelines so that data is loaded on first access. Taking inspiration from dynaconf.utils.functional.new_method_proxy
IMPORT_ERROR_MESSAGE: str = (source)

Undocumented

Value
'''An error occurred while importing the \'{module}\' module. Nothing defined th
erein will be returned by \'find_pipelines\'.

{tb_exc}'''
def _get_default_class(class_import_path): (source)

Undocumented

def _load_data_wrapper(func): (source)

Wrap a method in _ProjectPipelines so that data is loaded on first access. Taking inspiration from dynaconf.utils.functional.new_method_proxy

PACKAGE_NAME = (source)

Undocumented

Value
None

Undocumented

Value
_ProjectLogging()
settings = (source)

Undocumented

pipelines = (source)

Undocumented

def configure_project(package_name: str): (source)

Configure a Kedro project by populating its settings with values defined in user's settings.py and pipeline_registry.py.

def configure_logging(logging_config: Dict[str, Any]): (source)

Configure logging according to logging_config dictionary.

def validate_settings(): (source)

Eagerly validate that the settings module is importable. This is desirable to surface any syntax or import errors early. In particular, without eagerly importing the settings module, dynaconf would silence any import error (e.g. missing dependency, missing/mislabelled pipeline), and users would instead get a cryptic error message Expected an instance of `ConfigLoader`, got `NoneType` instead. More info on the dynaconf issue: https://github.com/rochacbruno/dynaconf/issues/460

def _create_pipeline(pipeline_module: types.ModuleType) -> Optional[Pipeline]: (source)

Undocumented

def find_pipelines() -> Dict[str, Pipeline]: (source)

Automatically find modular pipelines having a create_pipeline function. By default, projects created using Kedro 0.18.3 and higher call this function to autoregister pipelines upon creation/addition.

Projects that require more fine-grained control can still define the pipeline registry without calling this function. Alternatively, they can modify the mapping generated by the find_pipelines function.

For more information on the pipeline registry and autodiscovery, see https://kedro.readthedocs.io/en/latest/nodes_and_pipelines/pipeline_registry.html

Returns
Dict[str, Pipeline]A generated mapping from pipeline names to Pipeline objects.
Warns
UserWarningWhen a module does not expose a create_pipeline function, the create_pipeline function does not return a Pipeline object, or if the module import fails up front.