---
title: "Kedro integration"
description: "Reference for the helpers in `vizro.integrations.kedro` that load a Kedro Data Catalog into Vizro's `data_manager`."
source_url: "https://vizro.readthedocs.io/en/stable/pages/API-reference/kedro-integration/"
agent_docs: "Index: https://vizro.readthedocs.io/en/stable/llms.txt; full documentation: https://vizro.readthedocs.io/en/stable/llms-full.txt"
---

# Kedro integration

## vizro.integrations.kedro

Functions to use the Kedro Data Catalog inside Vizro.

Usage documentation

[How to integrate Vizro with the Kedro Data Catalog](https://vizro.readthedocs.io/en/stable/pages/user-guides/kedro-data-catalog/)

### catalog\_from\_project

```python
catalog_from_project(
    project_path: str | Path | None = None, **kwargs: Any
) -> DataCatalog
```

Fetches a Kedro project's Data Catalog.

| PARAMETER | DESCRIPTION |
| --- | --- |
| `project_path` | Path to the Kedro project root directory. If not specified then attempts to find a Kedro project in the current directory or above.  **TYPE:** `str | Path | None`  **DEFAULT:** `None` |

| PARAMETER | DESCRIPTION |
| --- | --- |
| `**kwargs` | Keyword arguments to pass to `KedroSession.create`, for example `env`.  **TYPE:** `Any` |

| RETURNS | DESCRIPTION |
| --- | --- |
| `DataCatalog` | Kedro Data Catalog. |

Example

```python
from vizro.integrations import kedro as kedro_integration

catalog = kedro_integration.catalog_from_project("/path/to/kedro/project")
```

### datasets\_from\_catalog

```python
datasets_from_catalog(
    catalog: DataCatalog, *, pipeline: Pipeline = None
) -> dict[str, pd_DataFrameCallable]
```

Fetches a Kedro Data Catalog's pandas dataset loading functions to use in the Vizro data manager.

| PARAMETER | DESCRIPTION |
| --- | --- |
| `catalog` | Kedro Data Catalog.  **TYPE:** `DataCatalog` |
| `pipeline` | Optional Kedro pipeline. If specified, the factory-based Kedro datasets it defines are also returned.  **TYPE:** `Pipeline`  **DEFAULT:** `None` |

| RETURNS | DESCRIPTION |
| --- | --- |
| `dict[str, pd_DataFrameCallable]` | Mapping of dataset names to dataset loading functions that can be used in the Vizro data manager. |

Example

```python
from vizro.integrations import kedro as kedro_integration
from vizro.managers import data_manager

for dataset_name, dataset_loader in kedro_integration.datasets_from_catalog(catalog).items():
    data_manager[dataset_name] = dataset_loader
```

### pipelines\_from\_project

```python
pipelines_from_project(
    project_path: str | Path | None = None,
) -> dict[str, Pipeline]
```

Fetches a Kedro project's pipelines.

| PARAMETER | DESCRIPTION |
| --- | --- |
| `project_path` | Path to the Kedro project root directory. If not specified then attempts to find a Kedro project in the current directory or above.  **TYPE:** `str | Path | None`  **DEFAULT:** `None` |

| RETURNS | DESCRIPTION |
| --- | --- |
| `dict[str, Pipeline]` | Mapping of pipeline names to pipelines. |

Example

```python
from vizro.integrations import kedro as kedro_integration

pipelines = kedro_integration.pipelines_from_project("/path/to/kedro/project")
```
